From 81a1f98ca58d4b3e8b4f5cf309b254b5a112bd17 Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 24 Nov 2001 05:10:38 +0000 Subject: [PATCH] - Mapping a new window that belongs to a running application that is hidden, will unhide the application. - removed a wsyserror() message when reading a property list from file (the programmer should decide if to give that message or just ignore). --- ChangeLog | 2 ++ WINGs/ChangeLog | 2 ++ WINGs/proplist.c | 7 ++++--- src/window.c | 13 +++++++++++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index cdaa1da1..5fe50300 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,8 @@ Changes since version 0.70.0: an application will keep the shaded/unshaded state of windows.) - Removed compile time option for definable cursors and made them available by default. +- Mapping a new window that belongs to a running application that is hidden, + will unhide the application. Changes since version 0.65.1: diff --git a/WINGs/ChangeLog b/WINGs/ChangeLog index d275b0ae..56c5804a 100644 --- a/WINGs/ChangeLog +++ b/WINGs/ChangeLog @@ -4,6 +4,8 @@ Changes since wmaker 0.70.0: - added an internal strcasecmp() (only on systems where is not present) - removed some redundant includes of ../src/config.h when wconfig.h is included too +- removed a wsyserror() message when reading a property list from file + (the programmer should decide if to give that message or just ignore). Changes since wmaker 0.65.0: diff --git a/WINGs/proplist.c b/WINGs/proplist.c index 8ec83799..15d309da 100644 --- a/WINGs/proplist.c +++ b/WINGs/proplist.c @@ -1544,14 +1544,15 @@ WMReadPropListFromFile(char *file) f = fopen(file, "r"); if (!f) { - wsyserror(_("could not open domain file %s for reading"), file); + /* let the user print the error message if he really needs to */ + /*wsyserror(_("could not open domain file '%s' for reading"), file);*/ return NULL; } if (stat(file, &stbuf)==0) { length = (size_t) stbuf.st_size; } else { - wsyserror(_("could not get size for domain file %s"), file); + wsyserror(_("could not get size for file '%s'"), file); fclose(f); return NULL; } @@ -1563,7 +1564,7 @@ WMReadPropListFromFile(char *file) pldata->lineNumber = 1; if (fread(pldata->ptr, length, 1, f) != 1) { - wsyserror(_("error reading from file %s"), file); + wsyserror(_("error reading from file '%s'"), file); plist = NULL; goto cleanup; } diff --git a/src/window.c b/src/window.c index 7f4bd8fd..5628480b 100644 --- a/src/window.c +++ b/src/window.c @@ -566,6 +566,7 @@ wManageWindow(WScreen *scr, Window window) int workspace = -1; char *title; Bool withdraw = False; + Bool raise = False; /* mutex. */ /* XGrabServer(dpy); */ @@ -1110,7 +1111,9 @@ wManageWindow(WScreen *scr, Window window) } if (app->flags.hidden) { - wwin->flags.hidden = 1; + /*wwin->flags.hidden = 1;*/ + wUnhideApplication(app, False, False); + raise = True; } } } @@ -1183,7 +1186,7 @@ wManageWindow(WScreen *scr, Window window) DoWindowBirth(wwin); } - wWindowMap(wwin); + wWindowMap(wwin); } /* setup stacking descriptor */ @@ -1215,6 +1218,12 @@ wManageWindow(WScreen *scr, Window window) wwin->prev = NULL; } + /* raise is set to true if we un-hid the app when this window was born. + * we raise, else old windows of this app will be above this new one. */ + if (raise) { + wRaiseFrame(wwin->frame->core); + } + /* Update name must come after WApplication stuff is done */ wWindowUpdateName(wwin, title); if (title)