From 6f28d987a8a218a3fd967d08232092c3d9d2e791 Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 18 Dec 2001 16:10:07 +0000 Subject: [PATCH] - Fixed problem with unhiding taht mapped windows from other workspaces on the current workspace. - Made apps with an application menu not to use a shared appicon. --- ChangeLog | 3 ++- TODO | 6 +++++- src/actions.c | 16 +++++++++------- src/dock.c | 2 +- src/window.c | 16 +++++++++++++--- 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index 62fc0d56..7ce3c763 100644 --- a/ChangeLog +++ b/ChangeLog @@ -28,7 +28,7 @@ Changes since version 0.70.0: - Added real appicon sharing (apps of the same kind will have a single shared appicon). - Fixed user and global defaults domain merging to preserve values present in - global but not in user in subdictionaries. + global but not in user, in sub-dictionaries. - Made dock/clip steal appicons of applications that were started from a shell/xterm or from the main menu, if there is a docked appicon of that class that is not running at the time the app is launched. @@ -38,6 +38,7 @@ Changes since version 0.70.0: - Updated the animation constants for scrolling/sliding/shading to better adapt to newer/faster machines. Also used wusleep(10) when the delay was 0 to get rid of the jerky animation when there was no delay. +- Fixed bug with Unhide mapping windows from other workspaces. Changes since version 0.65.1: diff --git a/TODO b/TODO index 83b1d332..462ab8d1 100644 --- a/TODO +++ b/TODO @@ -26,7 +26,11 @@ Need to do: - add new file for stuff like default commands and dnd commands for docked apps, balloons for the dock etc - check whether apps with name.class set to empty strings should be treated - like if name.class were NULL.NULL + like if name.class is NULL.NULL +- review the defaults handling code (not to save globals in user, not to + reread after we update a domain if possible, check WINGs apps updating + WMWindowAttributes after start making screen to flash on update) + Maybe some day: =============== diff --git a/src/actions.c b/src/actions.c index c19f805c..b091ab29 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1326,8 +1326,7 @@ unhideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int animate, wWindowChangeWorkspace(wwin, wwin->screen_ptr->current_workspace); wwin->flags.hidden=0; - wwin->flags.mapped=1; - + wSoundPlay(WSOUND_UNHIDE); #ifdef ANIMATIONS if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations @@ -1340,12 +1339,15 @@ unhideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int animate, } #endif wwin->flags.skip_next_animation = 0; - XMapWindow(dpy, wwin->client_win); - XMapWindow(dpy, wwin->frame->core->window); - wClientSetState(wwin, NormalState, None); - wRaiseFrame(wwin->frame->core); + if (wwin->screen_ptr->current_workspace == wwin->frame->workspace) { + XMapWindow(dpy, wwin->client_win); + XMapWindow(dpy, wwin->frame->core->window); + wClientSetState(wwin, NormalState, None); + wwin->flags.mapped=1; + wRaiseFrame(wwin->frame->core); + } if (wwin->flags.inspector_open) { - wUnhideInspectorForWindow(wwin); + wUnhideInspectorForWindow(wwin); } WMPostNotificationName(WMNChangedState, wwin, "hide"); diff --git a/src/dock.c b/src/dock.c index 4478ab18..b563aa7f 100644 --- a/src/dock.c +++ b/src/dock.c @@ -828,7 +828,7 @@ hideCallback(WMenu *menu, WMenuEntry *entry) wapp = wApplicationOf(btn->icon->owner->main_window); if (wapp->flags.hidden) { - wWorkspaceChange(btn->icon->core->screen_ptr,wapp->last_workspace); + wWorkspaceChange(btn->icon->core->screen_ptr, wapp->last_workspace); wUnhideApplication(wapp, False, False); } else { wHideApplication(wapp); diff --git a/src/window.c b/src/window.c index b968778a..aaaeb393 100644 --- a/src/window.c +++ b/src/window.c @@ -793,13 +793,23 @@ wManageWindow(WScreen *scr, Window window) } #endif /* OLWM_HINTS */ + /* Make broken apps behave as a nice app. */ + if (WFLAGP(wwin, emulate_appicon)) { + wwin->main_window = wwin->client_win; + } + if (wwin->flags.is_gnustep) { WSETUFLAG(wwin, shared_appicon, 0); } - /* Make broken apps behave as a nice app. */ - if (WFLAGP(wwin, emulate_appicon)) { - wwin->main_window = wwin->client_win; + { + extern Atom _XA_WINDOWMAKER_MENU; + XTextProperty text_prop; + + if (XGetTextProperty(dpy, wwin->main_window, &text_prop, + _XA_WINDOWMAKER_MENU)) { + WSETUFLAG(wwin, shared_appicon, 0); + } } if (!withdraw && wwin->main_window && WFLAGP(wwin, shared_appicon)) { -- 2.11.4.GIT