From 14d288511323d4f384d4764ab25a42693ff19f4a Mon Sep 17 00:00:00 2001 From: Javier Date: Sat, 17 May 2014 19:53:53 +0200 Subject: gtk3 client library + module now hackishly working --- libtopmenu-server/Makefile.am | 19 +++++++++++++++---- libtopmenu-server/topmenu-widget.c | 2 +- libtopmenu-server/topmenu-widget.h | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) (limited to 'libtopmenu-server') diff --git a/libtopmenu-server/Makefile.am b/libtopmenu-server/Makefile.am index 8a17f5f..98de595 100644 --- a/libtopmenu-server/Makefile.am +++ b/libtopmenu-server/Makefile.am @@ -1,7 +1,18 @@ -lib_LTLIBRARIES = libtopmenu-server.la -libtopmenu_server_la_SOURCES = topmenu-server.c topmenu-server.h topmenu-widget.c topmenu-widget.h -libtopmenu_server_la_CPPFLAGS = $(GTK_CFLAGS) $(WNCK_CFLAGS) $(MATEWNCK_CFLAGS) -DG_LOG_DOMAIN=\"topmenu-server\" -libtopmenu_server_la_LIBADD = $(GTK_LIBS) $(WNCK_LIBS) $(MATEWNCK_LIBS) +if GTK3 + +lib_LTLIBRARIES = libtopmenu-server-gtk3.la +libtopmenu_server_gtk3_la_SOURCES = topmenu-server.c topmenu-server.h topmenu-widget.c topmenu-widget.h +libtopmenu_server_gtk3_la_CPPFLAGS = $(GTK_CFLAGS) $(WNCK_CFLAGS) $(MATEWNCK_CFLAGS) -DG_LOG_DOMAIN=\"topmenu-server\" +libtopmenu_server_gtk3_la_LIBADD = $(GTK_LIBS) $(WNCK_LIBS) $(MATEWNCK_LIBS) + +else + +lib_LTLIBRARIES = libtopmenu-server-gtk2.la +libtopmenu_server_gtk2_la_SOURCES = topmenu-server.c topmenu-server.h topmenu-widget.c topmenu-widget.h +libtopmenu_server_gtk2_la_CPPFLAGS = $(GTK_CFLAGS) $(WNCK_CFLAGS) $(MATEWNCK_CFLAGS) -DG_LOG_DOMAIN=\"topmenu-server\" +libtopmenu_server_gtk2_la_LIBADD = $(GTK_LIBS) $(WNCK_LIBS) $(MATEWNCK_LIBS) + +endif include_HEADERS = topmenu-server.h topmenu-widget.h diff --git a/libtopmenu-server/topmenu-widget.c b/libtopmenu-server/topmenu-widget.c index 8121fc5..e4c51de 100644 --- a/libtopmenu-server/topmenu-widget.c +++ b/libtopmenu-server/topmenu-widget.c @@ -123,7 +123,7 @@ static void topmenu_widget_embed_topmenu_window(TopMenuWidget *self, Window wind GdkWindow *cur = gtk_socket_get_plug_window(self->socket); if (cur) { - if (gdk_x11_window_get_xid(cur) == window) { + if (GDK_WINDOW_XID(cur) == window) { // Trying to embed the same client again return; // Nothing to do } diff --git a/libtopmenu-server/topmenu-widget.h b/libtopmenu-server/topmenu-widget.h index 19d9784..1634bcc 100644 --- a/libtopmenu-server/topmenu-widget.h +++ b/libtopmenu-server/topmenu-widget.h @@ -3,7 +3,7 @@ #include -#if GTK_VERSION == 3 +#if GTK_MAJOR_VERSION == 3 #include #endif -- cgit v1.2.3