diff --git a/ChangeLog b/ChangeLog index ccdfff7c..1beddfb8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,10 @@ Changes since version 0.51.2: - added DisableMiniwindows option - kde: miniaturize animation will match the taskbar icon (KWM_WIN_ICON_GEOMETRY) - miniwindows show the title of the window if there is none set for it +- fixed crash on kpanel restart +- remember window shortcuts after restart +- change edge resistance to account for panels and stuffs +- narrower menus Changes since version 0.51.1: ............................. diff --git a/NEWS b/NEWS index 8b498cbc..ca64f250 100644 --- a/NEWS +++ b/NEWS @@ -64,7 +64,7 @@ Window Maker has become a GNU program (part of the GNU Project). Title text drop shadow ---------------------- -drop shadow option added for titlebar text. The is a compile time +drop shadow option added for titlebar text. This is a compile time option which needs to be defined in src/wconfig.h after you run configure and before you run make. diff --git a/src/kwm.c b/src/kwm.c index a888b608..88f08330 100644 --- a/src/kwm.c +++ b/src/kwm.c @@ -1284,7 +1284,7 @@ wKWMCheckRootHintChange(WScreen *scr, XPropertyEvent *event) processed = False; - for (i = 0; i < MAX_WORKSPACES; i++) { + for (i = 0; i < MAX_WORKSPACES && i < scr->workspace_count; i++) { if (event->atom == _XA_KWM_DESKTOP_NAME_[i]) { char *name; diff --git a/src/menu.c b/src/menu.c index 0733acee..6c81022b 100644 --- a/src/menu.c +++ b/src/menu.c @@ -453,7 +453,7 @@ wMenuRealize(WMenu *menu) twidth = wTextWidth(scr->menu_title_font->font, menu->frame->title, strlen(menu->frame->title)); theight = menu->frame->top_width; - twidth += theight + theight/2 + (wPreferences.new_style ? 8 : 0); + twidth += theight + (wPreferences.new_style ? 16 : 8); } else { twidth = 0; theight = 0; @@ -467,7 +467,7 @@ wMenuRealize(WMenu *menu) /* search widest text */ text = menu->entries[i]->text; - width = wTextWidth(scr->menu_entry_font->font, text, strlen(text))+12; + width = wTextWidth(scr->menu_entry_font->font, text, strlen(text))+10; if (menu->entries[i]->flags.indicator) { width += MENU_INDICATOR_SPACE; @@ -482,7 +482,7 @@ wMenuRealize(WMenu *menu) rwidth = wTextWidth(scr->menu_entry_font->font, text, strlen(text)) + 5; else if (menu->entries[i]->cascade>=0) - rwidth = eheight; + rwidth = 16; else rwidth = 4; @@ -494,6 +494,7 @@ wMenuRealize(WMenu *menu) if (mwidth < twidth) mwidth = twidth; + wCoreConfigure(menu->menu, 0, theight, mwidth, menu->entry_no*eheight -1); wFrameWindowResize(menu->frame, mwidth, menu->entry_no*eheight-1 diff --git a/src/moveres.c b/src/moveres.c index 4ff14cc0..4a267bcd 100644 --- a/src/moveres.c +++ b/src/moveres.c @@ -961,7 +961,7 @@ updateWindowPosition(WWindow *wwin, MoveData *data, Bool doResistance, /* horizontal movement: check horizontal edge resistances */ if (dx < 0) { /* window is the leftmost window: check against screen edge */ - edge = 0; + edge = scr->totalUsableArea.x1; /* check position of nearest window to the left */ if (data->rightIndex > 0) { @@ -983,7 +983,7 @@ updateWindowPosition(WWindow *wwin, MoveData *data, Bool doResistance, } } else if (dx > 0) { /* window is the rightmost window: check against screen edge */ - edge = scr->scr_width; + edge = scr->totalUsableArea.x2; /* check position of nearest window to the right */ if (data->leftIndex > 0) { @@ -1009,7 +1009,7 @@ updateWindowPosition(WWindow *wwin, MoveData *data, Bool doResistance, /* vertical movement: check vertical edge resistances */ if (dy < 0) { /* window is the topmost window: check against screen edge */ - edge = 0; + edge = scr->totalUsableArea.y1; /* check position of nearest window to the top */ if (data->bottomIndex > 0) { @@ -1031,7 +1031,7 @@ updateWindowPosition(WWindow *wwin, MoveData *data, Bool doResistance, } } else if (dy > 0) { /* window is the bottommost window: check against screen edge */ - edge = scr->scr_height; + edge = scr->totalUsableArea.y2; /* check position of nearest window to the bottom */ if (data->topIndex > 0) { diff --git a/src/superfluous.c b/src/superfluous.c index 94f5e308..c2ef844e 100644 --- a/src/superfluous.c +++ b/src/superfluous.c @@ -61,6 +61,8 @@ play(Display *dpy, int pitch, int delay) } #endif + + #ifdef DEMATERIALIZE_ICON void DoKaboom(WScreen *scr, Window win, int x, int y) @@ -94,8 +96,8 @@ DoKaboom(WScreen *scr, Window win, int x, int y) for (i=0; iroot_win, ButtonPressMask, - &foo)) { + if (XCheckTypedEvent(dpy, ButtonPress, &foo)) { + XPutBackEvent(dpy, &foo); XClearWindow(dpy, scr->root_win); break; } @@ -106,6 +108,7 @@ DoKaboom(WScreen *scr, Window win, int x, int y) XCopyArea(dpy, pixmap, scr->root_win, scr->copy_gc, 0, 0, w, h, x, y); XFreePixmap(dpy, pixmap); XFlush(dpy); + wusleep(1000); } XClearArea(dpy, scr->root_win, x, y, w, h, False); XFlush(dpy); @@ -113,7 +116,6 @@ DoKaboom(WScreen *scr, Window win, int x, int y) RDestroyImage(icon); RDestroyImage(back); } - #else /* !DEMATERIALIZE_ICON */ void DoKaboom(WScreen *scr, Window win, int x, int y) diff --git a/src/window.c b/src/window.c index 0640bac1..9da5035d 100644 --- a/src/window.c +++ b/src/window.c @@ -761,6 +761,15 @@ wManageWindow(WScreen *scr, Window window) wwin->flags.hidden = wstate->hidden; wwin->flags.miniaturized = wstate->miniaturized; workspace = wstate->workspace; + + if (scr->flags.startup && wstate->window_shortcuts >= 0) { + int i; + + for (i = 0; i < MAX_WINDOW_SHORTCUTS; i++) { + if (wstate->window_shortcuts & (1<shortcutWindow[i] = wwin; + } + } free(wstate); } } @@ -2051,17 +2060,22 @@ wWindowConfigureBorders(WWindow *wwin) void wWindowSaveState(WWindow *wwin) { - CARD32 data[9]; - - memset(data, 0, sizeof(CARD32)*9); + CARD32 data[10]; + int i; + + memset(data, 0, sizeof(CARD32)*10); data[0] = wwin->frame->workspace; data[1] = wwin->flags.miniaturized; data[2] = wwin->flags.shaded; data[3] = wwin->flags.hidden; + for (i = 0; i < MAX_WINDOW_SHORTCUTS; i++) { + if (wwin->screen_ptr->shortcutWindow[i] == wwin) + data[9] |= 1<client_win, _XA_WINDOWMAKER_STATE, _XA_WINDOWMAKER_STATE, 32, PropModeReplace, - (unsigned char *)data, 9); + (unsigned char *)data, 10); } @@ -2074,7 +2088,7 @@ getSavedState(Window window, WSavedState **state) unsigned long bytes_after_ret; CARD32 *data; - if (XGetWindowProperty(dpy, window, _XA_WINDOWMAKER_STATE, 0, 9, + if (XGetWindowProperty(dpy, window, _XA_WINDOWMAKER_STATE, 0, 10, True, _XA_WINDOWMAKER_STATE, &type_ret, &fmt_ret, &nitems_ret, &bytes_after_ret, (unsigned char **)&data)!=Success || !data) @@ -2092,6 +2106,7 @@ getSavedState(Window window, WSavedState **state) (*state)->y = data[6]; (*state)->w = data[7]; (*state)->h = data[8]; + (*state)->window_shortcuts = data[9]; } XFree(data); diff --git a/src/window.h b/src/window.h index 0321ab03..e6738840 100644 --- a/src/window.h +++ b/src/window.h @@ -303,6 +303,7 @@ typedef struct WSavedState { int y; unsigned int w; unsigned int h; + unsigned window_shortcuts; /* mask like 1<