| [Sawfish] Patch for tabgroup.jl to fix crash if new tab is sticky |
[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]
Hi, With one of my last patches i have open a bug. If you add a window as tab and the add window is sticky sawfish crash if you move the window by selected first tab. This patch fix this. -- Regards, Fuchur GPG Fingerprint: CA3B 8204 5B3E 6D48 6D53 C116 E5BC 70D5 B8D7 B2B0
diff -urNad sawfish.orig/lisp/sawfish/wm/tabs/tabgroup.jl sawfish/lisp/sawfish/wm/tabs/tabgroup.jl
--- sawfish.orig/lisp/sawfish/wm/tabs/tabgroup.jl
+++ sawfish/lisp/sawfish/wm/tabs/tabgroup.jl
@@ -266,8 +266,6 @@
(group-frame-type (window-get win 'type))
(group-frame-focus-mode (window-get win 'focus-mode))
(group-frame-gravity (window-get win 'gravity))
- (group-frame-sticky (window-get win 'sticky))
- (group-frame-sticky-viewport (window-get win 'sticky-viewport))
(group-frame-never-iconify (window-get win 'never-iconify))
(group-frame-fixed-position (window-get win 'fixed-position))
(group-frame-title-position (window-get win 'title-position))
@@ -277,7 +275,8 @@
(group-frame-maximized-horizontally (window-get win 'maximized-horizontally))
(group-frame-maximized-fullscreen (window-get win 'maximized-fullscreen))
(group-frame-unmaximized-type (window-get win 'unmaximized-type))
- (group-frame-unmaximized-geometry (window-get win 'unmaximized-geometry)))
+ (group-frame-unmaximized-geometry (window-get win 'unmaximized-geometry))
+ group-frame-to-workspaces group-frame-from-workspaces win-is-sticky)
(when (not (eq index index2))
;; tabgroup to tabgroup
(when (window-tabbed-p w)
@@ -285,44 +284,49 @@
(tab-delete-window-from-tab-groups w)
(setq index2 (tab-window-group-index w)))
(if (window-get win 'iconified) (uniconify-window win))
- (let ((group-frame-to-workspaces (car (window-workspaces win))))
- (if (window-get win 'shaded) (unshade-window win))
- (setq tab-refresh-lock nil)
- (if (window-get w 'iconified) (uniconify-window w))
- (let ((group-frame-from-workspaces (car (window-workspaces w))))
- (if (window-get w 'shaded) (unshade-window w))
- (window-put w 'frame-style group-frame-style)
- (window-put w 'type group-frame-type)
- (window-put w 'focus-mode group-frame-focus-mode)
- (window-put w 'gravity group-frame-gravity)
- (window-put w 'title-position group-frame-title-position)
- (window-put w 'sticky group-frame-sticky)
- (window-put w 'sticky-viewport group-frame-sticky-viewport)
- (window-put w 'never-iconify group-frame-never-iconify)
- (window-put w 'depth group-frame-depth)
- (window-put w 'fixed-position group-frame-fixed-position)
- (window-put w 'never-maximize group-frame-never-maximize)
- (window-put w 'maximized-vertically group-frame-maximized-vertically)
- (window-put w 'maximized-horizontally group-frame-maximized-horizontally)
- (window-put w 'maximized-fullscreen group-frame-maximized-fullscreen)
- (window-put w 'unmaximized-type group-frame-unmaximized-type)
- (window-put w 'unmaximized-geometry group-frame-unmaximized-geometry)
- ;; reframe w here, tab-refresh-group expectet
- ;; the same frame for w and win
- (reframe-window w)
- (tab-put-window-in-group w index)
- (tab-delete-window-from-group w index2)
- (resize-window-to w (car dim) (cdr dim))
- (move-window-to w (car pos) (cdr pos))
- (when (and group-frame-to-workspaces group-frame-from-workspaces
- (not (eq group-frame-to-workspaces group-frame-from-workspaces)))
- (move-window-to-workspace w group-frame-from-workspaces group-frame-to-workspaces))
- (setq tab-refresh-lock t)
- (tab-refresh-group w 'frame)
- (set-input-focus w)
- (if (not (window-tabbed-p win)) (window-put win 'tabbed t))
- (window-put w 'tabbed t)))))))
-
+ (if (window-get win 'shaded) (unshade-window win))
+ (setq tab-refresh-lock nil)
+ (when (window-sticky-p win)
+ (make-window-unsticky win)
+ (setq win-is-sticky 't))
+ (setq group-frame-to-workspaces (car (window-workspaces win)))
+ (if (window-sticky-p w) (make-window-unsticky w))
+ (setq group-frame-from-workspaces (car (window-workspaces w)))
+ (if (window-get w 'iconified) (uniconify-window w))
+ (if (window-get w 'shaded) (unshade-window w))
+ (window-put w 'frame-style group-frame-style)
+ (window-put w 'type group-frame-type)
+ (window-put w 'focus-mode group-frame-focus-mode)
+ (window-put w 'gravity group-frame-gravity)
+ (window-put w 'title-position group-frame-title-position)
+ (window-put w 'never-iconify group-frame-never-iconify)
+ (window-put w 'depth group-frame-depth)
+ (window-put w 'fixed-position group-frame-fixed-position)
+ (window-put w 'never-maximize group-frame-never-maximize)
+ (window-put w 'maximized-vertically group-frame-maximized-vertically)
+ (window-put w 'maximized-horizontally group-frame-maximized-horizontally)
+ (window-put w 'maximized-fullscreen group-frame-maximized-fullscreen)
+ (window-put w 'unmaximized-type group-frame-unmaximized-type)
+ (window-put w 'unmaximized-geometry group-frame-unmaximized-geometry)
+ ;; reframe w here, tab-refresh-group expectet
+ ;; the same frame for w and win
+ (reframe-window w)
+ (tab-put-window-in-group w index)
+ (tab-delete-window-from-group w index2)
+ (resize-window-to w (car dim) (cdr dim))
+ (move-window-to w (car pos) (cdr pos))
+ (when (and group-frame-to-workspaces group-frame-from-workspaces
+ (not (eq group-frame-to-workspaces group-frame-from-workspaces)))
+ (move-window-to-workspace w group-frame-from-workspaces group-frame-to-workspaces))
+ (setq tab-refresh-lock t)
+ (when win-is-sticky
+ (make-window-sticky win)
+ (make-window-sticky w))
+ (tab-refresh-group w 'frame)
+ (set-input-focus w)
+ (if (not (window-tabbed-p win)) (window-put win 'tabbed t))
+ (window-put w 'tabbed t)))))
+
(define (tab-release-window w)
"Release the window from its group."
(setq release-window nil)
Attachment:
signature.asc
Description: PGP signature
| Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |