summaryrefslogtreecommitdiff
path: root/src/ui/ui.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/ui.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/ui.c')
-rw-r--r--src/ui/ui.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/ui/ui.c b/src/ui/ui.c
index 02c88c1c..3c015f0c 100644
--- a/src/ui/ui.c
+++ b/src/ui/ui.c
@@ -463,13 +463,9 @@ meta_ui_map_frame (MetaUI *ui,
{
GdkWindow *window;
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkDisplay *display;
display = gdk_x11_lookup_xdisplay (ui->xdisplay);
window = gdk_x11_window_lookup_for_display (display, xwindow);
-#else
- window = gdk_xid_table_lookup (xwindow);
-#endif
if (window)
gdk_window_show_unraised (window);
@@ -481,13 +477,9 @@ meta_ui_unmap_frame (MetaUI *ui,
{
GdkWindow *window;
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkDisplay *display;
display = gdk_x11_lookup_xdisplay (ui->xdisplay);
window = gdk_x11_window_lookup_for_display (display, xwindow);
-#else
- window = gdk_xid_table_lookup (xwindow);
-#endif
if (window)
gdk_window_hide (window);
@@ -796,11 +788,7 @@ meta_gdk_pixbuf_get_from_pixmap (GdkPixbuf *dest,
cmap = NULL;
#endif
-#if GTK_CHECK_VERSION (3, 0, 0)
drawable = gdk_x11_window_lookup_for_display (gdk_display_get_default (), xpixmap);
-#else
- drawable = gdk_xid_table_lookup (xpixmap);
-#endif
if (drawable)
g_object_ref (G_OBJECT (drawable));
@@ -917,14 +905,10 @@ meta_ui_window_should_not_cause_focus (Display *xdisplay,
{
GdkWindow *window;
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkDisplay *display;
display = gdk_x11_lookup_xdisplay (xdisplay);
window = gdk_x11_window_lookup_for_display (display, xwindow);
-#else
- window = gdk_xid_table_lookup (xwindow);
-#endif
/* we shouldn't cause focus if we're an override redirect
* toplevel which is not foreign
@@ -939,16 +923,13 @@ char*
meta_text_property_to_utf8 (Display *xdisplay,
const XTextProperty *prop)
{
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkDisplay *display;
-#endif
char **list;
int count;
char *retval;
list = NULL;
-#if GTK_CHECK_VERSION (3, 0, 0)
display = gdk_x11_lookup_xdisplay (xdisplay);
count = gdk_text_property_to_utf8_list_for_display (display,
gdk_x11_xatom_to_atom_for_display (display, prop->encoding),
@@ -956,13 +937,6 @@ meta_text_property_to_utf8 (Display *xdisplay,
prop->value,
prop->nitems,
&list);
-#else
- count = gdk_text_property_to_utf8_list (gdk_x11_xatom_to_atom (prop->encoding),
- prop->format,
- prop->value,
- prop->nitems,
- &list);
-#endif
if (count == 0)
retval = NULL;
@@ -1219,13 +1193,9 @@ meta_ui_window_is_widget (MetaUI *ui,
{
GdkWindow *window;
-#if GTK_CHECK_VERSION (3, 0, 0)
GdkDisplay *display;
display = gdk_x11_lookup_xdisplay (ui->xdisplay);
window = gdk_x11_window_lookup_for_display (display, xwindow);
-#else
- window = gdk_xid_table_lookup (xwindow);
-#endif
if (window)
{