Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Commits

r19430 - in projects/haf/trunk/libmatchbox2: . matchbox/core

 

 

Maemo commits RSS feed   Index | Next | Previous | View Threaded


subversion at stage

Oct 13, 2009, 1:36 AM

Post #1 of 1 (463 views)
Permalink
r19430 - in projects/haf/trunk/libmatchbox2: . matchbox/core

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>
+
+ 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>

* 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;
}

_______________________________________________
maemo-commits mailing list
maemo-commits [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-commits

Maemo commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.