forked from AuroraMiddleware/gtk
Use gdk_display_get_toplevel_windows
This replaces the GdkScreen api of the same name.
This commit is contained in:
parent
5cb5bdf1bc
commit
8f129ddd13
@ -73,7 +73,7 @@ _gdk_broadway_screen_size_changed (GdkScreen *screen,
|
||||
gdk_monitor_set_size (monitor, msg->width, msg->height);
|
||||
gdk_monitor_set_physical_size (monitor, msg->width * 25.4 / 96, msg->height * 25.4 / 96);
|
||||
|
||||
toplevels = gdk_screen_get_toplevel_windows (screen);
|
||||
toplevels = gdk_display_get_toplevel_windows (broadway_screen->display);
|
||||
for (l = toplevels; l != NULL; l = l->next)
|
||||
{
|
||||
GdkWindow *toplevel = l->data;
|
||||
@ -82,6 +82,8 @@ _gdk_broadway_screen_size_changed (GdkScreen *screen,
|
||||
if (toplevel_impl->maximized)
|
||||
gdk_window_move_resize (toplevel, 0, 0, msg->width, msg->height);
|
||||
}
|
||||
|
||||
g_list_free (toplevels);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -708,7 +708,7 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
- (void)draggedImage:(NSImage *)anImage endedAt:(NSPoint)aPoint operation:(NSDragOperation)operation
|
||||
{
|
||||
GdkEvent *event;
|
||||
GdkScreen *screen;
|
||||
GdkDisplay *display;
|
||||
GdkDevice *device;
|
||||
|
||||
g_assert (_gdk_quartz_drag_source_context != NULL);
|
||||
@ -718,16 +718,16 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
event->dnd.send_event = FALSE;
|
||||
event->dnd.context = g_object_ref (_gdk_quartz_drag_source_context);
|
||||
|
||||
screen = gdk_window_get_screen (event->dnd.window);
|
||||
display = gdk_window_get_display (event->dnd.window);
|
||||
|
||||
if (screen)
|
||||
if (display)
|
||||
{
|
||||
GList* windows, *list;
|
||||
gint gx, gy;
|
||||
|
||||
event->dnd.context->dest_window = NULL;
|
||||
|
||||
windows = gdk_screen_get_toplevel_windows (screen);
|
||||
windows = gdk_display_get_toplevel_windows (display);
|
||||
_gdk_quartz_window_nspoint_to_gdk_xy (aPoint, &gx, &gy);
|
||||
|
||||
for (list = windows; list; list = list->next)
|
||||
@ -743,6 +743,8 @@ update_context_from_dragging_info (id <NSDraggingInfo> sender)
|
||||
if (gx > wx && gy > wy && gx <= wx + ww && gy <= wy + wh)
|
||||
event->dnd.context->dest_window = win;
|
||||
}
|
||||
|
||||
g_list_free (windows);
|
||||
}
|
||||
|
||||
device = gdk_drag_context_get_device (_gdk_quartz_drag_source_context);
|
||||
|
@ -214,7 +214,7 @@ _gdk_quartz_screen_update_window_sizes (GdkScreen *screen)
|
||||
_gdk_root->abs_x = 0;
|
||||
_gdk_root->abs_y = 0;
|
||||
|
||||
windows = gdk_screen_get_toplevel_windows (screen);
|
||||
windows = gdk_display_get_toplevel_windows (gdk_screen_get_display (screen));
|
||||
|
||||
for (list = windows; list; list = list->next)
|
||||
_gdk_quartz_window_update_position (list->data);
|
||||
|
@ -426,9 +426,9 @@ gdk_x11_device_core_window_at_position (GdkDevice *device,
|
||||
{
|
||||
GdkWindowImplX11 *impl;
|
||||
GdkDisplay *display;
|
||||
GdkScreen *screen;
|
||||
Display *xdisplay;
|
||||
GdkWindow *window;
|
||||
GdkScreen *screen;
|
||||
Window xwindow, root, child, last;
|
||||
int xroot_x, xroot_y, xwin_x, xwin_y;
|
||||
unsigned int xmask;
|
||||
@ -470,8 +470,7 @@ gdk_x11_device_core_window_at_position (GdkDevice *device,
|
||||
|
||||
/* FIXME: untrusted clients case not multidevice-safe */
|
||||
pointer_window = None;
|
||||
screen = gdk_display_get_default_screen (display);
|
||||
toplevels = gdk_screen_get_toplevel_windows (screen);
|
||||
toplevels = gdk_display_get_toplevel_windows (display);
|
||||
for (list = toplevels; list != NULL; list = list->next)
|
||||
{
|
||||
window = GDK_WINDOW (list->data);
|
||||
|
@ -545,8 +545,7 @@ gdk_x11_device_xi2_window_at_position (GdkDevice *device,
|
||||
/* FIXME: untrusted clients case not multidevice-safe */
|
||||
pointer_window = None;
|
||||
|
||||
screen = gdk_display_get_default_screen (display);
|
||||
toplevels = gdk_screen_get_toplevel_windows (screen);
|
||||
toplevels = gdk_display_get_toplevel_windows (display);
|
||||
for (list = toplevels; list != NULL; list = list->next)
|
||||
{
|
||||
window = GDK_WINDOW (list->data);
|
||||
|
@ -581,14 +581,14 @@ gdk_window_cache_new (GdkDisplay *display)
|
||||
XGetWindowAttributes (xdisplay, GDK_WINDOW_XID (root_window), &xwa);
|
||||
result->old_event_mask = xwa.your_event_mask;
|
||||
|
||||
if (G_UNLIKELY (!GDK_X11_DISPLAY (GDK_X11_SCREEN (screen)->display)->trusted_client))
|
||||
if (G_UNLIKELY (!GDK_X11_DISPLAY (display)->trusted_client))
|
||||
{
|
||||
GList *toplevel_windows, *list;
|
||||
GdkWindow *window;
|
||||
GdkWindowImplX11 *impl;
|
||||
gint x, y, width, height;
|
||||
|
||||
toplevel_windows = gdk_screen_get_toplevel_windows (screen);
|
||||
toplevel_windows = gdk_display_get_toplevel_windows (display);
|
||||
for (list = toplevel_windows; list; list = list->next)
|
||||
{
|
||||
window = GDK_WINDOW (list->data);
|
||||
@ -609,7 +609,7 @@ gdk_window_cache_new (GdkDisplay *display)
|
||||
gdk_window_add_filter (root_window, gdk_window_cache_filter, result);
|
||||
gdk_window_add_filter (NULL, gdk_window_cache_shape_filter, result);
|
||||
|
||||
if (!_gdk_x11_get_window_child_info (gdk_screen_get_display (screen),
|
||||
if (!_gdk_x11_get_window_child_info (display,
|
||||
GDK_WINDOW_XID (root_window),
|
||||
FALSE, NULL,
|
||||
&children, &nchildren))
|
||||
@ -632,7 +632,7 @@ gdk_window_cache_new (GdkDisplay *display)
|
||||
* the COW. We assume that the CM is using the COW (which is true for pretty
|
||||
* much any CM currently in use).
|
||||
*/
|
||||
if (gdk_display_is_composited (gdk_screen_get_display (screen)))
|
||||
if (gdk_display_is_composited (display))
|
||||
{
|
||||
cow = XCompositeGetOverlayWindow (xdisplay, GDK_WINDOW_XID (root_window));
|
||||
gdk_window_cache_add (result, cow, 0, 0,
|
||||
|
@ -29,12 +29,11 @@ G_DEFINE_TYPE (GdkX11Monitor, gdk_x11_monitor, GDK_TYPE_MONITOR)
|
||||
static gboolean
|
||||
gdk_monitor_has_fullscreen_window (GdkMonitor *monitor)
|
||||
{
|
||||
GdkScreen *screen = gdk_display_get_default_screen (monitor->display);
|
||||
GList *toplevels, *l;
|
||||
GdkWindow *window;
|
||||
gboolean has_fullscreen;
|
||||
|
||||
toplevels = gdk_screen_get_toplevel_windows (screen);
|
||||
toplevels = gdk_display_get_toplevel_windows (monitor->display);
|
||||
|
||||
has_fullscreen = FALSE;
|
||||
for (l = toplevels; l; l = l->next)
|
||||
|
@ -841,7 +841,7 @@ _gdk_x11_screen_set_window_scale (GdkX11Screen *x11_screen,
|
||||
root = x11_screen->root_window;
|
||||
GDK_WINDOW_IMPL_X11 (root->impl)->window_scale = scale;
|
||||
|
||||
toplevels = gdk_screen_get_toplevel_windows (GDK_SCREEN (x11_screen));
|
||||
toplevels = gdk_display_get_toplevel_windows (x11_screen->display);
|
||||
|
||||
for (l = toplevels; l != NULL; l = l->next)
|
||||
{
|
||||
@ -850,6 +850,8 @@ _gdk_x11_screen_set_window_scale (GdkX11Screen *x11_screen,
|
||||
_gdk_x11_window_set_window_scale (window, scale);
|
||||
}
|
||||
|
||||
g_list_free (toplevels);
|
||||
|
||||
for (i = 0; i < x11_display->monitors->len; i++)
|
||||
{
|
||||
GdkMonitor *monitor = GDK_MONITOR (x11_display->monitors->pdata[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user