Bug 1418829 - Export GetCSDSupportLevel() as public from nsWindow, r?jhorak draft
authorMartin Stransky <stransky@redhat.com>
Mon, 20 Nov 2017 14:28:29 +0100
changeset 701416 a144519fc87a5cd91574ac53123954bdaf1dfa5d
parent 701415 ea6ef818a2bfbec43b825536bab0d9d90bde1342
child 701417 453905d4ac30fc62a1ee722d658ac748fdc50f0d
push id90144
push userstransky@redhat.com
push dateTue, 21 Nov 2017 16:09:14 +0000
reviewersjhorak
bugs1418829
milestone59.0a1
Bug 1418829 - Export GetCSDSupportLevel() as public from nsWindow, r?jhorak We need that for nsLookAndFeel module. MozReview-Commit-ID: 61YKeAUoKEu
widget/gtk/nsWindow.h
--- a/widget/gtk/nsWindow.h
+++ b/widget/gtk/nsWindow.h
@@ -367,16 +367,28 @@ public:
     int GdkCoordToDevicePixels(gint coord);
     LayoutDeviceIntPoint GdkPointToDevicePixels(GdkPoint point);
     LayoutDeviceIntPoint GdkEventCoordsToDevicePixels(gdouble x, gdouble y);
     LayoutDeviceIntRect GdkRectToDevicePixels(GdkRectangle rect);
 
     virtual bool WidgetTypeSupportsAcceleration() override;
 
     bool DoDrawTitlebar() const;
+
+    typedef enum { CSD_SUPPORT_FULL,    // CSD including shadows
+                   CSD_SUPPORT_FLAT,    // CSD without shadows
+                   CSD_SUPPORT_NONE,    // WM does not support CSD at all
+                   CSD_SUPPORT_UNKNOWN
+    } CSDSupportLevel;
+    /**
+     * Get the support of Client Side Decoration by checking
+     * the XDG_CURRENT_DESKTOP environment variable.
+     */
+    static CSDSupportLevel GetCSDSupportLevel();
+
 protected:
     virtual ~nsWindow();
 
     // event handling code
     void DispatchActivateEvent(void);
     void DispatchDeactivateEvent(void);
     void DispatchResized();
     void MaybeDispatchResized();
@@ -571,22 +583,12 @@ private:
      * ancestor widget's instance.  So, one set of IM contexts is created for
      * all windows in a hierarchy.  If the children are released after the top
      * level window is released, the children still have a valid pointer,
      * however, IME doesn't work at that time.
      */
     RefPtr<mozilla::widget::IMContextWrapper> mIMContext;
 
     mozilla::UniquePtr<mozilla::CurrentX11TimeGetter> mCurrentTimeGetter;
-    typedef enum { CSD_SUPPORT_FULL,    // CSD including shadows
-                   CSD_SUPPORT_FLAT,    // CSD without shadows
-                   CSD_SUPPORT_NONE,    // WM does not support CSD at all
-                   CSD_SUPPORT_UNKNOWN
-    } CSDSupportLevel;
-    /**
-     * Get the support of Client Side Decoration by checking
-     * the XDG_CURRENT_DESKTOP environment variable.
-     */
-    static CSDSupportLevel GetCSDSupportLevel();
     static CSDSupportLevel sCSDSupportLevel;
 };
 
 #endif /* __nsWindow_h__ */