mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-18 08:00:04 +00:00
Deprecate gdk_display and GDK_DISPLAY
This commit is contained in:
parent
ee14cc3160
commit
a3c3031a0e
@ -41,6 +41,8 @@ The current display.
|
||||
|
||||
@Returns: an Xlib <type>Display*</type>.
|
||||
|
||||
@Deprecated: 2.22: Use gdk_display_get_default ()
|
||||
|
||||
|
||||
<!-- ##### MACRO GDK_WINDOW_XDISPLAY ##### -->
|
||||
<para>
|
||||
|
@ -33,7 +33,7 @@ find_toplevel_window (Window xid)
|
||||
|
||||
do
|
||||
{
|
||||
if (XQueryTree (GDK_DISPLAY (), xid, &root,
|
||||
if (XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), xid, &root,
|
||||
&parent, &children, &nchildren) == 0)
|
||||
{
|
||||
g_warning ("Couldn't find window manager window");
|
||||
@ -82,7 +82,7 @@ remove_shaped_area (GdkPixbuf *pixbuf,
|
||||
gdk_pixbuf_get_height (pixbuf));
|
||||
|
||||
gdk_pixbuf_fill (retval, 0);
|
||||
rectangles = XShapeGetRectangles (GDK_DISPLAY (), window,
|
||||
rectangles = XShapeGetRectangles (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), window,
|
||||
ShapeBounding, &rectangle_count, &rectangle_order);
|
||||
|
||||
for (i = 0; i < rectangle_count; i++)
|
||||
@ -130,7 +130,7 @@ take_window_shot (Window child,
|
||||
GdkPixbuf *tmp, *tmp2;
|
||||
GdkPixbuf *retval;
|
||||
|
||||
disp = GDK_DISPLAY ();
|
||||
disp = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
|
||||
w = GDK_ROOT_WINDOW ();
|
||||
|
||||
if (include_decoration)
|
||||
|
@ -21,7 +21,7 @@ find_toplevel_window (Window xid)
|
||||
|
||||
do
|
||||
{
|
||||
if (XQueryTree (GDK_DISPLAY (), xid, &root,
|
||||
if (XQueryTree (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), xid, &root,
|
||||
&parent, &children, &nchildren) == 0)
|
||||
{
|
||||
g_warning ("Couldn't find window manager window");
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#ifndef GDK_MULTIHEAD_SAFE
|
||||
#if !defined (GDK_DISABLE_DEPRECATED) && !defined (GDK_MULTIHEAD_SAFE) && defined (GDK_COMPILATION)
|
||||
extern Display *gdk_display;
|
||||
#endif
|
||||
|
||||
@ -75,7 +75,7 @@ gint gdk_x11_get_default_screen (void);
|
||||
#define GDK_IMAGE_XDISPLAY(image) (gdk_x11_image_get_xdisplay (image))
|
||||
#define GDK_IMAGE_XIMAGE(image) (gdk_x11_image_get_ximage (image))
|
||||
|
||||
#ifndef GDK_MULTIHEAD_SAFE
|
||||
#if !defined (GDK_DISABLE_DEPRECATED) && !defined (GDK_MULTIHEAD_SAFE) && defined (GDK_COMPILATION)
|
||||
#define GDK_DISPLAY() gdk_display
|
||||
#endif
|
||||
|
||||
|
@ -662,10 +662,10 @@ get_window_desktop (Window window)
|
||||
|
||||
if (_net_wm_desktop == None)
|
||||
_net_wm_desktop =
|
||||
XInternAtom (gdk_display, "_NET_WM_DESKTOP", False);
|
||||
XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), "_NET_WM_DESKTOP", False);
|
||||
|
||||
gdk_error_trap_push ();
|
||||
result = XGetWindowProperty (gdk_display, window, _net_wm_desktop,
|
||||
result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), window, _net_wm_desktop,
|
||||
0, G_MAXLONG,
|
||||
False, XA_CARDINAL,
|
||||
&ret_type, &format, &nitems,
|
||||
@ -716,11 +716,11 @@ get_stacked_windows (GailScreenInfo *info)
|
||||
|
||||
if (_net_client_list_stacking == None)
|
||||
_net_client_list_stacking =
|
||||
XInternAtom (gdk_display, "_NET_CLIENT_LIST_STACKING", False);
|
||||
XInternAtom (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), "_NET_CLIENT_LIST_STACKING", False);
|
||||
|
||||
gdk_error_trap_push ();
|
||||
ret_type = None;
|
||||
result = XGetWindowProperty (gdk_display,
|
||||
result = XGetWindowProperty (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
GDK_WINDOW_XWINDOW (info->root_window),
|
||||
_net_client_list_stacking,
|
||||
0, G_MAXLONG,
|
||||
@ -917,11 +917,11 @@ init_gail_screen (GdkScreen *screen,
|
||||
|
||||
get_stacked_windows (&gail_screens [screen_n]);
|
||||
|
||||
XGetWindowAttributes (gdk_display,
|
||||
XGetWindowAttributes (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
GDK_WINDOW_XWINDOW (gail_screens [screen_n].root_window),
|
||||
&attrs);
|
||||
|
||||
XSelectInput (gdk_display,
|
||||
XSelectInput (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()),
|
||||
GDK_WINDOW_XWINDOW (gail_screens [screen_n].root_window),
|
||||
attrs.your_event_mask | PropertyChangeMask);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user