mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-17 20:34:18 +01:00
Various bug fixes.
This commit is contained in:
@@ -357,9 +357,9 @@ typedef struct WPreferences {
|
||||
|
||||
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 */
|
||||
|
||||
|
||||
@@ -379,11 +379,11 @@ updateDockNumbers(WScreen *scr)
|
||||
|
||||
XSetForeground(dpy, numbers_gc, scr->black_pixel);
|
||||
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);
|
||||
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);
|
||||
free(ws_numbers);
|
||||
|
||||
@@ -3526,7 +3526,6 @@ iconDblClick(WObjDescriptor *desc, XEvent *event)
|
||||
((btn->icon->owner == NULL) && (btn->applist != NULL))) {
|
||||
if (btn->icon->owner == NULL)
|
||||
btn->icon->owner = btn->applist->wapp->main_window_desc;
|
||||
}
|
||||
#else
|
||||
if (btn->icon->owner && !(event->xbutton.state & ControlMask)) {
|
||||
#endif
|
||||
|
||||
@@ -1095,14 +1095,16 @@ createInspectorForWindow(WWindow *wwin)
|
||||
WMSetButtonAction(panel->defaultRb, selectSpecification, panel);
|
||||
|
||||
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);
|
||||
WMMoveWidget(panel->bothRb, 10, 18);
|
||||
WMResizeWidget(panel->bothRb, frame_width - (2 * 10), 20);
|
||||
WMSetButtonText(panel->bothRb, str);
|
||||
free(str);
|
||||
free(tmp);
|
||||
free(str);
|
||||
WMGroupButtons(panel->defaultRb, panel->bothRb);
|
||||
|
||||
if (!selectedBtn)
|
||||
@@ -1137,6 +1139,9 @@ createInspectorForWindow(WWindow *wwin)
|
||||
WMSetButtonAction(panel->clsRb, selectSpecification, panel);
|
||||
}
|
||||
|
||||
if (selectedBtn)
|
||||
WMSetButtonSelected(selectedBtn, True);
|
||||
|
||||
panel->specLbl = WMCreateLabel(panel->win);
|
||||
WMMoveWidget(panel->specLbl, 15, 170);
|
||||
WMResizeWidget(panel->specLbl, frame_width, 100);
|
||||
|
||||
@@ -314,33 +314,34 @@ showWorkspaceName(WScreen *scr, int workspace)
|
||||
h = WMFontHeight(scr->workspace_name_font);
|
||||
|
||||
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:
|
||||
px = (scr->scr_width - (w+4))/2;
|
||||
py = 0;
|
||||
break;
|
||||
case WD_BOTTOM:
|
||||
px = (scr->scr_width - (w+4))/2;
|
||||
py = scr->scr_height - h;
|
||||
py = scr->scr_height - (h+4);
|
||||
break;
|
||||
case WD_TOPLEFT:
|
||||
px = 0;
|
||||
py = 0;
|
||||
break;
|
||||
case WD_TOPRIGHT:
|
||||
px = scr->scr_width - w;
|
||||
px = scr->scr_width - (w+4);
|
||||
py = 0;
|
||||
break;
|
||||
case WD_BOTTOMLEFT:
|
||||
px = 0;
|
||||
py = scr->scr_height - h;
|
||||
py = scr->scr_height - (h+4);
|
||||
break;
|
||||
case WD_BOTTOMRIGHT:
|
||||
px = scr->scr_width - w;
|
||||
py = scr->scr_height - h;
|
||||
px = scr->scr_width - (w+4);
|
||||
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;
|
||||
}
|
||||
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,
|
||||
data->text->width, data->text->height);
|
||||
|
||||
if (!ximg) {
|
||||
if (!ximg || !ximg->image) {
|
||||
goto erro;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user