summaryrefslogtreecommitdiff
path: root/applets
diff options
context:
space:
mode:
Diffstat (limited to 'applets')
-rw-r--r--applets/clock/clock-face.c3
-rw-r--r--applets/notification_area/na-tray-child.c12
-rw-r--r--applets/wncklet/window-list.c12
3 files changed, 27 insertions, 0 deletions
diff --git a/applets/clock/clock-face.c b/applets/clock/clock-face.c
index fe944a12..333af62f 100644
--- a/applets/clock/clock-face.c
+++ b/applets/clock/clock-face.c
@@ -224,6 +224,9 @@ draw (GtkWidget *this, cairo_t *cr)
cairo_stroke (cr);
cairo_restore (cr);
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+ return FALSE;
+#endif
}
#if !GTK_CHECK_VERSION (3, 0, 0)
diff --git a/applets/notification_area/na-tray-child.c b/applets/notification_area/na-tray-child.c
index 93ac4bb8..d214f587 100644
--- a/applets/notification_area/na-tray-child.c
+++ b/applets/notification_area/na-tray-child.c
@@ -308,7 +308,11 @@ na_tray_child_new (GdkScreen *screen,
gdk_error_trap_push ();
result = XGetWindowAttributes (xdisplay, icon_window,
&window_attributes);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_error_trap_pop ();
+#endif
if (!result) /* Window already gone */
return NULL;
@@ -508,7 +512,11 @@ na_tray_child_force_redraw (NaTrayChild *child)
* since that is asynchronous.
*/
XSync (xdisplay, False);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_error_trap_pop ();
+#endif
#else
/* Hiding and showing is the safe way to do it, but can result in more
* flickering.
@@ -552,7 +560,11 @@ _get_wmclass (Display *xdisplay,
gdk_error_trap_push ();
XGetClassHint (xdisplay, xwindow, &ch);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ gdk_error_trap_pop_ignored ();
+#else
gdk_error_trap_pop ();
+#endif
if (res_class)
*res_class = NULL;
diff --git a/applets/wncklet/window-list.c b/applets/wncklet/window-list.c
index 561658df..dfa571fb 100644
--- a/applets/wncklet/window-list.c
+++ b/applets/wncklet/window-list.c
@@ -331,14 +331,22 @@ static void setup_gsettings(TasklistData* tasklist)
tasklist);
}
+#if GTK_CHECK_VERSION (3, 0, 0)
+static void applet_size_allocate(GtkWidget *widget, GtkAllocation *allocation, TasklistData *tasklist)
+#else
static void applet_size_request(GtkWidget* widget, GtkRequisition* requisition, TasklistData* tasklist)
+#endif
{
int len;
const int* size_hints;
+#if !GTK_CHECK_VERSION (3, 0, 0)
GtkRequisition child_req;
+#endif
WnckTasklist* wncktl = WNCK_TASKLIST(tasklist->tasklist);
+#if !GTK_CHECK_VERSION (3, 0, 0)
gtk_widget_get_child_requisition(tasklist->applet, &child_req);
+#endif
size_hints = wnck_tasklist_get_size_hint_list(wncktl, &len);
g_assert(len % 2 == 0);
@@ -447,7 +455,11 @@ gboolean window_list_applet_fill(MatePanelApplet* applet)
g_signal_connect(G_OBJECT(tasklist->tasklist), "destroy", G_CALLBACK(destroy_tasklist), tasklist);
+#if GTK_CHECK_VERSION (3, 0, 0)
+ g_signal_connect(G_OBJECT(tasklist->applet), "size_allocate", G_CALLBACK(applet_size_allocate), tasklist);
+#else
g_signal_connect(G_OBJECT(tasklist->applet), "size_request", G_CALLBACK(applet_size_request), tasklist);
+#endif
tasklist_update(tasklist);
gtk_widget_show(tasklist->tasklist);