diff options
author | Yu Ke <ke.yu@intel.com> | 2011-03-06 16:18:30 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-03-16 13:54:21 +0000 |
commit | a4c6bcb895cb7888b5045ed76f96f056acd7b4ab (patch) | |
tree | 31648944911f26823351c7defca17cdc28edf0fa /meta/recipes-sato/matchbox-desktop/files | |
parent | 9a1ee6de17b795f81a198f71fa004b8b02dee753 (diff) | |
download | poky-a4c6bcb895cb7888b5045ed76f96f056acd7b4ab.tar.gz |
matchbox-desktop: add configure event handler to fix bug 658
Bug658 - "the bottom icons on Applications and All screen are cut-off in qemu"
the reason is that desktop work area is not resized after window manager
decoration. so add configure event handler to resize the desktop work area
can fix this issue.
[YOCTO #658]
(From OE-Core rev: 79f160a7ac9426ec9952f7a9c40190da8b95c88d)
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-sato/matchbox-desktop/files')
-rw-r--r-- | meta/recipes-sato/matchbox-desktop/files/window-resize-fix.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-sato/matchbox-desktop/files/window-resize-fix.patch b/meta/recipes-sato/matchbox-desktop/files/window-resize-fix.patch new file mode 100644 index 0000000000..87fbd50205 --- /dev/null +++ b/meta/recipes-sato/matchbox-desktop/files/window-resize-fix.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | commit 2ef9a98cbda46b5a52e20ce292eebd6ba1f3c3a8 | ||
2 | Author: Yu Ke <ke.yu@intel.com> | ||
3 | Date: Sun Mar 6 17:58:45 2011 +0800 | ||
4 | |||
5 | desktop: Add configure event handler for desktop resize | ||
6 | |||
7 | desktop need to resize its work area when window manager decorate its | ||
8 | window. Originally it is done by the hook in root window PropertyNotify | ||
9 | event handler, i.e. net_workarea_changed () routine. However, for unknown | ||
10 | reason, the PropertyNotify event does not deliver to the root window, | ||
11 | thus this routine does not work. | ||
12 | |||
13 | this patch fix this issue from another side. Since window manager will also | ||
14 | send configure event to desktop window after decoration, it also works to do | ||
15 | it in configure event handler. | ||
16 | |||
17 | Signed-off-by: Yu Ke <ke.yu@intel.com> | ||
18 | |||
19 | diff --git a/src/desktop.c b/src/desktop.c | ||
20 | index d4fc2fb..5aa2cfc 100644 | ||
21 | --- a/src/desktop.c | ||
22 | +++ b/src/desktop.c | ||
23 | @@ -130,6 +130,15 @@ workarea_changed (int x, int y, int w, int h) | ||
24 | gtk_fixed_move (GTK_FIXED (fixed), box, x, y); | ||
25 | } | ||
26 | |||
27 | +static gboolean | ||
28 | +desktop_configure_callback(GtkWindow *window, | ||
29 | + GdkEvent *event, gpointer data) | ||
30 | +{ | ||
31 | + gtk_widget_set_size_request (box, event->configure.width, event->configure.height); | ||
32 | + gtk_widget_queue_resize (box); | ||
33 | + return FALSE; | ||
34 | +} | ||
35 | + | ||
36 | GtkWidget * | ||
37 | create_desktop (void) | ||
38 | { | ||
39 | @@ -176,6 +185,9 @@ create_desktop (void) | ||
40 | /* Set a sane default in case there is no work area defined yet */ | ||
41 | workarea_changed (0, 0, screen_w, screen_h); | ||
42 | |||
43 | + g_signal_connect(G_OBJECT(window), "configure-event", | ||
44 | + G_CALLBACK(desktop_configure_callback), NULL); | ||
45 | + | ||
46 | #ifdef STANDALONE | ||
47 | /* TODO: fake workarea_changed calls on window resize */ | ||
48 | #else | ||