mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
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.
This commit is contained in:
parent
32e3dcfb47
commit
214342eac5
@ -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
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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,
|
||||
|
@ -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
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "gdkintl.h"
|
||||
#include "gdkasync.h"
|
||||
#include "gdkx.h"
|
||||
#include "gdkprivate-x11.h"
|
||||
|
||||
#include <X11/extensions/XInput2.h>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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)
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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,
|
||||
|
@ -21,7 +21,6 @@
|
||||
#define __GDK_EVENT_SOURCE_H__
|
||||
|
||||
#include "gdkeventtranslator.h"
|
||||
#include "gdkprivate-x11.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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>
|
||||
|
@ -30,7 +30,6 @@
|
||||
#include "gdkkeysyms.h"
|
||||
#include "gdkprivate-x11.h"
|
||||
#include "gdkdisplay-x11.h"
|
||||
#include "gdkx.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -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>
|
||||
|
@ -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__ */
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -27,8 +27,6 @@
|
||||
#include "config.h"
|
||||
|
||||
#include "gdkselection.h"
|
||||
|
||||
#include "gdkx.h"
|
||||
#include "gdkproperty.h"
|
||||
#include "gdkprivate.h"
|
||||
#include "gdkprivate-x11.h"
|
||||
|
@ -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;
|
||||
|
@ -27,8 +27,6 @@
|
||||
#include "config.h"
|
||||
|
||||
#include "gdkvisualprivate.h"
|
||||
|
||||
#include "gdkx.h"
|
||||
#include "gdkprivate-x11.h"
|
||||
#include "gdkscreen-x11.h"
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
107
gdk/x11/gdkx.h
107
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,47 +98,6 @@ 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"
|
||||
|
||||
/**
|
||||
* GDK_DISPLAY_XDISPLAY:
|
||||
* @display: a #GdkDisplay.
|
||||
*
|
||||
* Returns the display of a #GdkDisplay.
|
||||
*
|
||||
* Returns: an Xlib <type>Display*</type>
|
||||
*/
|
||||
#define GDK_DISPLAY_XDISPLAY(display) (GDK_DISPLAY_X11(display)->xdisplay)
|
||||
|
||||
/**
|
||||
* GDK_WINDOW_XDISPLAY:
|
||||
* @win: a #GdkWindow.
|
||||
*
|
||||
* Returns the display of a #GdkWindow.
|
||||
*
|
||||
* 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)
|
||||
|
||||
/**
|
||||
* GDK_SCREEN_XSCREEN:
|
||||
* @screen: a #GdkScreen
|
||||
*
|
||||
* Returns the screen of a #GdkScreen.
|
||||
*
|
||||
* Returns: an Xlib <type>Screen*</type>.
|
||||
*/
|
||||
#define GDK_SCREEN_XSCREEN(screen) (GDK_SCREEN_X11 (screen)->xscreen)
|
||||
#define GDK_SCREEN_XNUMBER(screen) (GDK_SCREEN_X11 (screen)->screen_num)
|
||||
|
||||
#else /* GDK_COMPILATION */
|
||||
|
||||
#ifndef GDK_MULTIHEAD_SAFE
|
||||
/**
|
||||
* GDK_ROOT_WINDOW:
|
||||
@ -149,6 +109,14 @@ gint gdk_x11_get_default_screen (void);
|
||||
|
||||
#define GDK_DISPLAY_XDISPLAY(display) (gdk_x11_display_get_xdisplay (display))
|
||||
|
||||
/**
|
||||
* GDK_WINDOW_XDISPLAY:
|
||||
* @win: a #GdkWindow.
|
||||
*
|
||||
* Returns the display of a #GdkWindow.
|
||||
*
|
||||
* Returns: an Xlib <type>Display*</type>.
|
||||
*/
|
||||
#define GDK_WINDOW_XDISPLAY(win) (GDK_DISPLAY_XDISPLAY (gdk_window_get_display (win)))
|
||||
|
||||
/**
|
||||
@ -161,7 +129,24 @@ gint gdk_x11_get_default_screen (void);
|
||||
*/
|
||||
#define GDK_WINDOW_XID(win) (gdk_x11_window_get_xid (win))
|
||||
|
||||
/**
|
||||
* GDK_DISPLAY_XDISPLAY:
|
||||
* @display: a #GdkDisplay.
|
||||
*
|
||||
* Returns the display of a #GdkDisplay.
|
||||
*
|
||||
* Returns: an Xlib <type>Display*</type>
|
||||
*/
|
||||
#define GDK_SCREEN_XDISPLAY(screen) (gdk_x11_display_get_xdisplay (gdk_screen_get_display (screen)))
|
||||
|
||||
/**
|
||||
* GDK_SCREEN_XSCREEN:
|
||||
* @screen: a #GdkScreen
|
||||
*
|
||||
* Returns the screen of a #GdkScreen.
|
||||
*
|
||||
* Returns: an Xlib <type>Screen*</type>.
|
||||
*/
|
||||
#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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -26,7 +26,6 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "gdkx.h"
|
||||
#include "gdkprivate-x11.h"
|
||||
#include "gdkdisplay-x11.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user