[maemo-commits] [maemo-commits] r19430 - in projects/haf/trunk/libmatchbox2: . matchbox/core
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Oct 13 11:36:41 EEST 2009
- Previous message: [maemo-commits] r19429 - projects/haf/tags/gtk+
- Next message: [maemo-commits] r19431 - projects/haf/trunk/libmatchbox2/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala Date: 2009-10-13 11:34:25 +0300 (Tue, 13 Oct 2009) New Revision: 19430 Modified: projects/haf/trunk/libmatchbox2/ChangeLog projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-root-window.c Log: Fixes: NB#124398 - Whole application should be closed with 'End current task', not just topmost window * matchbox/core/mb-wm-client.c (mb_wm_client_shutdown): Simplify and check some NULLs just in case. * matchbox/core/mb-wm-root-window.c (mb_wm_root_window_handle_message): "No more Mr. Nice Guy": kill clients on 'End current task' message. Modified: projects/haf/trunk/libmatchbox2/ChangeLog =================================================================== --- projects/haf/trunk/libmatchbox2/ChangeLog 2009-10-09 13:51:05 UTC (rev 19429) +++ projects/haf/trunk/libmatchbox2/ChangeLog 2009-10-13 08:34:25 UTC (rev 19430) @@ -1,3 +1,14 @@ +2009-10-13 Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> + + Fixes: NB#124398 - Whole application should be closed with 'End + current task', not just topmost window + + * matchbox/core/mb-wm-client.c (mb_wm_client_shutdown): Simplify and + check some NULLs just in case. + * matchbox/core/mb-wm-root-window.c + (mb_wm_root_window_handle_message): "No more Mr. Nice Guy": kill + clients on 'End current task' message. + 2009-10-08 Gordon Williams <gordon.williams at collabora.co.uk> * matchbox/core/mb-window-manager.h: Just added some extra comments to Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c 2009-10-09 13:51:05 UTC (rev 19429) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client.c 2009-10-13 08:34:25 UTC (rev 19430) @@ -860,13 +860,17 @@ mb_wm_client_shutdown (MBWindowManagerClient *client) { char buf[257]; - int sig = 9; - MBWindowManager *wm = client->wmref; - MBWMClientWindow *win = client->window; - Window xwin = client->window->xwindow; - const char *machine = win->machine; - pid_t pid = win->pid; + Window xwin; + const char *machine; + pid_t pid; + if (!client || !client->window) + return; + + xwin = client->window->xwindow; + machine = client->window->machine; + pid = client->window->pid; + if (machine && pid && (gethostname (buf, sizeof(buf)-1) == 0)) { if (!strcmp (buf, machine)) @@ -878,14 +882,14 @@ return; } - g_debug ("%s: kill(%u)", __FUNCTION__, pid); - if (kill (pid, sig) >= 0) + g_debug ("%s: kill(%u, SIGKILL)", __FUNCTION__, pid); + if (kill (pid, SIGKILL) >= 0) return; } } g_debug ("%s: XKillClient for %lx", __FUNCTION__, xwin); - XKillClient(wm->xdpy, xwin); + XKillClient(client->wmref->xdpy, xwin); } void Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-root-window.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-root-window.c 2009-10-09 13:51:05 UTC (rev 19429) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-root-window.c 2009-10-13 08:34:25 UTC (rev 19430) @@ -359,20 +359,21 @@ } else if (e->message_type == wm->atoms[MBWM_ATOM_NET_CLOSE_WINDOW]) { - if ((c = mb_wm_managed_client_from_xwindow(wm, e->window)) != NULL) { - if ((e->data.l[2] & 1) && mb_wm_client_get_next_focused_client(c)!=NULL ) - { - /* If they set the least significant bit of data.l[2], - * the window should only be closed if it is topmost. - */ - g_warning ("Not closing %07x because it is not on top\n", - (int) e->window); - } - else - { - mb_wm_client_deliver_delete(c); - } - } + if ((c = mb_wm_managed_client_from_xwindow(wm, e->window)) != NULL) + { + if ((e->data.l[2] & 1) && mb_wm_client_get_next_focused_client (c)) + { + /* If they set the least significant bit of data.l[2], + * the window should only be closed if it is topmost. + */ + g_warning ("Not closing %07x because it is not on top\n", + (int) e->window); + } + else + { + mb_wm_client_shutdown (c); + } + } return 1; }
- Previous message: [maemo-commits] r19429 - projects/haf/tags/gtk+
- Next message: [maemo-commits] r19431 - projects/haf/trunk/libmatchbox2/debian
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]