summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2005-02-25 20:14:08 +0000
committerElijah Newren <newren@src.gnome.org>2005-02-25 20:14:08 +0000
commitbea407e30918e6d8924461cae2a6f43834d0e809 (patch)
tree107c0ab016741de3d7883d026e8cc2217e69345c
parent6375bee8a2127262c9b0ed55148c7c24f0d05dda (diff)
downloadmetacity-bea407e30918e6d8924461cae2a6f43834d0e809.tar.gz
Prevent the visual bell from changing the focus window. Fixes #123366.
2005-02-25 Elijah Newren <newren@gmail.com> Prevent the visual bell from changing the focus window. Fixes #123366. * src/bell.c: (meta_bell_flash_screen): if not in click-to-focus mode and mouse_mode is also false, increment the focus sentinel so that we can ignore spurious EnterNotify and LeaveNotify events. * src.display.c: (event_callback): make sure to also ignore LeaveNotify events when the focus sentinel isn't clear
-rw-r--r--ChangeLog12
-rw-r--r--src/bell.c4
-rw-r--r--src/display.c7
3 files changed, 20 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f795119b..c737b661 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-02-25 Elijah Newren <newren@gmail.com>
+
+ Prevent the visual bell from changing the focus window. Fixes
+ #123366.
+
+ * src/bell.c: (meta_bell_flash_screen): if not in click-to-focus
+ mode and mouse_mode is also false, increment the focus sentinel so
+ that we can ignore spurious EnterNotify and LeaveNotify events.
+
+ * src.display.c: (event_callback): make sure to also ignore
+ LeaveNotify events when the focus sentinel isn't clear
+
2005-02-23 Elijah Newren <newren@gmail.com>
* src/window.c: (meta_window_new_with_attrs): Fix crash that
diff --git a/src/bell.c b/src/bell.c
index a8a1027d..2d208f73 100644
--- a/src/bell.c
+++ b/src/bell.c
@@ -78,6 +78,10 @@ meta_bell_flash_screen (MetaDisplay *display,
XSync (display->xdisplay, False);
XUnmapWindow (display->xdisplay, screen->flash_window);
}
+
+ if (meta_prefs_get_focus_mode () != META_FOCUS_MODE_CLICK &&
+ !display->mouse_mode)
+ meta_display_increment_focus_sentinel (display);
XFlush (display->xdisplay);
}
diff --git a/src/display.c b/src/display.c
index e63c1f3a..af83c7a3 100644
--- a/src/display.c
+++ b/src/display.c
@@ -1830,9 +1830,10 @@ event_callback (XEvent *event,
{
case META_FOCUS_MODE_MOUSE:
if ((window->frame == NULL || frame_was_receiver) &&
- event->xcrossing.mode != NotifyGrab &&
- event->xcrossing.mode != NotifyUngrab &&
- event->xcrossing.detail != NotifyInferior)
+ event->xcrossing.mode != NotifyGrab &&
+ event->xcrossing.mode != NotifyUngrab &&
+ event->xcrossing.detail != NotifyInferior &&
+ meta_display_focus_sentinel_clear (display))
{
if (window == display->expected_focus_window)
{