[mutter/wip/carlosg/clipboard-manager: 16/22] core: Set up MetaSelection on MetaDisplay



commit 8a440b83a9ba97a234740114fcd4a9cbdeb55613
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon Nov 19 18:15:24 2018 +0100

    core: Set up MetaSelection on MetaDisplay

 src/core/display-private.h | 4 ++++
 src/core/display.c         | 8 ++++++++
 2 files changed, 12 insertions(+)
---
diff --git a/src/core/display-private.h b/src/core/display-private.h
index 576a4254e..44a60bbf4 100644
--- a/src/core/display-private.h
+++ b/src/core/display-private.h
@@ -38,6 +38,7 @@
 #include "clutter/clutter.h"
 #include "core/keybindings-private.h"
 #include "core/meta-gesture-tracker-private.h"
+#include "core/meta-selection.h"
 #include "core/stack-tracker.h"
 #include "core/startup-notification-private.h"
 #include "meta/barrier.h"
@@ -241,6 +242,7 @@ struct _MetaDisplay
 
   MetaBell *bell;
   MetaWorkspaceManager *workspace_manager;
+  MetaSelection *selection;
 };
 
 struct _MetaDisplayClass
@@ -431,4 +433,6 @@ MetaWindow *meta_display_get_window_from_id (MetaDisplay *display,
                                              uint64_t     window_id);
 uint64_t    meta_display_generate_window_id (MetaDisplay *display);
 
+MetaSelection * meta_display_get_selection (MetaDisplay *display);
+
 #endif
diff --git a/src/core/display.c b/src/core/display.c
index f96f36b38..ed44bb91a 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -722,6 +722,8 @@ meta_display_open (void)
 
   display->bell = meta_bell_new (display);
 
+  display->selection = meta_selection_new (display);
+
   if (meta_should_autostart_x11_display ())
     {
       x11_display = meta_x11_display_new (display, &error);
@@ -3629,3 +3631,9 @@ meta_display_generate_window_id (MetaDisplay *display)
   /* We can overflow here, that's fine */
   return (base_window_id + last_window_id++);
 }
+
+MetaSelection *
+meta_display_get_selection (MetaDisplay *display)
+{
+  return display->selection;
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]