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



commit 285fdac22cdc64707cafceb030553570086797bd
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 bff48e782..365af0d14 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
@@ -427,4 +429,6 @@ void meta_display_queue_check_fullscreen (MetaDisplay *display);
 MetaWindow *meta_display_get_pointer_window (MetaDisplay *display,
                                              MetaWindow  *not_this_one);
 
+MetaSelection * meta_display_get_selection (MetaDisplay *display);
+
 #endif
diff --git a/src/core/display.c b/src/core/display.c
index 1531fc945..acc40d557 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);
@@ -3597,3 +3599,9 @@ meta_display_get_startup_notification (MetaDisplay *display)
 {
   return display->startup_notification;
 }
+
+MetaSelection *
+meta_display_get_selection (MetaDisplay *display)
+{
+  return display->selection;
+}


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