aboutsummaryrefslogtreecommitdiff
path: root/libtopmenu-server
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2014-03-15 19:00:17 +0100
committerJavier <dev.git@javispedro.com>2014-03-15 19:00:17 +0100
commitfae72947043ae3b1627dac77b3c42bf2e1dbbd09 (patch)
tree43d90ae5e1f0f70db2ddd16ae6acbb101b92a2d8 /libtopmenu-server
parentcecc7efece527e09afdfb59dc24cbf6086bd2654 (diff)
downloadtopmenu-gtk-fae72947043ae3b1627dac77b3c42bf2e1dbbd09.tar.gz
topmenu-gtk-fae72947043ae3b1627dac77b3c42bf2e1dbbd09.zip
start porting to gtk3
Diffstat (limited to 'libtopmenu-server')
-rw-r--r--libtopmenu-server/topmenu-widget.c21
-rw-r--r--libtopmenu-server/topmenu-widget.h4
2 files changed, 5 insertions, 20 deletions
diff --git a/libtopmenu-server/topmenu-widget.c b/libtopmenu-server/topmenu-widget.c
index 0d21be6..8121fc5 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_WINDOW_XWINDOW(cur) == window) {
+ if (gdk_x11_window_get_xid(cur) == window) {
// Trying to embed the same client again
return; // Nothing to do
}
@@ -315,23 +315,6 @@ static void topmenu_widget_unmap(GtkWidget *widget)
GTK_WIDGET_CLASS(topmenu_widget_parent_class)->unmap(widget);
}
-static void topmenu_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation)
-{
- TopMenuWidget *self = TOPMENU_WIDGET(widget);
- if (self->socket) {
- gtk_widget_size_allocate(GTK_WIDGET(self->socket), allocation);
- }
- GTK_WIDGET_CLASS(topmenu_widget_parent_class)->size_allocate(widget, allocation);
-}
-
-static void topmenu_widget_size_request(GtkWidget *widget, GtkRequisition *requisition)
-{
- TopMenuWidget *self = TOPMENU_WIDGET(widget);
- if (self->socket) {
- gtk_widget_size_request(GTK_WIDGET(self->socket), requisition);
- }
-}
-
static void topmenu_widget_dispose(GObject *obj)
{
TopMenuWidget *self = TOPMENU_WIDGET(obj);
@@ -355,8 +338,6 @@ static void topmenu_widget_class_init(TopMenuWidgetClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
widget_class->map = topmenu_widget_map;
widget_class->unmap = topmenu_widget_unmap;
- widget_class->size_allocate = topmenu_widget_size_allocate;
- widget_class->size_request = topmenu_widget_size_request;
GObjectClass *obj_class = G_OBJECT_CLASS(klass);
obj_class->dispose = topmenu_widget_dispose;
diff --git a/libtopmenu-server/topmenu-widget.h b/libtopmenu-server/topmenu-widget.h
index b3ea8f8..19d9784 100644
--- a/libtopmenu-server/topmenu-widget.h
+++ b/libtopmenu-server/topmenu-widget.h
@@ -3,6 +3,10 @@
#include <gtk/gtk.h>
+#if GTK_VERSION == 3
+#include <gtk/gtkx.h>
+#endif
+
G_BEGIN_DECLS
#define TOPMENU_TYPE_WIDGET topmenu_widget_get_type()