[PATCH] Hackish support of 'dropdown-menu' type windows.

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


It has not even been tested!
---
 lisp/sawfish/wm/ext/match-window.jl | 5 ++++-
 lisp/sawfish/wm/state/wm-spec.jl    | 8 +++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/lisp/sawfish/wm/ext/match-window.jl b/lisp/sawfish/wm/ext/match-window.jl
index 04bbde2..a79c7a5 100644
--- a/lisp/sawfish/wm/ext/match-window.jl
+++ b/lisp/sawfish/wm/ext/match-window.jl
@@ -414,7 +414,10 @@
          (mark-window-as-dock w))
         ((eq value 'desktop)
 	     (set-x-property w '_NET_WM_WINDOW_TYPE (vector '_NET_WM_WINDOW_TYPE_DESKTOP) 'ATOM 32)
-         (mark-window-as-desktop w))
+             (mark-window-as-desktop w))
+	((eq value 'dropdown-menu)
+	 (set-x-property w '_NET_WM_WINDOW_TYPE (vector '_NET_WM_WINDOW_TYPE_DROPDOWN_MENU) 'ATOM 32)
+         (set-window-type w 'dropdown-menu))
         ((eq value 'menu)
 	     (set-x-property w '_NET_WM_WINDOW_TYPE (vector '_NET_WM_WINDOW_TYPE_MENU) 'ATOM 32)
          (set-window-type w 'menu))
diff --git a/lisp/sawfish/wm/state/wm-spec.jl b/lisp/sawfish/wm/state/wm-spec.jl
index 3c87ff2..2d6ae90 100644
--- a/lisp/sawfish/wm/state/wm-spec.jl
+++ b/lisp/sawfish/wm/state/wm-spec.jl
@@ -16,7 +16,7 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with sawfish; see the file COPYING.  If not, write to
-;; the Free Software Foundation, 51 Franklin Street, Fifth Floor, 
+;; the Free Software Foundation, 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301 USA.
 
 (define-structure sawfish.wm.state.wm-spec
@@ -116,6 +116,7 @@
      _NET_WM_WINDOW_TYPE_DESKTOP
      _NET_WM_WINDOW_TYPE_DIALOG
      _NET_WM_WINDOW_TYPE_DOCK
+     _NET_WM_WINDOW_TYPE_DROPDOWN_MENU
      _NET_WM_WINDOW_TYPE_TOOLBAR
      _NET_WM_WINDOW_TYPE_MENU
      _NET_WM_WINDOW_TYPE_UTILITY
@@ -384,6 +385,11 @@
       (require 'sawfish.wm.frames)
       (set-window-type w 'menu)))
 
+  (define-wm-spec-window-type '_NET_WM_WINDOW_TYPE_DROPDOWN_MENU
+    (lambda (w)
+      (require 'sawfish.wm.frames)
+      (set-window-type w 'dropdown-menu)))
+
   (define-wm-spec-window-type '_NET_WM_WINDOW_TYPE_SPLASH
     (lambda (w)
       (require 'sawfish.wm.frames)
-- 
2.24.1






----Next_Part(Sat_Feb_29_20_27_03_2020_378)----

-- 
Sawfish ML


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/