From 94cee3ef0971f3759b402fad2db5e407a7c8ece3 Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Mon, 12 May 2014 23:39:27 +0200 Subject: [PATCH] display: Add public getters for sync extension presence and event base https://bugzilla.gnome.org/show_bug.cgi?id=728464 --- src/core/display.c | 12 ++++++++++++ src/meta/display.h | 2 ++ 2 files changed, 14 insertions(+) diff --git a/src/core/display.c b/src/core/display.c index 261fe5fd2..ec9d96261 100644 --- a/src/core/display.c +++ b/src/core/display.c @@ -3120,6 +3120,12 @@ meta_display_has_shape (MetaDisplay *display) return META_DISPLAY_HAS_SHAPE (display); } +gboolean +meta_display_has_sync (MetaDisplay *display) +{ + return META_DISPLAY_HAS_XSYNC (display); +} + /** * meta_display_get_focus_window: * @display: a #MetaDisplay @@ -3148,6 +3154,12 @@ meta_display_get_shape_event_base (MetaDisplay *display) return display->shape_event_base; } +int +meta_display_get_sync_event_base (MetaDisplay *display) +{ + return display->xsync_event_base; +} + /** * meta_display_clear_mouse_mode: * @display: a #MetaDisplay diff --git a/src/meta/display.h b/src/meta/display.h index 694d7e95a..712738a46 100644 --- a/src/meta/display.h +++ b/src/meta/display.h @@ -75,6 +75,7 @@ Display *meta_display_get_xdisplay (MetaDisplay *display); MetaCompositor *meta_display_get_compositor (MetaDisplay *display); gboolean meta_display_has_shape (MetaDisplay *display); +gboolean meta_display_has_sync (MetaDisplay *display); MetaWindow *meta_display_get_focus_window (MetaDisplay *display); @@ -83,6 +84,7 @@ gboolean meta_display_xwindow_is_a_no_focus_window (MetaDisplay *display, int meta_display_get_damage_event_base (MetaDisplay *display); int meta_display_get_shape_event_base (MetaDisplay *display); +int meta_display_get_sync_event_base (MetaDisplay *display); gboolean meta_display_xserver_time_is_before (MetaDisplay *display, guint32 time1,