summaryrefslogtreecommitdiff
path: root/src/ui/resizepopup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/resizepopup.c')
-rw-r--r--src/ui/resizepopup.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ui/resizepopup.c b/src/ui/resizepopup.c
index f740f236..06b8c5af 100644
--- a/src/ui/resizepopup.c
+++ b/src/ui/resizepopup.c
@@ -27,6 +27,10 @@
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
+#if GTK_CHECK_VERSION(3, 0, 0)
+ #define GTK_WIDGET_REALIZED gtk_widget_get_realized
+#endif
+
struct _MetaResizePopup
{
GtkWidget *size_window;
@@ -126,9 +130,15 @@ update_size_window (MetaResizePopup *popup)
if (GTK_WIDGET_REALIZED (popup->size_window))
{
/* using move_resize to avoid jumpiness */
+ #if GTK_CHECK_VERSION(3, 0, 0)
+ gdk_window_move_resize (gtk_widget_get_window(GTK_WIDGET(popup->size_window)),
+ x, y,
+ width, height);
+ #else
gdk_window_move_resize (popup->size_window->window,
x, y,
width, height);
+ #endif
}
else
{
@@ -146,7 +156,11 @@ sync_showing (MetaResizePopup *popup)
gtk_widget_show (popup->size_window);
if (popup->size_window && GTK_WIDGET_REALIZED (popup->size_window))
+ #if GTK_CHECK_VERSION(3, 0, 0)
+ gdk_window_raise (gtk_widget_get_window(GTK_WIDGET(popup->size_window)));
+ #else
gdk_window_raise (popup->size_window->window);
+ #endif
}
else
{