Bug 1409493 - Add CSD entries to LookAndFeel, r?jhorak draft
authorMartin Stransky <stransky@redhat.com>
Tue, 17 Oct 2017 21:12:21 +0200
changeset 684639 c8fcb5f6c0ceb06270702b38123808adc93f0555
parent 684511 ce1a86d3b4db161c95d1147676bbed839d7a4732
child 684640 afee4042d8dcd843c8c3c3e8a065f7734e4d1451
push id85685
push userstransky@redhat.com
push dateMon, 23 Oct 2017 10:25:43 +0000
reviewersjhorak
bugs1409493
milestone58.0a1
Bug 1409493 - Add CSD entries to LookAndFeel, r?jhorak MozReview-Commit-ID: Fc9sGpRrT1w
widget/LookAndFeel.h
widget/nsXPLookAndFeel.cpp
--- a/widget/LookAndFeel.h
+++ b/widget/LookAndFeel.h
@@ -400,17 +400,41 @@ public:
      eIntID_ScrollbarFadeBeginDelay,
      eIntID_ScrollbarFadeDuration,
       
      /**
       * Distance in pixels to offset the context menu from the cursor
       * on open.
       */
      eIntID_ContextMenuOffsetVertical,
-     eIntID_ContextMenuOffsetHorizontal
+     eIntID_ContextMenuOffsetHorizontal,
+
+     /*
+      * A boolean value indicating whether client-side decorations are
+      * supported by the user's GTK version.
+      */
+     eIntID_GTKCSDAvailable,
+
+     /*
+      * A boolean value indicating whether client-side decorations should
+      * contain a minimize button.
+      */
+     eIntID_GTKCSDMinimizeButton,
+
+     /*
+      * A boolean value indicating whether client-side decorations should
+      * contain a maximize button.
+      */
+     eIntID_GTKCSDMaximizeButton,
+
+     /*
+      * A boolean value indicating whether client-side decorations should
+      * contain a close button.
+      */
+     eIntID_GTKCSDCloseButton
   };
 
   /**
    * Windows themes we currently detect.
    */
   enum WindowsTheme {
     eWindowsTheme_Generic = 0, // unrecognized theme
     eWindowsTheme_Classic,
--- a/widget/nsXPLookAndFeel.cpp
+++ b/widget/nsXPLookAndFeel.cpp
@@ -117,16 +117,28 @@ nsLookAndFeelIntPref nsXPLookAndFeel::sI
   { "ui.tooltipDelay",
     eIntID_TooltipDelay,
     false, 0 },
   { "ui.contextMenuOffsetVertical",
     eIntID_ContextMenuOffsetVertical,
     false, 0 },
   { "ui.contextMenuOffsetHorizontal",
     eIntID_ContextMenuOffsetHorizontal,
+    false, 0 },
+  { "ui.GtkCSDAvailable",
+    eIntID_GTKCSDAvailable,
+    false, 0 },
+  { "ui.GtkCSDMinimizeButton",
+    eIntID_GTKCSDMinimizeButton,
+    false, 0 },
+  { "ui.GtkCSDMaximizeButton",
+    eIntID_GTKCSDMaximizeButton,
+    false, 0 },
+  { "ui.GtkCSDCloseButton",
+    eIntID_GTKCSDCloseButton,
     false, 0 }
 };
 
 nsLookAndFeelFloatPref nsXPLookAndFeel::sFloatPrefs[] =
 {
   { "ui.IMEUnderlineRelativeSize",
     eFloatID_IMEUnderlineRelativeSize,
     false, 0 },