forked from AuroraMiddleware/gtk
x11: Stop using gdk_screen_get_display
Never necessary, we can just use the field directly.
This commit is contained in:
parent
a16a25151c
commit
fee93d8d7b
@ -244,7 +244,7 @@ add_startup_timeout (GdkScreen *screen,
|
||||
}
|
||||
|
||||
sn_data = g_new (StartupNotificationData, 1);
|
||||
sn_data->display = g_object_ref (gdk_screen_get_display (screen));
|
||||
sn_data->display = g_object_ref (GDK_SCREEN_DISPLAY (screen));
|
||||
sn_data->startup_id = g_strdup (startup_id);
|
||||
g_get_current_time (&sn_data->time);
|
||||
|
||||
|
@ -785,7 +785,7 @@ gdk_x11_gl_context_init (GdkX11GLContext *self)
|
||||
gboolean
|
||||
gdk_x11_screen_init_gl (GdkScreen *screen)
|
||||
{
|
||||
GdkDisplay *display = gdk_screen_get_display (screen);
|
||||
GdkDisplay *display = GDK_SCREEN_DISPLAY (screen);
|
||||
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
|
||||
Display *dpy;
|
||||
int error_base, event_base;
|
||||
|
@ -179,7 +179,7 @@ get_current_desktop (GdkScreen *screen)
|
||||
gdk_atom_intern_static_string ("_NET_CURRENT_DESKTOP")))
|
||||
return workspace;
|
||||
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen));
|
||||
display = GDK_DISPLAY_XDISPLAY (GDK_SCREEN_DISPLAY (screen));
|
||||
win = XRootWindow (display, gdk_x11_screen_get_screen_number (screen));
|
||||
|
||||
current_desktop = XInternAtom (display, "_NET_CURRENT_DESKTOP", True);
|
||||
@ -220,8 +220,8 @@ gdk_x11_screen_get_work_area (GdkScreen *screen,
|
||||
int desktop;
|
||||
Display *display;
|
||||
|
||||
display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen));
|
||||
root_window = gdk_display_get_root_window (gdk_screen_get_display (screen));
|
||||
display = GDK_SCREEN_XDISPLAY (screen);
|
||||
root_window = gdk_display_get_root_window (GDK_SCREEN_DISPLAY (screen));
|
||||
workarea = XInternAtom (display, "_NET_WORKAREA", True);
|
||||
|
||||
/* Defaults in case of error */
|
||||
@ -343,7 +343,7 @@ static gboolean
|
||||
init_randr15 (GdkScreen *screen, gboolean *changed)
|
||||
{
|
||||
#ifdef HAVE_RANDR15
|
||||
GdkDisplay *display = gdk_screen_get_display (screen);
|
||||
GdkDisplay *display = GDK_SCREEN_DISPLAY (screen);
|
||||
GdkX11Display *x11_display = GDK_X11_DISPLAY (display);
|
||||
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
||||
XRRScreenResources *resources;
|
||||
@ -528,7 +528,7 @@ static gboolean
|
||||
init_randr13 (GdkScreen *screen, gboolean *changed)
|
||||
{
|
||||
#ifdef HAVE_RANDR
|
||||
GdkDisplay *display = gdk_screen_get_display (screen);
|
||||
GdkDisplay *display = GDK_SCREEN_DISPLAY (screen);
|
||||
GdkX11Display *x11_display = GDK_X11_DISPLAY (display);
|
||||
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
||||
XRRScreenResources *resources;
|
||||
@ -869,7 +869,7 @@ init_randr_support (GdkScreen *screen)
|
||||
StructureNotifyMask);
|
||||
|
||||
#ifdef HAVE_RANDR
|
||||
if (!GDK_X11_DISPLAY (gdk_screen_get_display (screen))->have_randr12)
|
||||
if (!GDK_X11_DISPLAY (GDK_SCREEN_DISPLAY (screen))->have_randr12)
|
||||
return;
|
||||
|
||||
XRRSelectInput (GDK_SCREEN_XDISPLAY (screen),
|
||||
@ -893,7 +893,7 @@ _gdk_x11_screen_size_changed (GdkScreen *screen,
|
||||
#ifdef HAVE_RANDR
|
||||
GdkX11Display *display_x11;
|
||||
|
||||
display_x11 = GDK_X11_DISPLAY (gdk_screen_get_display (screen));
|
||||
display_x11 = GDK_X11_DISPLAY (GDK_SCREEN_DISPLAY (screen));
|
||||
|
||||
if (display_x11->have_randr13 && event->type == ConfigureNotify)
|
||||
return;
|
||||
@ -916,7 +916,7 @@ _gdk_x11_screen_get_edge_monitors (GdkScreen *screen,
|
||||
{
|
||||
#ifdef HAVE_XFREE_XINERAMA
|
||||
GdkX11Screen *x11_screen = GDK_X11_SCREEN (screen);
|
||||
GdkWindow *root_window = gdk_display_get_root_window (gdk_screen_get_display (screen));
|
||||
GdkWindow *root_window = gdk_display_get_root_window (GDK_SCREEN_DISPLAY (screen));
|
||||
gint top_most_pos = gdk_window_get_height (root_window);
|
||||
gint left_most_pos = gdk_window_get_width (root_window);
|
||||
gint bottom_most_pos = 0;
|
||||
|
@ -268,7 +268,7 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen,
|
||||
RootWindow (x11_screen->xdisplay, x11_screen->screen_num),
|
||||
xvisual,
|
||||
AllocNone);
|
||||
gdk_display_setup_window_visual (gdk_screen_get_display (screen),
|
||||
gdk_display_setup_window_visual (GDK_SCREEN_DISPLAY (screen),
|
||||
x11_screen->rgba_visual->depth,
|
||||
GDK_X11_VISUAL (x11_screen->rgba_visual)->xvisual,
|
||||
colormap,
|
||||
@ -276,7 +276,7 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen,
|
||||
}
|
||||
else
|
||||
{
|
||||
gdk_display_setup_window_visual (gdk_screen_get_display (screen),
|
||||
gdk_display_setup_window_visual (GDK_SCREEN_DISPLAY (screen),
|
||||
DefaultDepth (x11_screen->xdisplay, x11_screen->screen_num),
|
||||
DefaultVisual (x11_screen->xdisplay, x11_screen->screen_num),
|
||||
DefaultColormap (x11_screen->xdisplay, x11_screen->screen_num),
|
||||
|
@ -638,7 +638,7 @@ _gdk_x11_screen_init_root_window (GdkScreen *screen)
|
||||
|
||||
g_assert (x11_screen->root_window == NULL);
|
||||
|
||||
window = x11_screen->root_window = _gdk_display_create_window (gdk_screen_get_display (screen));
|
||||
window = x11_screen->root_window = _gdk_display_create_window (GDK_SCREEN_DISPLAY (screen));
|
||||
|
||||
window->impl = g_object_new (GDK_TYPE_WINDOW_IMPL_X11, NULL);
|
||||
window->impl_window = window;
|
||||
|
@ -73,7 +73,7 @@ gdk_xsettings_notify (GdkX11Screen *x11_screen,
|
||||
const char *name,
|
||||
GdkSettingAction action)
|
||||
{
|
||||
gdk_display_setting_changed (gdk_screen_get_display (GDK_SCREEN (x11_screen)), name);
|
||||
gdk_display_setting_changed (x11_screen->display, name);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
Loading…
Reference in New Issue
Block a user