From 0c4dc1c24a34eaf2241ed0f4957f9597b1565188 Mon Sep 17 00:00:00 2001 From: dan Date: Tue, 20 Nov 2001 13:48:23 +0000 Subject: [PATCH] - Deminiaturizing a window that is also shaded, will perform an unshade too. (Note that this only applies to deminiaturizing shaded windows. Unhiding an application will keep the shaded/unshaded state of windows.) --- ChangeLog | 5 ++++- src/actions.c | 13 ++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38a5da96..cbde8663 100644 --- a/ChangeLog +++ b/ChangeLog @@ -16,7 +16,10 @@ Changes since version 0.70.0: - SIGTERM is now handled and saves the internal state before exiting (like SIGHUP and SIGINT already do). Now a "kill wmaker_pid" will exit cleanly saving dock/clip/session information on exit. -- added an internal strcasecmp() to WINGs (only on systems where's not present) +- Added an internal strcasecmp() to WINGs (only on systems where's not present) +- Deminiaturizing a window that is also shaded, will perform an unshade too. + (Note that this only applies to deminiaturizing shaded windows. + Unhiding an application will keep the shaded/unshaded state of windows.) Changes since version 0.65.1: diff --git a/src/actions.c b/src/actions.c index 81c79c7e..4c7e7e52 100644 --- a/src/actions.c +++ b/src/actions.c @@ -255,7 +255,7 @@ wSetFocusTo(WScreen *scr, WWindow *wwin) void wShadeWindow(WWindow *wwin) { - time_t time0 = time(NULL); + time_t time0; #ifdef ANIMATIONS int y, s, w, h; #endif @@ -263,6 +263,8 @@ wShadeWindow(WWindow *wwin) if (wwin->flags.shaded) return; + time0 = time(NULL); + XLowerWindow(dpy, wwin->client_win); wSoundPlay(WSOUND_SHADE); @@ -329,7 +331,7 @@ wShadeWindow(WWindow *wwin) void wUnshadeWindow(WWindow *wwin) { - time_t time0 = time(NULL); + time_t time0; #ifdef ANIMATIONS int y, s, w, h; #endif /* ANIMATIONS */ @@ -337,7 +339,9 @@ wUnshadeWindow(WWindow *wwin) if (!wwin->flags.shaded) return; - + + time0 = time(NULL); + wwin->flags.shaded = 0; wwin->flags.mapped = 1; XMapWindow(dpy, wwin->client_win); @@ -1137,6 +1141,9 @@ wDeiconifyWindow(WWindow *wwin) } WMPostNotificationName(WMNChangedState, wwin, "iconify"); + + /* In case we were shaded and iconified, also unshade */ + wUnshadeWindow(wwin); } -- 2.11.4.GIT