Comments on focusing (on new code in CVS)
Erik Enge
erik at nittin.net
Mon Mar 24 18:30:01 UTC 2003
Erik Enge <eenge at prium.net> writes:
> - If I have two windows. Window 1 is focused and window 2 is behind
> window 1 but I can see both. If I now hit the maximize button on
> window 2, I'd expect it to become focused as well as maximized.
> Currently, it only gets maximized.
I'm trying to fix that with the following code in input.lisp:
;; Maximization
(defmethod event-process ((event button-release) (max-b maximize-button))
(when (< (event-code event) 4)
(with-slots (master window) max-b
(when (eq *focus-type* :on-click)
(vs:restack-window window (vs:nth-vscreen (root-vscreens *root*))))
(when master (draw-focused-decoration master))
(setf (netwm:net-active-window *root-window*) window))
(maximize-window (button-master max-b) (event-code event))))
It used to look like this:
;; Maximization
(defmethod event-process ((event button-release) (max-b maximize-button))
(when (< (event-code event) 4)
(maximize-window (button-master max-b) (event-code event))))
As the attached screenshot shows, the window is maximized and partly
focused. Two problems exist:
"partly focused" - as you can see (screenshot) the bigger window (the
one just maximized) is not focused (or has not loaded the pixmap that
represents the focusing) the title-bar. I can't explain why.
The window that was previously focus is, well, still focused. :) Do I
need to call some more code to defocus the current window before
focusing a new one, perhaps?
Thanks for any help,
Erik.
More information about the eclipse-devel
mailing list