[Eclipse-cvs] CVS eclipse
ihatchondo
ihatchondo at common-lisp.net
Mon May 7 13:22:50 UTC 2007
Update of /project/eclipse/cvsroot/eclipse
In directory clnet:/tmp/cvs-serv26719
Modified Files:
misc.lisp widgets.lisp input.lisp
Log Message:
Fix:
- configure-window when configuring panel window should honor size without guessing anything (misc.lisp).
- map-request race condition (input.lisp & widget.lisp)
Added: - application-panel-p predicate (widget.lisp)
--- /project/eclipse/cvsroot/eclipse/misc.lisp 2007/05/07 00:19:10 1.38
+++ /project/eclipse/cvsroot/eclipse/misc.lisp 2007/05/07 13:22:50 1.39
@@ -1,5 +1,5 @@
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
-;;; $Id: misc.lisp,v 1.38 2007/05/07 00:19:10 ihatchondo Exp $
+;;; $Id: misc.lisp,v 1.39 2007/05/07 13:22:50 ihatchondo Exp $
;;;
;;; This file is part of Eclipse.
;;; Copyright (C) 2002 Iban HATCHONDO
@@ -331,7 +331,7 @@
;; update sizes.
(when (or width height)
(with-event-mask ((or parent win))
- (when application
+ (when (and application (not (application-panel-p application)))
;; ensure width or height are compatible with wm-size-hints.
(let* ((prop (netwm:net-wm-state win))
(horz-p (member :_net_wm_state_maximized_horz prop))
--- /project/eclipse/cvsroot/eclipse/widgets.lisp 2007/05/04 08:26:14 1.47
+++ /project/eclipse/cvsroot/eclipse/widgets.lisp 2007/05/07 13:22:50 1.48
@@ -1,5 +1,5 @@
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
-;;; $Id: widgets.lisp,v 1.47 2007/05/04 08:26:14 ihatchondo Exp $
+;;; $Id: widgets.lisp,v 1.48 2007/05/07 13:22:50 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-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)))
+
(defun fullscreenable-p (application)
(with-slots (window) application
(let ((hint (ignore-errors (xlib:wm-normal-hints window))))
@@ -443,7 +447,8 @@
(if master
(multiple-value-bind (x y)
(xlib:translate-coordinates window 0 0 *root-window*)
- (xlib:reparent-window window *root-window* x y))
+ (xlib:reparent-window window *root-window* x y)
+ (event-process (make-event :destroy-notify) master))
(event-process (make-event :destroy-notify :window window) *root*))
(when state
(setf (wm-state window) state)
--- /project/eclipse/cvsroot/eclipse/input.lisp 2007/05/07 00:23:05 1.46
+++ /project/eclipse/cvsroot/eclipse/input.lisp 2007/05/07 13:22:50 1.47
@@ -1,5 +1,5 @@
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
-;;; $Id: input.lisp,v 1.46 2007/05/07 00:23:05 ihatchondo Exp $
+;;; $Id: input.lisp,v 1.47 2007/05/07 13:22:50 ihatchondo Exp $
;;;
;;; ECLIPSE. The Common Lisp Window Manager.
;;; Copyright (C) 2000, 2001, 2002 Iban HATCHONDO
@@ -27,6 +27,30 @@
;; Most general methods.
+(defmethod event-process ((event map-request) null-widget)
+ ;; When a client has requested to withdraw its top-level and wants then
+ ;; to map it back so quickly that we haven't got honored yet its withdrawal
+ ;; demand, this event is in fact send to the wrong parent and should be re
+ ;; directed to the real parent of the client top-level.
+ ;; The events schema is:
+ ;; 1 -> map-request => procede-decoration
+ ;; 2 -> unmap-notify => unmap master
+ ;; 3 -> synthetic unmap-notify => undecore-application
+ ;; 4 -> map-request
+ ;; What happen is that the client ask for mapping its top-level (4) after
+ ;; sending the synthetic unmap-notify (3), but WE have not handled it yet
+ ;; (otherwise said undecore-application has not been called). So Xserver
+ ;; generates a map-request event for the known parent: US ! But as soon
+ ;; as undecore-application will occurred we won't be the parent anymore
+ ;; and this event should rather have been sent to the real parent
+ ;; (aka the root window).
+ (with-slots (window (candidat event-window)) event
+ (multiple-value-bind (children parent) (xlib:query-tree window)
+ (declare (ignore children))
+ (unless (xlib:window-equal candidat parent)
+ (xlib:send-event parent :map-request
+ '(:substructure-redirect) :window window :event-window parent)))))
+
(defmethod event-process ((event mapping-notify) null-widget)
(declare (ignorable null-widget))
(with-slots (request start count) event
@@ -217,30 +241,7 @@
;;; Events for master (type: decoration)
(defmethod event-process ((event map-request) (master decoration))
- ;; When a client has requested to withdraw its top-level and wants then
- ;; to map it back so quickly that we haven't got honored yet its withdrawal
- ;; demand, this event is in fact send to the wrong parent and should be re
- ;; directed to the real parent of the client top-level.
- ;; The events schema is:
- ;; 1 -> map-request => procede-decoration
- ;; 2 -> unmap-notify => unmap master
- ;; 3 -> synthetic unmap-notify => undecore-application
- ;; 4 -> map-request
- ;; What happen is that the client ask for mapping its top-level (4) after
- ;; sending the synthetic unmap-notify (3), but WE have not handled it yet
- ;; (otherwise said undecore-application has not been called). So Xserver
- ;; generates a map-request event for the known parent: US ! But as soon
- ;; as undecore-application will occurred we won't be the parent anymore
- ;; and this event should rather have been sent to the real parent
- ;; (aka the root window).
- (with-slots (window (parent event-window)) event
- (multiple-value-bind (children real-parent) (xlib:query-tree window)
- (declare (ignore children))
- (if (xlib:window-equal parent real-parent)
- (xlib:map-window (event-window event))
- (xlib:send-event real-parent :map-request
- '(:substructure-redirect)
- :window window :event-window real-parent)))))
+ (xlib:map-window (event-window event)))
(defmethod event-process ((event configure-notify) (master decoration))
(with-slots ((master-window event-window) (app-window window)) event
More information about the Eclipse-cvs
mailing list