[maemo-commits] [maemo-commits] r19006 - in projects/haf/trunk/libmatchbox2: . matchbox/core
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Tue Jul 28 19:59:21 EEST 2009
- Previous message: [maemo-commits] r19005 - projects/haf/trunk/libmatchbox2/debian
- Next message: [maemo-commits] r19007 - in projects/haf/tags/ke-recv/3.19-3: debian src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: aendrodi Date: 2009-07-28 19:59:15 +0300 (Tue, 28 Jul 2009) New Revision: 19006 Modified: projects/haf/trunk/libmatchbox2/ChangeLog projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c Log: * matchbox/core/mb-wm-client-window.c (mb_wm_client_window_sync_properties): Blogged about the monster hack. Modified: projects/haf/trunk/libmatchbox2/ChangeLog =================================================================== --- projects/haf/trunk/libmatchbox2/ChangeLog 2009-07-28 12:57:35 UTC (rev 19005) +++ projects/haf/trunk/libmatchbox2/ChangeLog 2009-07-28 16:59:15 UTC (rev 19006) @@ -1,3 +1,9 @@ +2009-07-28 Adam Endrodi <adam.endrodi at blumsoft.eu> + + * matchbox/core/mb-wm-client-window.c + (mb_wm_client_window_sync_properties): + Blogged about the monster hack. + 2009-07-28 Kimmo Hämäläinen <kimmo.hamalainen at nokia.com> Release 0.2.52 Modified: projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c =================================================================== --- projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c 2009-07-28 12:57:35 UTC (rev 19005) +++ projects/haf/trunk/libmatchbox2/matchbox/core/mb-wm-client-window.c 2009-07-28 16:59:15 UTC (rev 19006) @@ -602,7 +602,56 @@ goto abort; } - /* FIXME: Monster Hack to make Browser visible (800x480 was a problem) */ + /* + * FIXME: Monster Hack to make Browser visible (800x480 was a problem) + * + * This is a poetic FIXME. Simply removing this hack has far-reaching + * consequences, which have even more consequences. Let's consider the + * case of Marbles, our most usable application. + * + * Marbles is written with SDL and has a game startup window, + * stacked like this: startup window -> input window -> SDL fullscreen + * window. The former two are regular application windows, the latter + * is an override-redirected one covering the whole screen but is NOT + * fullscreen (doesn't have the flag). + * + * When the input window is mapped this hack kicks in and sets the + * win->geometry to 799x479, removing it leaves it 800x480. Later on + * when the layout manager tries to size and position the new window + * (mb_wm_layout_real_layout_free()) it checks whether win->geometry + * is the same as the desktop size (800x480), and if they match it + * does not request_geometry, effectively not calling MBWMClientTypeApp's + * method. This is a problem because then frame_geometry is left 0x0 + * before realizing the client. And then when MBWMClientBase::realize + * tries to create the 0x0 frame window it naturally fails. + * + * Okay, try removing the hack and make sure mb_wm_layout_real_layout_free() + * always calls mb_wm_client_app_request_geometry() to set up frame_geometry + * so client realization actually succeeds. The next problem is that + * we have a title bar on the top of the SDL fullscreen widow. + * + * Were the hack in effect the SDL fullscreen window would be 799x479, + * but without it it's 800x480. This makes a difference for HDRM, + * which places non-800x480 (clutter geometry!) to app_top, which is + * above the title bar, so the SDL window would hide it. But without + * the hack it's 800x480 and ends up elsewhere, behind the title bar. + * (Talking about "clutter geometry" is important because ordinary + * 800x424 windows's clutter geometry is still 800x480, since the + * frame geometry is what matters...) + * + * We can hack hd_render_manager_set_visibilities() to hide the + * title bar if it encounters a 800x480 window, regardless its + * fullscreen flag. Title bar is gone is Marbles, great. Now, + * try to close the game. To cut it short we'll get an assertion + * failure from tasw because the input window without the hack + * is hidden (clutter-wise). We can work it around in a seemingly + * acceptable way (go to tasw even if the topmost client, which is + * the input window in this case is not clutter-visible), only to + * discover that the title bar workaround broke the camera application. + * + * Seeing all the complexity we must conclude that whoever conceived + * the monster hack must have been a genius. + */ if (win->x_geometry.width >= wm->xdpy_width) win->x_geometry.width = wm->xdpy_width - 1; if (win->x_geometry.height >= wm->xdpy_height)
- Previous message: [maemo-commits] r19005 - projects/haf/trunk/libmatchbox2/debian
- Next message: [maemo-commits] r19007 - in projects/haf/tags/ke-recv/3.19-3: debian src
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]