[gtk+/wip/otte/gtk4: 7/41] wayland: Use GdkMonitor APIs
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/gtk4: 7/41] wayland: Use GdkMonitor APIs
- Date: Thu, 6 Oct 2016 22:00:19 +0000 (UTC)
commit 4b8fd513b016e1cc25339c2893b3ef7508210158
Author: Benjamin Otte <otte redhat com>
Date: Sun Sep 4 21:52:55 2016 +0200
wayland: Use GdkMonitor APIs
gdk/wayland/gdkwindow-wayland.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index ccd3bc4..8e6d5fc 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -342,8 +342,8 @@ _gdk_wayland_screen_create_root_window (GdkScreen *screen,
int width,
int height)
{
- GdkWaylandDisplay *display_wayland =
- GDK_WAYLAND_DISPLAY (gdk_screen_get_display (screen));
+ GdkDisplay *display = gdk_screen_get_display (screen);
+ GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
GdkWindow *window;
GdkWindowImplWayland *impl;
@@ -356,8 +356,8 @@ _gdk_wayland_screen_create_root_window (GdkScreen *screen,
impl->wrapper = GDK_WINDOW (window);
if (display_wayland->compositor_version >= WL_SURFACE_HAS_BUFFER_SCALE &&
- gdk_screen_get_n_monitors (screen) > 0)
- impl->scale = gdk_screen_get_monitor_scale_factor (screen, 0);
+ gdk_display_get_n_monitors (display) > 0)
+ impl->scale = gdk_monitor_get_scale_factor (gdk_display_get_monitor (display, 0));
/* logical 1x1 fake buffer */
impl->staging_cairo_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
@@ -681,8 +681,8 @@ _gdk_wayland_display_create_window_impl (GdkDisplay *display,
/* More likely to be right than just assuming 1 */
if (display_wayland->compositor_version >= WL_SURFACE_HAS_BUFFER_SCALE &&
- gdk_screen_get_n_monitors (screen) > 0)
- impl->scale = gdk_screen_get_monitor_scale_factor (screen, 0);
+ gdk_display_get_n_monitors (display) > 0)
+ impl->scale = gdk_monitor_get_scale_factor (gdk_display_get_monitor (display, 0));
impl->title = NULL;
@@ -1437,11 +1437,11 @@ gdk_wayland_window_create_xdg_toplevel (GdkWindow *window)
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
const gchar *app_id;
- GdkScreen *screen = gdk_window_get_screen (window);
+ GdkDisplay *display = gdk_window_get_display (window);
struct wl_output *fullscreen_output = NULL;
if (impl->initial_fullscreen_monitor >= 0 &&
- impl->initial_fullscreen_monitor < gdk_screen_get_n_monitors (screen))
- fullscreen_output = _gdk_wayland_screen_get_wl_output (screen, impl->initial_fullscreen_monitor);
+ impl->initial_fullscreen_monitor < gdk_display_get_n_monitors (display))
+ fullscreen_output = _gdk_wayland_screen_get_wl_output (gdk_window_get_screen (window),
impl->initial_fullscreen_monitor);
impl->display_server.xdg_surface =
zxdg_shell_v6_get_xdg_surface (display_wayland->xdg_shell,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]