summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2005-01-09 19:27:22 +0000
committerElijah Newren <newren@src.gnome.org>2005-01-09 19:27:22 +0000
commitbe29c6965339585b879f69cb5e804b9458da0087 (patch)
treebb3ff83deaf3396c7d19d57662a41f9ec4b743b6
parentc0924402d400d896f31932bc6e226ec166d2aed3 (diff)
downloadmetacity-be29c6965339585b879f69cb5e804b9458da0087.tar.gz
Don't focus the panel on click. Fixes #160470 (and 100470 and removes the
2005-01-09 Elijah Newren <newren@gmail.com> Don't focus the panel on click. Fixes #160470 (and 100470 and removes the need for the hack from 128200) * doc/how-to-get-focus-right.txt: Update section on focusing non-decorated windows (specifically, DOCKS and DESKTOPS) * src/display.c (event_callback): don't focus dock windows on click
-rw-r--r--ChangeLog11
-rw-r--r--doc/how-to-get-focus-right.txt13
-rw-r--r--src/display.c26
3 files changed, 33 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 41e0d012..030b5e09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-01-09 Elijah Newren <newren@gmail.com>
+
+ Don't focus the panel on click. Fixes #160470 (and 100470 and
+ removes the need for the hack from 128200)
+
+ * doc/how-to-get-focus-right.txt: Update section on focusing
+ non-decorated windows (specifically, DOCKS and DESKTOPS)
+
+ * src/display.c (event_callback): don't focus dock windows on
+ click
+
2005-01-06 Elijah Newren <newren@gmail.com>
Make sure the save session dialog appears focused. Fixes #162983.
diff --git a/doc/how-to-get-focus-right.txt b/doc/how-to-get-focus-right.txt
index 2f5da047..2f9f03e9 100644
--- a/doc/how-to-get-focus-right.txt
+++ b/doc/how-to-get-focus-right.txt
@@ -76,9 +76,13 @@ and LeaveNotify events should be ignored (they can be generated
without using the mouse, for example, by grabs).
Finally, windows of type WM_DOCK or WM_DESKTOP (e.g. the desktop and
-the panel) present a special case. For all focus modes, we only focus
-these windows if the user clicks on them or uses Ctrl-Alt-Tab to
-navigate to them.
+the panel) present a special case, at least partially due to the lack
+of decorations. For WM_DESKTOP windows, we only focus them if the
+user explicitly requests it (e.g. clicks on the window, uses
+Ctrl-Alt-Tab to navigate to it, uses a keybinding to show the desktop,
+etc.). For WM_DOCK windows, we do not focus unless we receive a very
+explicit request (e.g. Ctrl-Alt-Tab or a _NET_ACTIVE_WINDOW message;
+not normal clicks).
@@ -94,7 +98,8 @@ To read more about the bugs that inspired these choices:
- Ignoring EnterNotify and LeaveNotify events during keynav
http://bugzilla.gnome.org/show_bug.cgi?id=101190
- Not focusing panels
- http://bugzilla.gnome.org/show_bug.cgi?id=120100 (maybe a different bug?)
+ http://bugzilla.gnome.org/show_bug.cgi?id=160470
+ http://bugzilla.gnome.org/show_bug.cgi?id=120100
There were many bugs which had to be fixed to get all the above
working; they helped form these policies and/or show the difficulties
diff --git a/src/display.c b/src/display.c
index fa57f034..006f8218 100644
--- a/src/display.c
+++ b/src/display.c
@@ -1598,32 +1598,32 @@ event_callback (XEvent *event,
if (unmodified ||
event->xbutton.button == 1)
{
+ /* don't focus if frame received, will be lowered in
+ * frames.c or special-cased if the click was on a
+ * minimize/close button.
+ */
if (!frame_was_receiver)
{
- /* don't focus if frame received, will be lowered in
- * frames.c or special-cased if the click was on a
- * minimize/close button.
- */
-
/* Raise on clicking the client area always or only
* in click to focus mode? The debate rages.
* Feel free to change TRUE to FALSE or vice versa
*/
if (TRUE /* meta_prefs_get_focus_mode () == META_FOCUS_MODE_CLICK */)
+ meta_window_raise (window);
+ else
+ meta_topic (META_DEBUG_FOCUS,
+ "Not raising window on click due to mouse/sloppy focus mode\n");
+
+ /* Don't focus panels--they must explicitly request focus.
+ * See bug 160470
+ */
+ if (window->type != META_WINDOW_DOCK)
{
- meta_window_raise (window);
-
meta_topic (META_DEBUG_FOCUS,
"Focusing %s due to unmodified button %d press (display.c)\n",
window->desc, event->xbutton.button);
meta_window_focus (window, event->xbutton.time);
}
- else
- {
- meta_topic (META_DEBUG_FOCUS,
- "Not raising window on click due to mouse/sloppy focus mode\n");
- meta_window_focus (window, event->xbutton.time);
- }
}
/* you can move on alt-click but not on