GtkWindow will default to 200 height on realize unless we request
otherwise  before that. On the other hand, struts can only be set
after the window has been realized.

Signed-off-by: Jussi Kukkonen <[email protected]>
---
 matchbox-panel/mb-panel.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/matchbox-panel/mb-panel.c b/matchbox-panel/mb-panel.c
index 3f7e3b4..4f5fb74 100644
--- a/matchbox-panel/mb-panel.c
+++ b/matchbox-panel/mb-panel.c
@@ -387,8 +387,6 @@ main (int argc, char **argv)
                 gtk_window_set_accept_focus (GTK_WINDOW (window), FALSE);
         }
 
-        gtk_widget_realize (window);
-
         /* Set size */
         switch (mode) {
         case MODE_DOCK:
@@ -427,8 +425,6 @@ main (int argc, char **argv)
                                          screen_geom.x,
                                          screen_geom.y + screen_geom.height - 
size);
                 }
-
-                set_struts (window, edge, size);
                 break;
         case MODE_TITLEBAR:
                 /* TODO */
@@ -453,6 +449,10 @@ main (int argc, char **argv)
                 break;
         }
 
+        gtk_widget_realize (window);
+        if (mode == MODE_DOCK)
+               set_struts (window, edge, size);
+
         /* Add frame */
         frame = gtk_frame_new (NULL);
         gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
-- 
2.8.1

-- 
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to