From ihatchondo at common-lisp.net Fri Nov 2 09:11:42 2007 From: ihatchondo at common-lisp.net (ihatchondo) Date: Fri, 2 Nov 2007 04:11:42 -0500 (EST) Subject: [Eclipse-cvs] CVS eclipse Message-ID: <20071102091142.ADFD460039@common-lisp.net> Update of /project/eclipse/cvsroot/eclipse In directory clnet:/tmp/cvs-serv32135 Modified Files: widgets.lisp Log Message: Fix: focusing bug in application like citrix meta frame. --- /project/eclipse/cvsroot/eclipse/widgets.lisp 2007/05/11 12:28:40 1.49 +++ /project/eclipse/cvsroot/eclipse/widgets.lisp 2007/11/02 09:11:42 1.50 @@ -1,5 +1,5 @@ ;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*- -;;; $Id: widgets.lisp,v 1.49 2007/05/11 12:28:40 ihatchondo Exp $ +;;; $Id: widgets.lisp,v 1.50 2007/11/02 09:11:42 ihatchondo Exp $ ;;; ;;; ECLIPSE. The Common Lisp Window Manager. ;;; Copyright (C) 2000, 2001, 2002 Iban HATCHONDO @@ -472,6 +472,11 @@ (protocols (ignore-errors (xlib:wm-protocols window))) (input-p (and hint (logbitp 0 (first hint)) (= 1 (second hint)))) (take-focus-p (ignore-errors (member :wm_take_focus protocols)))) + (when (or (not hint) (not (logbitp 0 (first hint)))) + ;; The input model is not set in the property. For some application + ;; that forgot to precise it we'll act as if it was (otherwise they + ;; can't get focused). + (setf input-p t)) (cond ((and (not input-p) (not take-focus-p)) :no-input) ((and (not input-p) take-focus-p) :globally-active) ((and input-p (not take-focus-p)) :passive) From ihatchondo at common-lisp.net Fri Nov 2 09:33:09 2007 From: ihatchondo at common-lisp.net (ihatchondo) Date: Fri, 2 Nov 2007 04:33:09 -0500 (EST) Subject: [Eclipse-cvs] CVS eclipse Message-ID: <20071102093309.EBC94232B3@common-lisp.net> 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)) From ihatchondo at common-lisp.net Sun Nov 4 22:27:19 2007 From: ihatchondo at common-lisp.net (ihatchondo) Date: Sun, 4 Nov 2007 17:27:19 -0500 (EST) Subject: [Eclipse-cvs] CVS eclipse/lib Message-ID: <20071104222719.EA0F669006@common-lisp.net> Update of /project/eclipse/cvsroot/eclipse/lib In directory clnet:/tmp/cvs-serv15021 Modified Files: netwm-manager.lisp Log Message: Update: according to 1.4 draft2, note that nothing has been done for the compositing manager selction owning, since this is a complete process to be handled rather than just a property ... --- /project/eclipse/cvsroot/eclipse/lib/netwm-manager.lisp 2005/03/01 22:41:34 1.22 +++ /project/eclipse/cvsroot/eclipse/lib/netwm-manager.lisp 2007/11/04 22:27:19 1.23 @@ -1,9 +1,9 @@ ;;; -*- Mode: Lisp; Package: EXTENDED-WINDOW-MANAGER-HINTS -*- -;;; $Id: netwm-manager.lisp,v 1.22 2005/03/01 22:41:34 ihatchondo Exp $ +;;; $Id: netwm-manager.lisp,v 1.23 2007/11/04 22:27:19 ihatchondo Exp $ ;;; ;;; This is the CLX support for the managing with gnome. ;;; -;;; Copyright (C) 2002 Iban HATCHONDO +;;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Iban HATCHONDO ;;; contact : hatchond at yahoo.fr ;;; ;;; This program is free software; you can redistribute it and/or @@ -46,12 +46,12 @@ #:net-wm-icon-geometry #:net-wm-icon #:net-wm-pid #:net-wm-handled-icons #:net-wm-allowed-actions #:net-wm-strut-partial - #:net-wm-user-time + #:net-wm-user-time #:net-wm-user-time-window #:intern-atoms) (:documentation "This package implements the Extended Window Manager Hints - (from Freedesktop.org). - version 1.3 (June 19, 2003) - + (from Freedesktop.org). - version 1.4 draft2 - In order to use it, you should first call intern-atoms to be sure all atoms are in the server.")) @@ -70,7 +70,7 @@ "_NET_ACTIVE_WINDOW" "_NET_WORKAREA" "_NET_SUPPORTING_WM_CHECK" "_NET_VIRTUAL_ROOTS" "_NET_DESKTOP_LAYOUT" - + "_NET_RESTACK_WINDOW" "_NET_REQUEST_FRAME_EXTENTS" "_NET_MOVERESIZE_WINDOW" "_NET_CLOSE_WINDOW" "_NET_WM_MOVERESIZE" @@ -84,24 +84,29 @@ "_NET_WM_ICON_GEOMETRY" "_NET_WM_ICON" "_NET_WM_PID" "_NET_WM_HANDLED_ICONS" "_NET_WM_USER_TIME" "_NET_FRAME_EXTENTS" + "_NET_WM_USER_TIME_WINDOW" + "_NET_WM_FULL_PLACEMENT" ;; "_NET_WM_MOVE_ACTIONS" - "_NET_WM_WINDOW_TYPE_DESKTOP" "_NET_WM_STATE_MODAL" - "_NET_WM_WINDOW_TYPE_DOCK" "_NET_WM_STATE_STICKY" - "_NET_WM_WINDOW_TYPE_TOOLBAR" "_NET_WM_STATE_MAXIMIZED_VERT" - "_NET_WM_WINDOW_TYPE_MENU" "_NET_WM_STATE_MAXIMIZED_HORZ" - "_NET_WM_WINDOW_TYPE_UTILITY" "_NET_WM_STATE_SHADED" - "_NET_WM_WINDOW_TYPE_SPLASH" "_NET_WM_STATE_SKIP_TASKBAR" - "_NET_WM_WINDOW_TYPE_DIALOG" "_NET_WM_STATE_SKIP_PAGER" - "_NET_WM_WINDOW_TYPE_NORMAL" "_NET_WM_STATE_HIDDEN" - "_NET_WM_STATE_FULLSCREEN" - "_NET_WM_STATE_ABOVE" - "_NET_WM_STATE_BELOW" - "_NET_WM_STATE_DEMANDS_ATTENTION" - + "_NET_WM_WINDOW_TYPE_DESKTOP" "_NET_WM_STATE_MODAL" + "_NET_WM_WINDOW_TYPE_DOCK" "_NET_WM_STATE_STICKY" + "_NET_WM_WINDOW_TYPE_TOOLBAR" "_NET_WM_STATE_MAXIMIZED_VERT" + "_NET_WM_WINDOW_TYPE_MENU" "_NET_WM_STATE_MAXIMIZED_HORZ" + "_NET_WM_WINDOW_TYPE_UTILITY" "_NET_WM_STATE_SHADED" + "_NET_WM_WINDOW_TYPE_SPLASH" "_NET_WM_STATE_SKIP_TASKBAR" + "_NET_WM_WINDOW_TYPE_DIALOG" "_NET_WM_STATE_SKIP_PAGER" + "_NET_WM_WINDOW_TYPE_NORMAL" "_NET_WM_STATE_HIDDEN" + "_NET_WM_WINDOW_TYPE_DROPDOWN_MENU" "_NET_WM_STATE_FULLSCREEN" + "_NET_WM_WINDOW_TYPE_POPUP_MENU" "_NET_WM_STATE_ABOVE" + "_NET_WM_WINDOW_TYPE_TOOLTIP" "_NET_WM_STATE_BELOW" + "_NET_WM_WINDOW_TYPE_NOTIFICATION" "_NET_WM_STATE_DEMANDS_ATTENTION" + "_NET_WM_WINDOW_TYPE_COMBO" + "_NET_WM_WINDOW_TYPE_DND" + "_NET_WM_ALLOWED_ACTIONS" "_NET_WM_ACTION_MOVE" "_NET_WM_ACTION_RESIZE" + "_NET_WM_ACTION_MINIMIZE" "_NET_WM_ACTION_SHADE" "_NET_WM_ACTION_STICK" "_NET_WM_ACTION_MAXIMIZE_HORZ" @@ -431,9 +436,9 @@ (defun net-wm-icon (window) "Returns a vector of possible icons for the client. This is an vector - of (unsigned-byte 32) ARGB with high byte being A, low byte being B. - The first two cardinals are width, height. Data is in rows, left to right - and top to bottom." + of (unsigned-byte 32) ARGB with high byte being A, low byte being B. + The first two cardinals are width, height. Data is in rows, left to right + and top to bottom." (get-property window :_NET_WM_ICON :result-type 'vector)) ;; _NET_WM_HANDLED_ICONS @@ -478,6 +483,35 @@ (defsetf net-wm-user-time (window) (time) `(change-property ,window :_NET_WM_USER_TIME (list ,time) :cardinal 32)) +;; _NET_WM_USER_TIME_WINDOW + +(defun net-wm-user-time-window (window &key window-id) + "This property contains the XID of a window on which the client sets + the _NET_WM_USER_TIME property. Clients should check whether the window + manager supports _NET_WM_USER_TIME_WINDOW and fall back to setting the + _NET_WM_USER_TIME property on the toplevel window if it doesn't. + Rationale: Storing the frequently changing _NET_WM_USER_TIME property + on the toplevel window itself causes every application that is interested + in any of the properties of that window to be woken up on every keypress, + which is particularly bad for laptops running on battery power. + + - window (xlib:window): The window from which the property must be read. + - :window-id (boolean, default to nil): if t then the returned value is + an xlib:card29 window ID, otherwise an xilb:window is returned or nil if + the property is not set." + (car (get-window-property window :_NET_WM_USER_TIME_WINDOW (not window-id)))) + +(defsetf net-wm-user-time-window (window &key window-id) (value) + "Sets the _NET_WM_USER_TIME property. + - window (xlib:window): The window from which the property must be read. + - value (or xlib:window xlib:card29): property value. + - :window-id (boolean, default to nil): indicates how the value must + be interpreted." + `(change-property ,window + :_NET_WM_USER_TIME_WINDOW + (list ,value) :window 32 :mode :replace + :transform (unless ,window-id #'xlib:window-id))) + ;; _NET_FRAME_EXTENTS (defun net-frame-extents (window)