summaryrefslogtreecommitdiff
path: root/src/ui/resizepopup.c
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-10-25 12:35:42 +0200
committerinfirit <[email protected]>2014-10-25 12:35:42 +0200
commit20615934a9d4faf8cd45de56c51357d985461267 (patch)
treeadbb76e5fb32a72f51b0e4a6163c52b6a3d140b7 /src/ui/resizepopup.c
parent4134fe7aaf52512403e5a1319ed61fab0ce288d8 (diff)
downloadmarco-20615934a9d4faf8cd45de56c51357d985461267.tar.bz2
marco-20615934a9d4faf8cd45de56c51357d985461267.tar.xz
Cleanup GTK_CHECK_VERSION and unify where possible
gdk_x11_window_lookup_for_display since 2.24 GDK_WINDOW_XID since always gtk_widget_get_visible since 2.18 gtk_widget_set_mapped since 2.20 gdk_event_new since 2.2 gdk_x11_window_lookup_for_display since 2.24 gdk_text_property_to_utf8_list_for_display since 2.2 gtk_widget_get_realized since 2.20 gdk_visual_get_depth since 2.22 gtk_widget_get_window since 2.14 gtk_widget_set_allocation since 2.18
Diffstat (limited to 'src/ui/resizepopup.c')
-rw-r--r--src/ui/resizepopup.c18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/ui/resizepopup.c b/src/ui/resizepopup.c
index 9f9137b8..7dc6ec5a 100644
--- a/src/ui/resizepopup.c
+++ b/src/ui/resizepopup.c
@@ -27,10 +27,6 @@
#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;
@@ -127,18 +123,12 @@ update_size_window (MetaResizePopup *popup)
x = popup->rect.x + (popup->rect.width - width) / 2;
y = popup->rect.y + (popup->rect.height - height) / 2;
- if (GTK_WIDGET_REALIZED (popup->size_window))
+ if (gtk_widget_get_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
{
@@ -155,12 +145,8 @@ sync_showing (MetaResizePopup *popup)
if (popup->size_window)
gtk_widget_show (popup->size_window);
- if (popup->size_window && GTK_WIDGET_REALIZED (popup->size_window))
- #if GTK_CHECK_VERSION(3, 0, 0)
+ if (popup->size_window && gtk_widget_get_realized (popup->size_window))
gdk_window_raise (gtk_widget_get_window(GTK_WIDGET(popup->size_window)));
- #else
- gdk_window_raise (popup->size_window->window);
- #endif
}
else
{