mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Various bug fixes.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
Changes since version 0.60.0:
|
||||||
|
.............................
|
||||||
|
|
||||||
|
- fixed some problems with non gcc compilers.
|
||||||
|
- fixed problem with showing instance.class in the inspector window.
|
||||||
|
- fixed crash when displaying workspace name in some positions.
|
||||||
|
|
||||||
|
|
||||||
Changes since version 0.53.0:
|
Changes since version 0.53.0:
|
||||||
.............................
|
.............................
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
changes since wmaker 0.60.0:
|
||||||
|
............................
|
||||||
|
|
||||||
|
- added WMScreenWidth() and WMScreenHeight() functions.
|
||||||
|
- fixed some problems when compiling with non gcc compilers.
|
||||||
|
|
||||||
|
|
||||||
changes since wmaker 0.53.0:
|
changes since wmaker 0.53.0:
|
||||||
............................
|
............................
|
||||||
|
|
||||||
|
|||||||
@@ -672,6 +672,10 @@ int WMWidthOfString(WMFont *font, char *text, int length);
|
|||||||
|
|
||||||
WMScreen *WMWidgetScreen(WMWidget *w);
|
WMScreen *WMWidgetScreen(WMWidget *w);
|
||||||
|
|
||||||
|
unsigned int WMScreenWidth(WMScreen *scr);
|
||||||
|
|
||||||
|
unsigned int WMScreenHeight(WMScreen *scr);
|
||||||
|
|
||||||
void WMUnmapWidget(WMWidget *w);
|
void WMUnmapWidget(WMWidget *w);
|
||||||
|
|
||||||
void WMMapWidget(WMWidget *w);
|
void WMMapWidget(WMWidget *w);
|
||||||
|
|||||||
@@ -593,7 +593,6 @@ WMHandleEvent(XEvent *event)
|
|||||||
|
|
||||||
if (event->type == SelectionNotify || event->type == SelectionClear
|
if (event->type == SelectionNotify || event->type == SelectionClear
|
||||||
|| event->type == SelectionRequest) {
|
|| event->type == SelectionRequest) {
|
||||||
puts("REQREWQ");
|
|
||||||
/* handle selection related events */
|
/* handle selection related events */
|
||||||
W_HandleSelectionEvent(event);
|
W_HandleSelectionEvent(event);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -953,6 +953,20 @@ WMScreenDepth(WMScreen *scr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
WMScreenWidth(WMScreen *scr)
|
||||||
|
{
|
||||||
|
return scr->rootView->size.width;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
WMScreenHeight(WMScreen *scr)
|
||||||
|
{
|
||||||
|
return scr->rootView->size.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMRedisplayWidget(WMWidget *w)
|
WMRedisplayWidget(WMWidget *w)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ doScrolling(WMWidget *self, void *data)
|
|||||||
int vpsize;
|
int vpsize;
|
||||||
float size;
|
float size;
|
||||||
|
|
||||||
if (sPtr->hScroller == self) {
|
if (sPtr->hScroller == (WMScroller *)self) {
|
||||||
pos = -sPtr->contentView->pos.x;
|
pos = -sPtr->contentView->pos.x;
|
||||||
size = sPtr->contentView->size.width-sPtr->viewport->size.width;
|
size = sPtr->contentView->size.width-sPtr->viewport->size.width;
|
||||||
vpsize = sPtr->viewport->size.width - sPtr->pageScroll;
|
vpsize = sPtr->viewport->size.width - sPtr->pageScroll;
|
||||||
@@ -310,7 +310,7 @@ doScrolling(WMWidget *self, void *data)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sPtr->hScroller == self) {
|
if (sPtr->hScroller == (WMScroller *)self) {
|
||||||
W_MoveView(sPtr->contentView, -pos, sPtr->contentView->pos.y);
|
W_MoveView(sPtr->contentView, -pos, sPtr->contentView->pos.y);
|
||||||
} else {
|
} else {
|
||||||
W_MoveView(sPtr->contentView, sPtr->contentView->pos.x, -pos);
|
W_MoveView(sPtr->contentView, sPtr->contentView->pos.x, -pos);
|
||||||
|
|||||||
@@ -1260,7 +1260,6 @@ handleTextFieldActionEvents(XEvent *event, void *data)
|
|||||||
{
|
{
|
||||||
WMNotification *notif = WMCreateNotification("_lostOwnership",
|
WMNotification *notif = WMCreateNotification("_lostOwnership",
|
||||||
NULL,tPtr);
|
NULL,tPtr);
|
||||||
puts("notify it");
|
|
||||||
WMPostNotification(notif);
|
WMPostNotification(notif);
|
||||||
WMReleaseNotification(notif);
|
WMReleaseNotification(notif);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -408,6 +408,14 @@ createPanel(Panel *p)
|
|||||||
WMAddListItem(panel->actLs, _("Shortcut for window 2"));
|
WMAddListItem(panel->actLs, _("Shortcut for window 2"));
|
||||||
WMAddListItem(panel->actLs, _("Shortcut for window 3"));
|
WMAddListItem(panel->actLs, _("Shortcut for window 3"));
|
||||||
WMAddListItem(panel->actLs, _("Shortcut for window 4"));
|
WMAddListItem(panel->actLs, _("Shortcut for window 4"));
|
||||||
|
#ifdef EXTEND_WINDOWSHORTCUT
|
||||||
|
WMAddListItem(panel->actLs, _("Shortcut for window 5"));
|
||||||
|
WMAddListItem(panel->actLs, _("Shortcut for window 6"));
|
||||||
|
WMAddListItem(panel->actLs, _("Shortcut for window 7"));
|
||||||
|
WMAddListItem(panel->actLs, _("Shortcut for window 8"));
|
||||||
|
WMAddListItem(panel->actLs, _("Shortcut for window 9"));
|
||||||
|
WMAddListItem(panel->actLs, _("Shortcut for window 10"));
|
||||||
|
#endif
|
||||||
WMAddListItem(panel->actLs, _("Raise Clip"));
|
WMAddListItem(panel->actLs, _("Raise Clip"));
|
||||||
WMAddListItem(panel->actLs, _("Lower Clip"));
|
WMAddListItem(panel->actLs, _("Lower Clip"));
|
||||||
WMAddListItem(panel->actLs, _("Raise/Lower Clip"));
|
WMAddListItem(panel->actLs, _("Raise/Lower Clip"));
|
||||||
|
|||||||
@@ -38,6 +38,7 @@
|
|||||||
#include <WUtil.h>
|
#include <WUtil.h>
|
||||||
|
|
||||||
/** some config options **/
|
/** some config options **/
|
||||||
|
/* is not easier to include ../src/wconfig.h ?? */
|
||||||
#undef EXTEND_WINDOWSHORTCUT
|
#undef EXTEND_WINDOWSHORTCUT
|
||||||
|
|
||||||
/****/
|
/****/
|
||||||
|
|||||||
@@ -357,9 +357,9 @@ typedef struct WPreferences {
|
|||||||
|
|
||||||
int icon_size; /* size of the icon */
|
int icon_size; /* size of the icon */
|
||||||
|
|
||||||
int menu_style; /* menu decoration style */
|
char menu_style; /* menu decoration style */
|
||||||
|
|
||||||
int workspace_name_display_position;
|
char workspace_name_display_position;
|
||||||
|
|
||||||
unsigned int modifier_mask; /* mask to use as kbd modifier */
|
unsigned int modifier_mask; /* mask to use as kbd modifier */
|
||||||
|
|
||||||
|
|||||||
@@ -379,11 +379,11 @@ updateDockNumbers(WScreen *scr)
|
|||||||
|
|
||||||
XSetForeground(dpy, numbers_gc, scr->black_pixel);
|
XSetForeground(dpy, numbers_gc, scr->black_pixel);
|
||||||
WMDrawString(scr->wmscreen, dicon->icon->core->window, numbers_gc,
|
WMDrawString(scr->wmscreen, dicon->icon->core->window, numbers_gc,
|
||||||
scr->icon_title_font->font, 4, 3, ws_numbers, length);
|
scr->icon_title_font, 4, 3, ws_numbers, length);
|
||||||
|
|
||||||
XSetForeground(dpy, numbers_gc, scr->white_pixel);
|
XSetForeground(dpy, numbers_gc, scr->white_pixel);
|
||||||
WMDrawString(scr->wmscreen, dicon->icon->core->window, numbers_gc,
|
WMDrawString(scr->wmscreen, dicon->icon->core->window, numbers_gc,
|
||||||
scr->icon_title_font->font, 3, 2, ws_numbers, length);
|
scr->icon_title_font, 3, 2, ws_numbers, length);
|
||||||
|
|
||||||
XFreeGC(dpy, numbers_gc);
|
XFreeGC(dpy, numbers_gc);
|
||||||
free(ws_numbers);
|
free(ws_numbers);
|
||||||
|
|||||||
@@ -3526,7 +3526,6 @@ iconDblClick(WObjDescriptor *desc, XEvent *event)
|
|||||||
((btn->icon->owner == NULL) && (btn->applist != NULL))) {
|
((btn->icon->owner == NULL) && (btn->applist != NULL))) {
|
||||||
if (btn->icon->owner == NULL)
|
if (btn->icon->owner == NULL)
|
||||||
btn->icon->owner = btn->applist->wapp->main_window_desc;
|
btn->icon->owner = btn->applist->wapp->main_window_desc;
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
if (btn->icon->owner && !(event->xbutton.state & ControlMask)) {
|
if (btn->icon->owner && !(event->xbutton.state & ControlMask)) {
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1095,14 +1095,16 @@ createInspectorForWindow(WWindow *wwin)
|
|||||||
WMSetButtonAction(panel->defaultRb, selectSpecification, panel);
|
WMSetButtonAction(panel->defaultRb, selectSpecification, panel);
|
||||||
|
|
||||||
if (wwin->wm_class && wwin->wm_instance) {
|
if (wwin->wm_class && wwin->wm_instance) {
|
||||||
char *str;
|
char *str, *tmp;
|
||||||
|
|
||||||
str = wstrappend(wwin->wm_instance, wwin->wm_class);
|
tmp = wstrappend(wwin->wm_instance, ".");
|
||||||
|
str = wstrappend(tmp, wwin->wm_class);
|
||||||
panel->bothRb = WMCreateRadioButton(panel->specFrm);
|
panel->bothRb = WMCreateRadioButton(panel->specFrm);
|
||||||
WMMoveWidget(panel->bothRb, 10, 18);
|
WMMoveWidget(panel->bothRb, 10, 18);
|
||||||
WMResizeWidget(panel->bothRb, frame_width - (2 * 10), 20);
|
WMResizeWidget(panel->bothRb, frame_width - (2 * 10), 20);
|
||||||
WMSetButtonText(panel->bothRb, str);
|
WMSetButtonText(panel->bothRb, str);
|
||||||
free(str);
|
free(tmp);
|
||||||
|
free(str);
|
||||||
WMGroupButtons(panel->defaultRb, panel->bothRb);
|
WMGroupButtons(panel->defaultRb, panel->bothRb);
|
||||||
|
|
||||||
if (!selectedBtn)
|
if (!selectedBtn)
|
||||||
@@ -1137,6 +1139,9 @@ createInspectorForWindow(WWindow *wwin)
|
|||||||
WMSetButtonAction(panel->clsRb, selectSpecification, panel);
|
WMSetButtonAction(panel->clsRb, selectSpecification, panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (selectedBtn)
|
||||||
|
WMSetButtonSelected(selectedBtn, True);
|
||||||
|
|
||||||
panel->specLbl = WMCreateLabel(panel->win);
|
panel->specLbl = WMCreateLabel(panel->win);
|
||||||
WMMoveWidget(panel->specLbl, 15, 170);
|
WMMoveWidget(panel->specLbl, 15, 170);
|
||||||
WMResizeWidget(panel->specLbl, frame_width, 100);
|
WMResizeWidget(panel->specLbl, frame_width, 100);
|
||||||
|
|||||||
@@ -314,33 +314,34 @@ showWorkspaceName(WScreen *scr, int workspace)
|
|||||||
h = WMFontHeight(scr->workspace_name_font);
|
h = WMFontHeight(scr->workspace_name_font);
|
||||||
|
|
||||||
switch (wPreferences.workspace_name_display_position) {
|
switch (wPreferences.workspace_name_display_position) {
|
||||||
case WD_CENTER:
|
|
||||||
px = (scr->scr_width - (w+4))/2;
|
|
||||||
py = (scr->scr_height - (h+4))/2;
|
|
||||||
break;
|
|
||||||
case WD_TOP:
|
case WD_TOP:
|
||||||
px = (scr->scr_width - (w+4))/2;
|
px = (scr->scr_width - (w+4))/2;
|
||||||
py = 0;
|
py = 0;
|
||||||
break;
|
break;
|
||||||
case WD_BOTTOM:
|
case WD_BOTTOM:
|
||||||
px = (scr->scr_width - (w+4))/2;
|
px = (scr->scr_width - (w+4))/2;
|
||||||
py = scr->scr_height - h;
|
py = scr->scr_height - (h+4);
|
||||||
break;
|
break;
|
||||||
case WD_TOPLEFT:
|
case WD_TOPLEFT:
|
||||||
px = 0;
|
px = 0;
|
||||||
py = 0;
|
py = 0;
|
||||||
break;
|
break;
|
||||||
case WD_TOPRIGHT:
|
case WD_TOPRIGHT:
|
||||||
px = scr->scr_width - w;
|
px = scr->scr_width - (w+4);
|
||||||
py = 0;
|
py = 0;
|
||||||
break;
|
break;
|
||||||
case WD_BOTTOMLEFT:
|
case WD_BOTTOMLEFT:
|
||||||
px = 0;
|
px = 0;
|
||||||
py = scr->scr_height - h;
|
py = scr->scr_height - (h+4);
|
||||||
break;
|
break;
|
||||||
case WD_BOTTOMRIGHT:
|
case WD_BOTTOMRIGHT:
|
||||||
px = scr->scr_width - w;
|
px = scr->scr_width - (w+4);
|
||||||
py = scr->scr_height - h;
|
py = scr->scr_height - (h+4);
|
||||||
|
break;
|
||||||
|
case WD_CENTER:
|
||||||
|
default:
|
||||||
|
px = (scr->scr_width - (w+4))/2;
|
||||||
|
py = (scr->scr_height - (h+4))/2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
XResizeWindow(dpy, scr->workspace_name, w+4, h+4);
|
XResizeWindow(dpy, scr->workspace_name, w+4, h+4);
|
||||||
@@ -389,7 +390,7 @@ showWorkspaceName(WScreen *scr, int workspace)
|
|||||||
ximg = RGetXImage(scr->rcontext, scr->root_win, px, py,
|
ximg = RGetXImage(scr->rcontext, scr->root_win, px, py,
|
||||||
data->text->width, data->text->height);
|
data->text->width, data->text->height);
|
||||||
|
|
||||||
if (!ximg) {
|
if (!ximg || !ximg->image) {
|
||||||
goto erro;
|
goto erro;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -215,7 +215,8 @@ image2TrueColorD16(RContext *ctx, RImage *image)
|
|||||||
nberr[x+1]+=ber-2*b;
|
nberr[x+1]+=ber-2*b;
|
||||||
}
|
}
|
||||||
ofs += image->width;
|
ofs += image->width;
|
||||||
(char*)dataP += line_offset;
|
/*(char*)dataP += line_offset;*/
|
||||||
|
dataP = (unsigned short *)((char *)dataP + line_offset);
|
||||||
/* skip to next line */
|
/* skip to next line */
|
||||||
terr = rerr;
|
terr = rerr;
|
||||||
rerr = nrerr;
|
rerr = nrerr;
|
||||||
@@ -433,7 +434,7 @@ image2PseudoColor(RContext *ctx, RImage *image)
|
|||||||
grn = image->data[1];
|
grn = image->data[1];
|
||||||
blu = image->data[2];
|
blu = image->data[2];
|
||||||
|
|
||||||
data = ximg->image->data;
|
data = (unsigned char *)ximg->image->data;
|
||||||
|
|
||||||
/* Tables are same at the moment because rmask==gmask==bmask. */
|
/* Tables are same at the moment because rmask==gmask==bmask. */
|
||||||
rtable = computeTable(rmask);
|
rtable = computeTable(rmask);
|
||||||
@@ -605,7 +606,7 @@ image2GrayScale(RContext *ctx, RImage *image)
|
|||||||
grn = image->data[1];
|
grn = image->data[1];
|
||||||
blu = image->data[2];
|
blu = image->data[2];
|
||||||
|
|
||||||
data = ximg->image->data;
|
data = (unsigned char *)ximg->image->data;
|
||||||
|
|
||||||
if (ctx->vclass == StaticGray)
|
if (ctx->vclass == StaticGray)
|
||||||
gmask = (1<<ctx->depth) - 1; /* use all grays */
|
gmask = (1<<ctx->depth) - 1; /* use all grays */
|
||||||
|
|||||||
Reference in New Issue
Block a user