[gtk+/gdk-backend: 67/91] Clean up gdkx.h a bit
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gdk-backend: 67/91] Clean up gdkx.h a bit
- Date: Sat, 18 Dec 2010 01:11:27 +0000 (UTC)
commit cbb6f2912ec34b4d7d0abdbefac9fb54292069a7
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Dec 15 22:09:35 2010 -0500
Clean up gdkx.h a bit
Moving the direct-access redefinitions of various macros
to gdkprivate-x11.h and use that header throughout in x11/.
Also remove a workaround for a long-fixed X server bug.
gdk/gdkwindow.c | 21 +-------
gdk/x11/gdkapplaunchcontext-x11.c | 3 +-
gdk/x11/gdkasync.c | 2 +-
gdk/x11/gdkcursor-x11.c | 2 -
gdk/x11/gdkdevice-core.c | 2 -
gdk/x11/gdkdevice-xi.c | 3 +-
gdk/x11/gdkdevice-xi2.c | 2 +-
gdk/x11/gdkdevicemanager-core.c | 4 +-
gdk/x11/gdkdevicemanager-x11.c | 3 +-
gdk/x11/gdkdevicemanager-xi.c | 2 +-
gdk/x11/gdkdevicemanager-xi2.c | 3 +-
gdk/x11/gdkdisplay-x11.c | 7 +--
gdk/x11/gdkdnd-x11.c | 3 +-
gdk/x11/gdkeventsource.c | 3 +-
gdk/x11/gdkeventsource.h | 1 -
gdk/x11/gdkeventtranslator.h | 7 ++-
gdk/x11/gdkgeometry-x11.c | 3 +-
gdk/x11/gdkim-x11.c | 2 +-
gdk/x11/gdkkeys-x11.c | 1 -
gdk/x11/gdkmain-x11.c | 7 +--
gdk/x11/gdkprivate-x11.h | 55 ++++++++++++--------
gdk/x11/gdkproperty-x11.c | 5 +-
gdk/x11/gdkscreen-x11.c | 5 +--
gdk/x11/gdkscreen-x11.h | 1 -
gdk/x11/gdkselection-x11.c | 2 -
gdk/x11/gdktestutils-x11.c | 6 +-
gdk/x11/gdkvisual-x11.c | 2 -
gdk/x11/gdkwindow-x11.c | 9 ++--
gdk/x11/gdkx.h | 103 +++++++++++++++---------------------
gdk/x11/gdkxftdefaults.c | 7 +--
gdk/x11/gdkxid.c | 1 -
31 files changed, 116 insertions(+), 161 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 2a35045..c2edde3 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -31,18 +31,14 @@
#include "gdkwindow.h"
-#ifdef GDK_WINDOWING_X11
-#include "x11/gdkx.h" /* For workaround */
-#endif
-
#include "gdkrectangle.h"
#include "gdkinternals.h"
#include "gdkintl.h"
-#include "gdkscreen.h"
+#include "gdkscreenprivate.h"
+#include "gdkdisplayprivate.h"
#include "gdkdeviceprivate.h"
#include "gdkvisualprivate.h"
#include "gdkmarshalers.h"
-#include "gdkscreen.h"
#include "gdkwindowimpl.h"
#include <math.h>
@@ -1340,19 +1336,6 @@ gdk_window_new (GdkWindow *parent,
window->width = (attributes->width > 1) ? (attributes->width) : (1);
window->height = (attributes->height > 1) ? (attributes->height) : (1);
-#ifdef GDK_WINDOWING_X11
- /* Work around a bug where Xorg refuses to map toplevel InputOnly windows
- * from an untrusted client: http://bugs.freedesktop.org/show_bug.cgi?id=6988
- */
- if (attributes->wclass == GDK_INPUT_ONLY &&
- window->parent->window_type == GDK_WINDOW_ROOT &&
- !G_LIKELY (GDK_DISPLAY_X11 (GDK_WINDOW_DISPLAY (parent))->trusted_client))
- {
- g_warning ("Coercing GDK_INPUT_ONLY toplevel window to GDK_INPUT_OUTPUT to work around bug in Xorg server");
- attributes->wclass = GDK_INPUT_OUTPUT;
- }
-#endif
-
if (attributes->wclass == GDK_INPUT_ONLY)
{
/* Backwards compatiblity - we've always ignored
diff --git a/gdk/x11/gdkapplaunchcontext-x11.c b/gdk/x11/gdkapplaunchcontext-x11.c
index 89ed5aa..29c5b31 100644
--- a/gdk/x11/gdkapplaunchcontext-x11.c
+++ b/gdk/x11/gdkapplaunchcontext-x11.c
@@ -23,10 +23,9 @@
#include "config.h"
#include "gdkapplaunchcontextprivate.h"
-
-#include "gdkx.h"
#include "gdkscreen.h"
#include "gdkintl.h"
+#include "gdkprivate-x11.h"
#include <glib.h>
#include <gio/gdesktopappinfo.h>
diff --git a/gdk/x11/gdkasync.c b/gdk/x11/gdkasync.c
index 795438b..b862184 100644
--- a/gdk/x11/gdkasync.c
+++ b/gdk/x11/gdkasync.c
@@ -46,7 +46,7 @@ in this Software without prior written authorization from The Open Group.
#include "config.h"
#include "gdkasync.h"
-#include "gdkx.h"
+#include "gdkprivate-x11.h"
#ifdef NEED_XIPROTO_H_FOR_XREPLY
#include <X11/extensions/XIproto.h>
diff --git a/gdk/x11/gdkcursor-x11.c b/gdk/x11/gdkcursor-x11.c
index b257b61..63de8f4 100644
--- a/gdk/x11/gdkcursor-x11.c
+++ b/gdk/x11/gdkcursor-x11.c
@@ -31,10 +31,8 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include "gdkcursor.h"
-
#include "gdkprivate-x11.h"
#include "gdkdisplay-x11.h"
-#include "gdkx.h"
#include <X11/Xlib.h>
#include <X11/cursorfont.h>
diff --git a/gdk/x11/gdkdevice-core.c b/gdk/x11/gdkdevice-core.c
index e4b35dd..6dbe9f9 100644
--- a/gdk/x11/gdkdevice-core.c
+++ b/gdk/x11/gdkdevice-core.c
@@ -19,14 +19,12 @@
#include "config.h"
-#include "glib.h"
#include "gdkdevice-core.h"
#include "gdkinternals.h"
#include "gdkwindow.h"
#include "gdkprivate-x11.h"
#include "gdkasync.h"
-#include "gdkx.h"
static gboolean gdk_device_core_get_history (GdkDevice *device,
GdkWindow *window,
diff --git a/gdk/x11/gdkdevice-xi.c b/gdk/x11/gdkdevice-xi.c
index 19e8ff1..3ad3cb6 100644
--- a/gdk/x11/gdkdevice-xi.c
+++ b/gdk/x11/gdkdevice-xi.c
@@ -22,11 +22,10 @@
#include "gdkdevice-xi.h"
#include "gdkwindow.h"
+#include "gdkintl.h"
#include "gdkdeviceprivate.h"
#include "gdkprivate-x11.h"
-#include "gdkintl.h"
#include "gdkasync.h"
-#include "gdkx.h"
#define MAX_DEVICE_CLASSES 13
diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c
index 0af7a7e..df7ae1f 100644
--- a/gdk/x11/gdkdevice-xi2.c
+++ b/gdk/x11/gdkdevice-xi2.c
@@ -23,7 +23,7 @@
#include "gdkintl.h"
#include "gdkasync.h"
-#include "gdkx.h"
+#include "gdkprivate-x11.h"
#include <X11/extensions/XInput2.h>
diff --git a/gdk/x11/gdkdevicemanager-core.c b/gdk/x11/gdkdevicemanager-core.c
index 32d5842..521f12b 100644
--- a/gdk/x11/gdkdevicemanager-core.c
+++ b/gdk/x11/gdkdevicemanager-core.c
@@ -21,14 +21,12 @@
#include "gdkdevicemanager-core.h"
-#include "gdktypes.h"
+#include "gdkkeysyms.h"
#include "gdkdevicemanagerprivate.h"
#include "gdkdisplayprivate.h"
#include "gdkeventtranslator.h"
#include "gdkdevice-core.h"
-#include "gdkkeysyms.h"
#include "gdkprivate-x11.h"
-#include "gdkx.h"
#ifdef HAVE_XKB
#include <X11/XKBlib.h>
diff --git a/gdk/x11/gdkdevicemanager-x11.c b/gdk/x11/gdkdevicemanager-x11.c
index cecc82f..25c6100 100644
--- a/gdk/x11/gdkdevicemanager-x11.c
+++ b/gdk/x11/gdkdevicemanager-x11.c
@@ -26,7 +26,8 @@
#include "gdkdevicemanager-xi2.h"
#endif
#endif
-#include "gdkx.h"
+#include "gdkinternals.h"
+#include "gdkprivate-x11.h"
GdkDeviceManager *
_gdk_x11_device_manager_new (GdkDisplay *display)
diff --git a/gdk/x11/gdkdevicemanager-xi.c b/gdk/x11/gdkdevicemanager-xi.c
index 9d8c5bc..9433a1f 100644
--- a/gdk/x11/gdkdevicemanager-xi.c
+++ b/gdk/x11/gdkdevicemanager-xi.c
@@ -24,7 +24,7 @@
#include "gdkeventtranslator.h"
#include "gdkdevice-xi.h"
#include "gdkintl.h"
-#include "gdkx.h"
+#include "gdkprivate-x11.h"
#include <X11/extensions/XInput.h>
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 07f1245..e233a2c 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -21,13 +21,12 @@
#include "gdkdevicemanager-xi2.h"
+#include "gdkkeysyms.h"
#include "gdkdeviceprivate.h"
#include "gdkdisplayprivate.h"
#include "gdkeventtranslator.h"
#include "gdkdevice-xi2.h"
-#include "gdkkeysyms.h"
#include "gdkprivate-x11.h"
-#include "gdkx.h"
#include <string.h>
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index 04475a2..551c754 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -24,20 +24,19 @@
#include "config.h"
-#include "gdkdisplay-x11.h"
-
-#include "gdkx.h"
#include "gdkasync.h"
#include "gdkdisplay.h"
#include "gdkeventsource.h"
#include "gdkeventtranslator.h"
#include "gdkinternals.h"
#include "gdkscreen.h"
-#include "gdkscreen-x11.h"
#include "gdkinternals.h"
#include "gdkdeviceprivate.h"
#include "gdkdevicemanager.h"
#include "xsettings-client.h"
+#include "gdkdisplay-x11.h"
+#include "gdkprivate-x11.h"
+#include "gdkscreen-x11.h"
#include <glib.h>
#include <glib/gprintf.h>
diff --git a/gdk/x11/gdkdnd-x11.c b/gdk/x11/gdkdnd-x11.c
index 50a1cb7..4be4e9c 100644
--- a/gdk/x11/gdkdnd-x11.c
+++ b/gdk/x11/gdkdnd-x11.c
@@ -29,11 +29,10 @@
#include "gdkdndprivate.h"
#include "gdkmain.h"
-#include "gdkx.h"
+#include "gdkinternals.h"
#include "gdkasync.h"
#include "gdkproperty.h"
#include "gdkprivate-x11.h"
-#include "gdkinternals.h"
#include "gdkscreen-x11.h"
#include "gdkdisplay-x11.h"
diff --git a/gdk/x11/gdkeventsource.c b/gdk/x11/gdkeventsource.c
index 8ed81c2..c449d37 100644
--- a/gdk/x11/gdkeventsource.c
+++ b/gdk/x11/gdkeventsource.c
@@ -22,7 +22,8 @@
#include "gdkeventsource.h"
#include "gdkinternals.h"
-#include "gdkx.h"
+#include "gdkwindow-x11.h"
+#include "gdkprivate-x11.h"
static gboolean gdk_event_source_prepare (GSource *source,
diff --git a/gdk/x11/gdkeventsource.h b/gdk/x11/gdkeventsource.h
index b1bf6b2..3bc5fc4 100644
--- a/gdk/x11/gdkeventsource.h
+++ b/gdk/x11/gdkeventsource.h
@@ -21,7 +21,6 @@
#define __GDK_EVENT_SOURCE_H__
#include "gdkeventtranslator.h"
-#include "gdkprivate-x11.h"
G_BEGIN_DECLS
diff --git a/gdk/x11/gdkeventtranslator.h b/gdk/x11/gdkeventtranslator.h
index b93a8c8..933ad66 100644
--- a/gdk/x11/gdkeventtranslator.h
+++ b/gdk/x11/gdkeventtranslator.h
@@ -20,9 +20,10 @@
#ifndef __GDK_EVENT_TRANSLATOR_H__
#define __GDK_EVENT_TRANSLATOR_H__
-#include <gdk/gdktypes.h>
-#include <gdk/gdkdisplay.h>
-#include "gdkprivate-x11.h"
+#include "gdktypes.h"
+#include "gdkdisplay.h"
+
+#include <X11/Xlib.h>
G_BEGIN_DECLS
diff --git a/gdk/x11/gdkgeometry-x11.c b/gdk/x11/gdkgeometry-x11.c
index 1f853f4..29b3e58 100644
--- a/gdk/x11/gdkgeometry-x11.c
+++ b/gdk/x11/gdkgeometry-x11.c
@@ -19,10 +19,9 @@
#include "config.h"
+#include "gdkinternals.h"
#include "gdkrectangle.h"
#include "gdkprivate-x11.h"
-#include "gdkx.h"
-#include "gdkinternals.h"
#include "gdkscreen-x11.h"
#include "gdkdisplay-x11.h"
#include "gdkwindow-x11.h"
diff --git a/gdk/x11/gdkim-x11.c b/gdk/x11/gdkim-x11.c
index 389e653..4d43ea1 100644
--- a/gdk/x11/gdkim-x11.c
+++ b/gdk/x11/gdkim-x11.c
@@ -26,10 +26,10 @@
#include "config.h"
-#include "gdkx.h"
#include "gdkmain.h"
#include "gdkinternals.h"
#include "gdkdisplay-x11.h"
+#include "gdkprivate-x11.h"
#include <locale.h>
#include <stdlib.h>
diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c
index a288346..8ea67ce 100644
--- a/gdk/x11/gdkkeys-x11.c
+++ b/gdk/x11/gdkkeys-x11.c
@@ -30,7 +30,6 @@
#include "gdkkeysyms.h"
#include "gdkprivate-x11.h"
#include "gdkdisplay-x11.h"
-#include "gdkx.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index 2ab6276..a09d589 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -26,13 +26,12 @@
#include "config.h"
-#include "gdkx.h"
+#include "gdkdeviceprivate.h"
+#include "gdkinternals.h"
+#include "gdkintl.h"
#include "gdkasync.h"
#include "gdkdisplay-x11.h"
-#include "gdkinternals.h"
#include "gdkprivate-x11.h"
-#include "gdkintl.h"
-#include "gdkdeviceprivate.h"
#include <glib/gprintf.h>
#include <stdlib.h>
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index e28d5a8..b573b27 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -34,7 +34,9 @@
#include "gdkcursor.h"
#include "gdkprivate.h"
#include "gdkinternals.h"
+#include "gdkx.h"
#include "gdkwindow-x11.h"
+#include "gdkscreen-x11.h"
#include "gdkdisplay-x11.h"
#include <cairo-xlib.h>
@@ -59,18 +61,18 @@ GdkVisualType _gdk_screen_x11_visual_get_best_type (GdkScreen *screen
GdkVisual * _gdk_screen_x11_get_system_visual (GdkScreen *screen);
GdkVisual* _gdk_screen_x11_visual_get_best (GdkScreen *screen);
GdkVisual* _gdk_screen_x11_visual_get_best_with_depth (GdkScreen *screen,
- gint depth);
+ gint depth);
GdkVisual* _gdk_screen_x11_visual_get_best_with_type (GdkScreen *screen,
- GdkVisualType visual_type);
+ GdkVisualType visual_type);
GdkVisual* _gdk_screen_x11_visual_get_best_with_both (GdkScreen *screen,
- gint depth,
- GdkVisualType visual_type);
+ gint depth,
+ GdkVisualType visual_type);
void _gdk_screen_x11_query_depths (GdkScreen *screen,
- gint **depths,
- gint *count);
+ gint **depths,
+ gint *count);
void _gdk_screen_x11_query_visual_types (GdkScreen *screen,
- GdkVisualType **visual_types,
- gint *count);
+ GdkVisualType **visual_types,
+ gint *count);
GList * _gdk_screen_x11_list_visuals (GdkScreen *screen);
@@ -100,11 +102,11 @@ void _gdk_window_process_expose (GdkWindow *window,
GdkRectangle *area);
gboolean _gdk_x11_window_queue_antiexpose (GdkWindow *window,
- cairo_region_t *area);
+ cairo_region_t *area);
void _gdk_x11_window_translate (GdkWindow *window,
- cairo_region_t *area,
- gint dx,
- gint dy);
+ cairo_region_t *area,
+ gint dx,
+ gint dy);
void _gdk_selection_window_destroyed (GdkWindow *window);
gboolean _gdk_selection_filter_clear_event (XSelectionClearEvent *event);
@@ -124,14 +126,14 @@ gboolean _gdk_x11_moveresize_configure_done (GdkDisplay *display,
GdkWindow *window);
void _gdk_keymap_state_changed (GdkDisplay *display,
- XEvent *event);
+ XEvent *event);
void _gdk_keymap_keys_changed (GdkDisplay *display);
gint _gdk_x11_get_group_for_state (GdkDisplay *display,
- GdkModifierType state);
+ GdkModifierType state);
void _gdk_keymap_add_virtual_modifiers_compat (GdkKeymap *keymap,
GdkModifierType *modifiers);
gboolean _gdk_keymap_key_is_modifier (GdkKeymap *keymap,
- guint keycode);
+ guint keycode);
void _gdk_x11_initialize_locale (void);
void _gdk_x11_windowing_init (void);
@@ -189,8 +191,8 @@ void _gdk_x11_display_create_window_impl (GdkDisplay *display,
gint attributes_mask);
void _gdk_x11_precache_atoms (GdkDisplay *display,
- const gchar * const *atom_names,
- gint n_atoms);
+ const gchar * const *atom_names,
+ gint n_atoms);
void _gdk_events_init (GdkDisplay *display);
void _gdk_events_uninit (GdkDisplay *display);
@@ -206,8 +208,8 @@ void _gdk_x11_cursor_display_finalize (GdkDisplay *display);
void _gdk_x11_window_register_dnd (GdkWindow *window);
gboolean _gdk_x11_get_xft_setting (GdkScreen *screen,
- const gchar *name,
- GValue *value);
+ const gchar *name,
+ GValue *value);
GdkGrabStatus _gdk_x11_convert_grab_status (gint status);
@@ -215,7 +217,7 @@ cairo_surface_t * _gdk_x11_window_create_bitmap_surface (GdkWindow *window,
int width,
int height);
-extern gboolean _gdk_use_xshm;
+extern gboolean _gdk_use_xshm;
extern const gint _gdk_x11_event_mask_table[];
extern const gint _gdk_x11_event_mask_table_size;
extern GdkAtom _gdk_selection_property;
@@ -223,10 +225,21 @@ extern gboolean _gdk_synchronize;
#define GDK_SCREEN_DISPLAY(screen) (GDK_SCREEN_X11 (screen)->display)
#define GDK_SCREEN_XROOTWIN(screen) (GDK_SCREEN_X11 (screen)->xroot_window)
-#define GDK_WINDOW_SCREEN(win) (gdk_window_get_screen (win))
+#define GDK_WINDOW_SCREEN(win) (gdk_window_get_screen (win))
#define GDK_WINDOW_DISPLAY(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->display)
#define GDK_WINDOW_XROOTWIN(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->xroot_window)
#define GDK_GC_DISPLAY(gc) (GDK_SCREEN_DISPLAY (GDK_GC_X11(gc)->screen))
#define GDK_WINDOW_IS_X11(win) (GDK_IS_WINDOW_IMPL_X11 ((win)->impl))
+/* override some macros from gdkx.h with direct-access variants */
+#undef GDK_DISPLAY_XDISPLAY
+#undef GDK_WINDOW_XDISPLAY
+#undef GDK_WINDOW_XID
+#undef GDK_SCREEN_XDISPLAY
+
+#define GDK_DISPLAY_XDISPLAY(display) (GDK_DISPLAY_X11(display)->xdisplay)
+#define GDK_WINDOW_XDISPLAY(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->xdisplay)
+#define GDK_WINDOW_XID(win) (GDK_WINDOW_IMPL_X11(GDK_WINDOW (win)->impl)->xid)
+#define GDK_SCREEN_XDISPLAY(screen) (GDK_SCREEN_X11 (screen)->xdisplay)
+
#endif /* __GDK_PRIVATE_X11_H__ */
diff --git a/gdk/x11/gdkproperty-x11.c b/gdk/x11/gdkproperty-x11.c
index ca8a9a2..fdc32a4 100644
--- a/gdk/x11/gdkproperty-x11.c
+++ b/gdk/x11/gdkproperty-x11.c
@@ -27,14 +27,13 @@
#include "config.h"
#include "gdkproperty.h"
-
#include "gdkmain.h"
-#include "gdkx.h"
#include "gdkprivate.h"
#include "gdkinternals.h"
+#include "gdkselection.h"
+#include "gdkprivate-x11.h"
#include "gdkdisplay-x11.h"
#include "gdkscreen-x11.h"
-#include "gdkselection.h"
#include <X11/Xlib.h>
#include <X11/Xatom.h>
diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c
index e703b95..e1ae43e 100644
--- a/gdk/x11/gdkscreen-x11.c
+++ b/gdk/x11/gdkscreen-x11.c
@@ -24,11 +24,8 @@
#include "config.h"
#include "gdkscreen-x11.h"
-
-#include "gdkscreen.h"
-#include "gdkdisplay.h"
#include "gdkdisplay-x11.h"
-#include "gdkx.h"
+#include "gdkprivate-x11.h"
#include <glib.h>
diff --git a/gdk/x11/gdkscreen-x11.h b/gdk/x11/gdkscreen-x11.h
index 2d9e4dd..f8471dc 100644
--- a/gdk/x11/gdkscreen-x11.h
+++ b/gdk/x11/gdkscreen-x11.h
@@ -26,7 +26,6 @@
#include "gdkscreenprivate.h"
#include "gdkvisual.h"
-#include "gdkprivate-x11.h"
#include "xsettings-client.h"
#include <X11/X.h>
#include <X11/Xlib.h>
diff --git a/gdk/x11/gdkselection-x11.c b/gdk/x11/gdkselection-x11.c
index 6ce9ee1..74437f2 100644
--- a/gdk/x11/gdkselection-x11.c
+++ b/gdk/x11/gdkselection-x11.c
@@ -27,8 +27,6 @@
#include "config.h"
#include "gdkselection.h"
-
-#include "gdkx.h"
#include "gdkproperty.h"
#include "gdkprivate.h"
#include "gdkprivate-x11.h"
diff --git a/gdk/x11/gdktestutils-x11.c b/gdk/x11/gdktestutils-x11.c
index d21d321..0068bbe 100644
--- a/gdk/x11/gdktestutils-x11.c
+++ b/gdk/x11/gdktestutils-x11.c
@@ -23,7 +23,7 @@
#include "gdktestutils.h"
#include "gdkkeysyms.h"
-#include "gdkx.h"
+#include "gdkprivate-x11.h"
#include <X11/Xlib.h>
@@ -121,7 +121,7 @@ gdk_test_simulate_key (GdkWindow *window,
xev.type = key_pressrelease == GDK_KEY_PRESS ? KeyPress : KeyRelease;
xev.display = GDK_WINDOW_XDISPLAY (window);
xev.window = GDK_WINDOW_XID (window);
- xev.root = RootWindow (xev.display, GDK_SCREEN_XNUMBER (screen));
+ xev.root = RootWindow (xev.display, GDK_SCREEN_X11 (screen)->screen_num);
xev.subwindow = 0;
xev.time = 0;
xev.x = MAX (x, 0);
@@ -226,7 +226,7 @@ gdk_test_simulate_button (GdkWindow *window,
xev.type = button_pressrelease == GDK_BUTTON_PRESS ? ButtonPress : ButtonRelease;
xev.display = GDK_WINDOW_XDISPLAY (window);
xev.window = GDK_WINDOW_XID (window);
- xev.root = RootWindow (xev.display, GDK_SCREEN_XNUMBER (screen));
+ xev.root = RootWindow (xev.display, GDK_SCREEN_X11 (screen)->screen_num);
xev.subwindow = 0;
xev.time = 0;
xev.x = x;
diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
index 5acff4e..724ec73 100644
--- a/gdk/x11/gdkvisual-x11.c
+++ b/gdk/x11/gdkvisual-x11.c
@@ -27,8 +27,6 @@
#include "config.h"
#include "gdkvisualprivate.h"
-
-#include "gdkx.h"
#include "gdkprivate-x11.h"
#include "gdkscreen-x11.h"
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index d0f8f03..c532bb1 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -29,16 +29,15 @@
#include "gdkwindow-x11.h"
-#include "gdkx.h"
#include "gdkwindow.h"
#include "gdkwindowimpl.h"
-#include "gdkasync.h"
-#include "gdkdisplay-x11.h"
-#include "gdkprivate-x11.h"
#include "gdkvisualprivate.h"
#include "gdkinternals.h"
#include "gdkdeviceprivate.h"
+#include "gdkasync.h"
#include "gdkeventsource.h"
+#include "gdkdisplay-x11.h"
+#include "gdkprivate-x11.h"
#include <stdlib.h>
#include <stdio.h>
@@ -313,7 +312,7 @@ _gdk_x11_window_create_bitmap_surface (GdkWindow *window,
width, height, 1);
surface = cairo_xlib_surface_create_for_bitmap (GDK_WINDOW_XDISPLAY (window),
pixmap,
- GDK_SCREEN_XSCREEN (GDK_WINDOW_SCREEN (window)),
+ GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (window))->xscreen,
width, height);
attach_free_pixmap_handler (surface, GDK_WINDOW_DISPLAY (window), pixmap);
diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
index f9b21c3..7c8c307 100644
--- a/gdk/x11/gdkx.h
+++ b/gdk/x11/gdkx.h
@@ -57,15 +57,16 @@ G_BEGIN_DECLS
Window gdk_x11_window_get_xid (GdkWindow *window);
+void gdk_x11_window_set_user_time (GdkWindow *window,
+ guint32 timestamp);
+void gdk_x11_window_move_to_current_desktop (GdkWindow *window);
+
Display *gdk_x11_cursor_get_xdisplay (GdkCursor *cursor);
Cursor gdk_x11_cursor_get_xcursor (GdkCursor *cursor);
Display *gdk_x11_display_get_xdisplay (GdkDisplay *display);
Visual * gdk_x11_visual_get_xvisual (GdkVisual *visual);
Screen * gdk_x11_screen_get_xscreen (GdkScreen *screen);
int gdk_x11_screen_get_screen_number (GdkScreen *screen);
-void gdk_x11_window_set_user_time (GdkWindow *window,
- guint32 timestamp);
-void gdk_x11_window_move_to_current_desktop (GdkWindow *window);
const char* gdk_x11_screen_get_window_manager_name (GdkScreen *screen);
@@ -97,20 +98,16 @@ gint gdk_x11_get_default_screen (void);
#define GDK_IS_DISPLAY_X11(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), g_type_from_name ("GdkDisplayX11")))
-#ifdef GDK_COMPILATION
-
-#include "gdkprivate-x11.h"
-#include "gdkscreen-x11.h"
-
+#ifndef GDK_MULTIHEAD_SAFE
/**
- * GDK_DISPLAY_XDISPLAY:
- * @display: a #GdkDisplay.
- *
- * Returns the display of a #GdkDisplay.
+ * GDK_ROOT_WINDOW:
*
- * Returns: an Xlib <type>Display*</type>
+ * Obtains the Xlib window id of the root window of the current screen.
*/
-#define GDK_DISPLAY_XDISPLAY(display) (GDK_DISPLAY_X11(display)->xdisplay)
+#define GDK_ROOT_WINDOW() (gdk_x11_get_default_root_xwindow ())
+#endif
+
+#define GDK_DISPLAY_XDISPLAY(display) (gdk_x11_display_get_xdisplay (display))
/**
* GDK_WINDOW_XDISPLAY:
@@ -120,48 +117,36 @@ gint gdk_x11_get_default_screen (void);
*
* Returns: an Xlib <type>Display*</type>.
*/
-#define GDK_WINDOW_XDISPLAY(win) (GDK_SCREEN_X11 (GDK_WINDOW_SCREEN (win))->xdisplay)
-#define GDK_WINDOW_XID(win) (GDK_WINDOW_IMPL_X11(GDK_WINDOW (win)->impl)->xid)
-
-#define GDK_SCREEN_XDISPLAY(screen) (GDK_SCREEN_X11 (screen)->xdisplay)
+#define GDK_WINDOW_XDISPLAY(win) (GDK_DISPLAY_XDISPLAY (gdk_window_get_display (win)))
/**
- * GDK_SCREEN_XSCREEN:
- * @screen: a #GdkScreen
+ * GDK_WINDOW_XID:
+ * @win: a #GdkWindow.
*
- * Returns the screen of a #GdkScreen.
+ * Returns the X window belonging to a #GdkWindow.
*
- * Returns: an Xlib <type>Screen*</type>.
+ * Returns: the Xlib <type>Window</type> of @win.
*/
-#define GDK_SCREEN_XSCREEN(screen) (GDK_SCREEN_X11 (screen)->xscreen)
-#define GDK_SCREEN_XNUMBER(screen) (GDK_SCREEN_X11 (screen)->screen_num)
-
-#else /* GDK_COMPILATION */
+#define GDK_WINDOW_XID(win) (gdk_x11_window_get_xid (win))
-#ifndef GDK_MULTIHEAD_SAFE
/**
- * GDK_ROOT_WINDOW:
+ * GDK_DISPLAY_XDISPLAY:
+ * @display: a #GdkDisplay.
*
- * Obtains the Xlib window id of the root window of the current screen.
+ * Returns the display of a #GdkDisplay.
+ *
+ * Returns: an Xlib <type>Display*</type>
*/
-#define GDK_ROOT_WINDOW() (gdk_x11_get_default_root_xwindow ())
-#endif
-
-#define GDK_DISPLAY_XDISPLAY(display) (gdk_x11_display_get_xdisplay (display))
-
-#define GDK_WINDOW_XDISPLAY(win) (GDK_DISPLAY_XDISPLAY (gdk_window_get_display (win)))
+#define GDK_SCREEN_XDISPLAY(screen) (gdk_x11_display_get_xdisplay (gdk_screen_get_display (screen)))
/**
- * GDK_WINDOW_XID:
- * @win: a #GdkWindow.
+ * GDK_SCREEN_XSCREEN:
+ * @screen: a #GdkScreen
*
- * Returns the X window belonging to a #GdkWindow.
+ * Returns the screen of a #GdkScreen.
*
- * Returns: the Xlib <type>Window</type> of @win.
+ * Returns: an Xlib <type>Screen*</type>.
*/
-#define GDK_WINDOW_XID(win) (gdk_x11_window_get_xid (win))
-
-#define GDK_SCREEN_XDISPLAY(screen) (gdk_x11_display_get_xdisplay (gdk_screen_get_display (screen)))
#define GDK_SCREEN_XSCREEN(screen) (gdk_x11_screen_get_xscreen (screen))
/**
@@ -175,8 +160,6 @@ gint gdk_x11_get_default_screen (void);
*/
#define GDK_SCREEN_XNUMBER(screen) (gdk_x11_screen_get_screen_number (screen))
-#endif /* GDK_COMPILATION */
-
#define GDK_VISUAL_XVISUAL(visual) (gdk_x11_visual_get_xvisual (visual))
GdkVisual* gdk_x11_screen_lookup_visual (GdkScreen *screen,
@@ -190,16 +173,16 @@ void gdk_x11_display_set_startup_notification_id (GdkDisplay *
const gchar *startup_id);
void gdk_x11_display_set_cursor_theme (GdkDisplay *display,
- const gchar *theme,
- const gint size);
+ const gchar *theme,
+ const gint size);
void gdk_x11_display_broadcast_startup_message (GdkDisplay *display,
- const char *message_type,
- ...) G_GNUC_NULL_TERMINATED;
+ const char *message_type,
+ ...) G_GNUC_NULL_TERMINATED;
/* returns TRUE if we support the given WM spec feature */
gboolean gdk_x11_screen_supports_net_wm_hint (GdkScreen *screen,
- GdkAtom property);
+ GdkAtom property);
XID gdk_x11_screen_get_monitor_output (GdkScreen *screen,
gint monitor_num);
@@ -214,14 +197,14 @@ GdkDisplay *gdk_x11_lookup_xdisplay (Display *xdisplay);
/* Functions to get the X Atom equivalent to the GdkAtom */
-Atom gdk_x11_atom_to_xatom_for_display (GdkDisplay *display,
- GdkAtom atom);
-GdkAtom gdk_x11_xatom_to_atom_for_display (GdkDisplay *display,
- Atom xatom);
-Atom gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display,
- const gchar *atom_name);
+Atom gdk_x11_atom_to_xatom_for_display (GdkDisplay *display,
+ GdkAtom atom);
+GdkAtom gdk_x11_xatom_to_atom_for_display (GdkDisplay *display,
+ Atom xatom);
+Atom gdk_x11_get_xatom_by_name_for_display (GdkDisplay *display,
+ const gchar *atom_name);
G_CONST_RETURN gchar *gdk_x11_get_xatom_name_for_display (GdkDisplay *display,
- Atom xatom);
+ Atom xatom);
#ifndef GDK_MULTIHEAD_SAFE
Atom gdk_x11_atom_to_xatom (GdkAtom atom);
GdkAtom gdk_x11_xatom_to_atom (Atom xatom);
@@ -229,8 +212,8 @@ Atom gdk_x11_get_xatom_by_name (const gchar *atom_name);
G_CONST_RETURN gchar *gdk_x11_get_xatom_name (Atom xatom);
#endif
-void gdk_x11_display_grab (GdkDisplay *display);
-void gdk_x11_display_ungrab (GdkDisplay *display);
+void gdk_x11_display_grab (GdkDisplay *display);
+void gdk_x11_display_ungrab (GdkDisplay *display);
void gdk_x11_display_error_trap_push (GdkDisplay *display);
/* warn unused because you could use pop_ignored otherwise */
@@ -238,8 +221,8 @@ G_GNUC_WARN_UNUSED_RESULT gint gdk_x11_display_error_trap_pop (GdkDispla
void gdk_x11_display_error_trap_pop_ignored (GdkDisplay *display);
void gdk_x11_register_standard_event_type (GdkDisplay *display,
- gint event_base,
- gint n_events);
+ gint event_base,
+ gint n_events);
void gdk_x11_set_sm_client_id (const gchar *sm_client_id);
diff --git a/gdk/x11/gdkxftdefaults.c b/gdk/x11/gdkxftdefaults.c
index 0cc9972..850c33f 100644
--- a/gdk/x11/gdkxftdefaults.c
+++ b/gdk/x11/gdkxftdefaults.c
@@ -54,7 +54,7 @@
#endif
#include <gdkscreen-x11.h>
-#include <gdkx.h>
+#include <gdkprivate-x11.h>
static gint
parse_boolean (char *v)
@@ -153,7 +153,6 @@ init_xft_settings (GdkScreen *screen)
{
GdkScreenX11 *screen_x11 = GDK_SCREEN_X11 (screen);
Display *xdisplay = GDK_SCREEN_XDISPLAY (screen);
- int xscreen = GDK_SCREEN_XNUMBER (screen);
double dpi_double;
if (screen_x11->xft_init)
@@ -174,8 +173,8 @@ init_xft_settings (GdkScreen *screen)
screen_x11->xft_rgba = FC_RGBA_UNKNOWN;
if (!get_double_default (xdisplay, "dpi", &dpi_double))
- dpi_double = (((double) DisplayHeight (xdisplay, xscreen) * 25.4) /
- (double) DisplayHeightMM (xdisplay, xscreen));
+ dpi_double = (((double) DisplayHeight (xdisplay, screen_x11->screen_num) * 25.4) /
+ (double) DisplayHeightMM (xdisplay, screen_x11->screen_num));
screen_x11->xft_dpi = (int)(0.5 + PANGO_SCALE * dpi_double);
}
diff --git a/gdk/x11/gdkxid.c b/gdk/x11/gdkxid.c
index ddd49b5..8476934 100644
--- a/gdk/x11/gdkxid.c
+++ b/gdk/x11/gdkxid.c
@@ -26,7 +26,6 @@
#include "config.h"
-#include "gdkx.h"
#include "gdkprivate-x11.h"
#include "gdkdisplay-x11.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]