aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2014-05-24 19:38:00 +0200
committerJavier <dev.git@javispedro.com>2014-05-24 19:38:00 +0200
commit96b576bad7bba88fedd41a963430073404c6514a (patch)
tree230984ba5e102a88d53bbfba1a78205c1f0e908e
parent4c02d3a0ce08aab4e4b89b4eee7a72145e66c33a (diff)
downloadtopmenu-gtk-96b576bad7bba88fedd41a963430073404c6514a.tar.gz
topmenu-gtk-96b576bad7bba88fedd41a963430073404c6514a.zip
fix some warnings
-rw-r--r--libtopmenu-server/topmenu-widget.c8
-rw-r--r--test/client.c6
2 files changed, 10 insertions, 4 deletions
diff --git a/libtopmenu-server/topmenu-widget.c b/libtopmenu-server/topmenu-widget.c
index e4c51de..05a2895 100644
--- a/libtopmenu-server/topmenu-widget.c
+++ b/libtopmenu-server/topmenu-widget.c
@@ -68,7 +68,11 @@ static Window topmenu_widget_get_current_active_window(TopMenuWidget *self)
{
#ifdef HAVE_MATEWNCK
MatewnckWindow *window = matewnck_screen_get_active_window(self->priv->screen);
- return matewnck_window_get_xid(window);
+ if (window) {
+ return matewnck_window_get_xid(window);
+ } else {
+ return None;
+ }
#else
return None;
#endif
@@ -129,7 +133,7 @@ static void topmenu_widget_embed_topmenu_window(TopMenuWidget *self, Window wind
}
// Otherwise, disembed the current client
- g_debug("Pulling the plug");
+ g_debug("Disembedding window 0x%lx", GDK_WINDOW_XID(cur));
gdk_window_hide(cur);
// Reparent back to root window to end embedding
diff --git a/test/client.c b/test/client.c
index 8aff036..6334de1 100644
--- a/test/client.c
+++ b/test/client.c
@@ -49,9 +49,11 @@ GtkWindow * create_main_window()
GtkVBox *box = GTK_VBOX(gtk_vbox_new(FALSE, 0));
GtkLabel *label = GTK_LABEL(gtk_label_new("Hello World"));
+#if 0
GtkWidget *bar = create_menu_bar();
-
gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(bar), FALSE, FALSE, 0);
+#endif
+
gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(label), TRUE, TRUE, 0);
gtk_container_add(GTK_CONTAINER(win), GTK_WIDGET(box));
@@ -68,7 +70,7 @@ int main(int argc, char **argv)
gtk_widget_realize(GTK_WIDGET(mainwin));
-#if 0
+#if 1
topmenu_client_connect_window_widget(gtk_widget_get_window(GTK_WIDGET(mainwin)),
create_menu_bar());
#endif