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



commit 57cc57acaa3c228a48681ce2a35b797235183ce2
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 | 5 +++++
 src/core/display.c         | 8 ++++++++
 2 files changed, 13 insertions(+)
---
diff --git a/src/core/display-private.h b/src/core/display-private.h
index d34699eb0..407eec689 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"
@@ -243,6 +244,8 @@ struct _MetaDisplay
   MetaWorkspaceManager *workspace_manager;
 
   MetaSoundPlayer *sound_player;
+
+  MetaSelection *selection;
 };
 
 struct _MetaDisplayClass
@@ -437,4 +440,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 2329e706d..5418a11e9 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -723,6 +723,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);
@@ -3647,3 +3649,9 @@ meta_display_get_sound_player (MetaDisplay *display)
 {
   return display->sound_player;
 }
+
+MetaSelection *
+meta_display_get_selection (MetaDisplay *display)
+{
+  return display->selection;
+}


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