[maemo-commits] [maemo-commits] r19105 - in projects/haf/trunk/libmatchbox2: . debian matchbox/core
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Aug 11 10:52:00 EEST 2009
- Previous message: [maemo-commits] r19104 - projects/haf/trunk/clutter0.8/debian
- Next message: [maemo-commits] r19106 - projects/haf/tags/libmatchbox2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: kihamala Date: 2009-08-11 10:51:57 +0300 (Tue, 11 Aug 2009) New Revision: 19105 Modified: projects/haf/trunk/libmatchbox2/ChangeLog projects/haf/trunk/libmatchbox2/debian/changelog projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c Log: apply the focus fix Modified: projects/haf/trunk/libmatchbox2/ChangeLog =================================================================== --- projects/haf/trunk/libmatchbox2/ChangeLog 2009-08-11 06:52:06 UTC (rev 19104) +++ projects/haf/trunk/libmatchbox2/ChangeLog 2009-08-11 07:51:57 UTC (rev 19105) @@ -1,3 +1,12 @@ +2009-08-11 Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> + + Release 0.2.56 + + * matchbox/core/mb-wm-client-base.c (mb_wm_client_base_display_sync): + Take WM_TAKE_FOCUS protocol into account when assigning the focus. + Fixes: NB#131838 - focus is not correctly set when navigating back to + previous window stack + 2009-08-10 Gordon Williams <gordon.williams at collabora.co.uk> Fixes regression NB#131580 on new Gtk - Solid home applets @@ -3,5 +12,5 @@ * matchbox/core/mb-wm-types.h - * matchbox/core/mb-wm-atoms.c + * matchbox/core/mb-wm-atoms.c * matchbox/core/mb-wm-client.c: Revert RGBA Sapwood changes that search for the MAEMO_IGNORE_ALPHA Modified: projects/haf/trunk/libmatchbox2/debian/changelog =================================================================== --- projects/haf/trunk/libmatchbox2/debian/changelog 2009-08-11 06:52:06 UTC (rev 19104) +++ projects/haf/trunk/libmatchbox2/debian/changelog 2009-08-11 07:51:57 UTC (rev 19105) @@ -1,9 +1,14 @@ -matchbox-window-manager-2 (0.2.56-1~unreleased) unstable; urgency=low +matchbox-window-manager-2 (0.2.56-1) unstable; urgency=low - * foo + Gordon: + * Fixes: NB#131580 - Solid home applets - -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> Mon, 10 Aug 2009 15:05:57 +0300 + Kimmo: + * Fixes: NB#131838 - focus is not correctly set when navigating back to + previous window stack + -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> Tue, 11 Aug 2009 10:49:51 +0300 + matchbox-window-manager-2 (0.2.55-1) unstable; urgency=low Laszlo: Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c 2009-08-11 06:52:06 UTC (rev 19104) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-base.c 2009-08-11 07:51:57 UTC (rev 19105) @@ -515,7 +515,38 @@ return attr.map_state == IsViewable; } +/* Set focus while taking into account the WM_TAKE_FOCUS protocol */ +static Bool +mb_wm_client_set_focus (MBWindowManagerClient *client) +{ + MBWindowManager *wm = client->wmref; + Window xwin = client->window->xwindow; + gboolean success = True; + if (client->window->protos & MBWMClientWindowProtosFocus) + { + /*g_printerr ("sending XEvent WM_TAKE_FOCUS to %lu\n", xwin); */ + + success = mb_wm_client_deliver_message + (client, + wm->atoms[MBWM_ATOM_WM_PROTOCOLS], + wm->atoms[MBWM_ATOM_WM_TAKE_FOCUS], + /* FIXME: The spec explicitly says not to use CurrentTime in l[1]. + * It works, but we shouldn't do it. + * (This will involve storing a per-display event timestamp, or a + * round trip to get the time.) + */ + CurrentTime, 0, 0, 0); + } + else + { + /*g_printerr ("calling XSetInputFocus directly for %lu\n", xwin);*/ + + XSetInputFocus(wm->xdpy, xwin, RevertToPointerRoot, CurrentTime); + } + return success; +} + static void mb_wm_client_base_display_sync (MBWindowManagerClient *client) { @@ -591,9 +622,7 @@ * we need to reset the focus to RevertToPointerRoot, since the * focus was lost during the implicit unmap. */ - XSetInputFocus (wm->xdpy, client->window->xwindow, - RevertToPointerRoot, CurrentTime); - + mb_wm_client_set_focus (client); } } @@ -833,7 +862,7 @@ static Window last_focused = None; Window xwin = client->window->xwindow; MBWindowManager *wm = client->wmref; - gboolean success = True; + gboolean success; if (!mb_wm_client_want_focus (client)) return False; @@ -848,29 +877,8 @@ return False; } - if (client->window->protos & MBWMClientWindowProtosFocus) - { - MBWM_NOTE (CLIENT, "sending XEvent WM_TAKE_FOCUS to %x", xwin); + success = mb_wm_client_set_focus (client); - success = mb_wm_client_deliver_message - (client, - wm->atoms[MBWM_ATOM_WM_PROTOCOLS], - wm->atoms[MBWM_ATOM_WM_TAKE_FOCUS], - /* FIXME: The spec explicitly says not to use CurrentTime in l[1]. - * It works, but we shouldn't do it. - * (This will involve storing a per-display event timestamp, or a - * round trip to get the time.) - */ - CurrentTime, - 0, 0, 0); - } - else - { - MBWM_NOTE (CLIENT, "calling XSetInputFocus directly for %x", xwin); - - XSetInputFocus(wm->xdpy, xwin, RevertToPointerRoot, CurrentTime); - } - XChangeProperty(wm->xdpy, wm->root_win->xwindow, wm->atoms[MBWM_ATOM_NET_ACTIVE_WINDOW], XA_WINDOW, 32, PropModeReplace,
- Previous message: [maemo-commits] r19104 - projects/haf/trunk/clutter0.8/debian
- Next message: [maemo-commits] r19106 - projects/haf/tags/libmatchbox2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]