diff options
author | Laszlo Boros <[email protected]> | 2013-10-26 14:27:58 +0200 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2013-10-26 14:27:58 +0200 |
commit | 35d540dd3c9269ec39bf3bc10a98b9714963291b (patch) | |
tree | ae76b286839a6d3a6ebe309bdb7884bd35a3698d /src/ui/resizepopup.c | |
parent | 46ba8ca5fc9665c1a4758e56fda6761ac993c62e (diff) | |
download | marco-35d540dd3c9269ec39bf3bc10a98b9714963291b.tar.bz2 marco-35d540dd3c9269ec39bf3bc10a98b9714963291b.tar.xz |
Starting to add GTK3 support
Diffstat (limited to 'src/ui/resizepopup.c')
-rw-r--r-- | src/ui/resizepopup.c | 14 |
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 { |