summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2014-02-17 18:56:41 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2014-02-17 20:17:47 +0100
commit47bb5c6903d546c5227341205862f35a7f06ce92 (patch)
tree94b5a21bc6897aefaacc8b863c8b08586e655a77
parent4f6f573f4d7e3812eae1450956e12573dd68cab4 (diff)
downloadgraynard-47bb5c6903d546c5227341205862f35a7f06ce92.tar.gz
graynard-47bb5c6903d546c5227341205862f35a7f06ce92.zip
shell: add event boxes around app widgets to not lose enter/leave events
-rw-r--r--shell/gtk-shell.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/shell/gtk-shell.c b/shell/gtk-shell.c
index feffb1e..6c17fcd 100644
--- a/shell/gtk-shell.c
+++ b/shell/gtk-shell.c
@@ -281,7 +281,7 @@ panel_create(struct desktop *desktop)
{
GdkWindow *gdk_window;
struct element *panel;
- GtkWidget *box1, *button;
+ GtkWidget *box1, *ebox, *button;
GtkWidget *image; /* TODO */
panel = malloc(sizeof *panel);
@@ -321,13 +321,19 @@ panel_create(struct desktop *desktop)
gtk_box_pack_start (GTK_BOX (box1), image, FALSE, FALSE, 0);
/* favourites */
- gtk_box_pack_start (GTK_BOX (box1), weston_gtk_favorites_new (), FALSE, FALSE, 0);
+ ebox = gtk_event_box_new ();
+ gtk_box_pack_start (GTK_BOX (box1), ebox, FALSE, FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (ebox), weston_gtk_favorites_new ());
+ g_queue_push_tail (desktop->panel_widgets, ebox);
/* menu */
+ ebox = gtk_event_box_new ();
+ gtk_box_pack_end (GTK_BOX (box1), ebox, FALSE, FALSE, 0);
button = weston_gtk_app_icon_new ("view-grid-symbolic");
g_signal_connect (button, "clicked",
G_CALLBACK (launcher_grid_toggle), desktop);
- gtk_box_pack_end (GTK_BOX (box1), button, FALSE, FALSE, 0);
+ gtk_container_add (GTK_CONTAINER (ebox), button);
+ g_queue_push_tail (desktop->panel_widgets, ebox);
/* set it up as the panel */
gdk_window = gtk_widget_get_window(panel->window);