Update of /project/eclipse/cvsroot/eclipse
In directory clnet:/tmp/cvs-serv5582
Modified Files:
widgets.lisp misc.lisp
Log Message:
Fix: bug, desktop window were restacked when one of their modal or transient for were.
--- /project/eclipse/cvsroot/eclipse/widgets.lisp 2007/11/02 09:11:42 1.50
+++ /project/eclipse/cvsroot/eclipse/widgets.lisp 2007/11/02 09:33:08 1.51
@@ -1,5 +1,5 @@
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
-;;; $Id: widgets.lisp,v 1.50 2007/11/02 09:11:42 ihatchondo Exp $
+;;; $Id: widgets.lisp,v 1.51 2007/11/02 09:33:08 ihatchondo Exp $
;;;
;;; ECLIPSE. The Common Lisp Window Manager.
;;; Copyright (C) 2000, 2001, 2002 Iban HATCHONDO
@@ -274,6 +274,10 @@
(setf (window-priority (if master (widget-window master) window) desk-w)
(if desk-w :above :below)))))
+(defun application-netwm-type-p (application type)
+ "Returns t if application is of the given type."
+ (member type (application-type application)))
+
(defun application-panel-p (application)
"Returns t if application is a panel (e.g: _net_wm_window_type_dock)."
(member :_net_wm_window_type_dock (application-type application)))
--- /project/eclipse/cvsroot/eclipse/misc.lisp 2007/05/07 13:22:50 1.39
+++ /project/eclipse/cvsroot/eclipse/misc.lisp 2007/11/02 09:33:08 1.40
@@ -1,5 +1,5 @@
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
-;;; $Id: misc.lisp,v 1.39 2007/05/07 13:22:50 ihatchondo Exp $
+;;; $Id: misc.lisp,v 1.40 2007/11/02 09:33:08 ihatchondo Exp $
;;;
;;; This file is part of Eclipse.
;;; Copyright (C) 2002 Iban HATCHONDO
@@ -210,11 +210,12 @@
(first-win (windows &optional above-p)
(car (if above-p (last windows) windows)))
(restack (app sib-app priority)
- (let* ((window (widget-window (or (application-master app) app)))
- (sm (when sib-app (application-master sib-app)))
- (sibling (when sib-app (widget-window (or sm sib-app)))))
- (unless (xlib:window-equal window sibling)
- (setf (xlib:window-priority window sibling) priority)))))
+ (unless (application-netwm-type-p app :_net_wm_window_type_desktop)
+ (let* ((window (widget-window (or (application-master app) app)))
+ (sm (when sib-app (application-master sib-app)))
+ (sibling (when sib-app (widget-window (or sm sib-app)))))
+ (unless (xlib:window-equal window sibling)
+ (setf (xlib:window-priority window sibling) priority))))))
(let* ((win (or (lookup-app-w (lookup-widget window)) window))
(sib (or (lookup-app-w (lookup-widget sibling)) sibling))
(widget (lookup-widget win))