[gtk+] wayland: Add basic multiple output support
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] wayland: Add basic multiple output support
- Date: Thu, 14 Feb 2013 13:30:35 +0000 (UTC)
commit fab808f92cb3afa2fb39d503615247dc4f3cfffa
Author: Rob Bradford <rob linux intel com>
Date: Thu Feb 14 13:00:19 2013 +0000
wayland: Add basic multiple output support
Store the wl_output pointer within the the GdkWaylandMonitor structure.
gdk/wayland/gdkdisplay-wayland.c | 5 +++--
gdk/wayland/gdkdisplay-wayland.h | 1 -
gdk/wayland/gdkscreen-wayland.c | 2 ++
3 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index 640e3e9..ecb0e64 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -95,6 +95,7 @@ gdk_registry_handle_global(void *data, struct wl_registry *registry, uint32_t id
GdkWaylandDisplay *display_wayland = data;
GdkDisplay *gdk_display = GDK_DISPLAY_OBJECT (data);
struct wl_seat *seat;
+ struct wl_output *output;
if (strcmp(interface, "wl_compositor") == 0) {
display_wayland->compositor =
@@ -109,9 +110,9 @@ gdk_registry_handle_global(void *data, struct wl_registry *registry, uint32_t id
display_wayland->shell =
wl_registry_bind(display_wayland->wl_registry, id, &wl_shell_interface, 1);
} else if (strcmp(interface, "wl_output") == 0) {
- display_wayland->output =
+ output =
wl_registry_bind(display_wayland->wl_registry, id, &wl_output_interface, 1);
- _gdk_wayland_screen_add_output(display_wayland->screen, display_wayland->output);
+ _gdk_wayland_screen_add_output(display_wayland->screen, output);
} else if (strcmp(interface, "wl_seat") == 0) {
seat = wl_registry_bind(display_wayland->wl_registry, id, &wl_seat_interface, 1);
_gdk_wayland_device_manager_add_device (gdk_display->device_manager,
diff --git a/gdk/wayland/gdkdisplay-wayland.h b/gdk/wayland/gdkdisplay-wayland.h
index fc90429..fb284e3 100644
--- a/gdk/wayland/gdkdisplay-wayland.h
+++ b/gdk/wayland/gdkdisplay-wayland.h
@@ -61,7 +61,6 @@ struct _GdkWaylandDisplay
struct wl_compositor *compositor;
struct wl_shm *shm;
struct wl_shell *shell;
- struct wl_output *output;
struct wl_input_device *input_device;
struct wl_data_device_manager *data_device_manager;
diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c
index cf4bd2d..d30cc7c 100644
--- a/gdk/wayland/gdkscreen-wayland.c
+++ b/gdk/wayland/gdkscreen-wayland.c
@@ -67,6 +67,7 @@ struct _GdkWaylandScreenClass
struct _GdkWaylandMonitor
{
+ struct wl_output *output;
GdkRectangle geometry;
int width_mm;
int height_mm;
@@ -589,6 +590,7 @@ _gdk_wayland_screen_add_output (GdkScreen *screen,
GdkWaylandScreen *screen_wayland = GDK_WAYLAND_SCREEN (screen);
GdkWaylandMonitor *monitor = g_new0(GdkWaylandMonitor, 1);
+ monitor->output = output;
g_ptr_array_add(screen_wayland->monitors, monitor);
wl_output_add_listener(output, &output_listener, monitor);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]