Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gtk gtk
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,600
    • Issues 1,600
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 217
    • Merge requests 217
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • gtkgtk
  • Issues
  • #85
Closed
Open
Issue created Mar 14, 2018 by Samuel Thibault@sthibaulDeveloper

gail shouldn't emit window deactivate/activate on window manager shortcut presses

Hello,

How to reproduce:

  • Run an X11 session
  • In accerciser, in the Event Monitor, enable window:activate and window:deactivate, and enable Monitor Events
  • Switch to a gtk application
  • Press a shortcut handled by the window manager (e.g. raising the volume)
  • In accerciser, window:deactivate and window:activate events show up

This makes screen readers think focus has moved to another application, then back to the original application, and thus makes them re-speak the context of the application, which is painful for just shortcuts.

What happens is that

  • the window manager use X11's grab feature to implement shortcuts.
  • On shortcut keypress, Gtk receives FocusOut NotifyGrab then FocusIn NotifyUngrab.
  • In ./gdk/x11/gdkdevicemanager-core-x11.c's _gdk_device_manager_core_handle_focus these are properly handled (as well as the NotifyWhileGrabbed case), i.e. toplevel-has_focus is updated, but toplevel->has_focus_window is not.
  • _gdk_device_manager_core_handle_focus however emits a GDK_FOCUS_CHANGE event when has_focus changes, not when has_focus_window changes.
  • and ./gtk/a11y/gtkaccessibility.c's gail_focus_watcher watches GDK_FOCUS_CHANGE, and thus emits window:deactivate/activate.

I'd say we could introduce GDK_FOCUS_WINDOW_CHANGE, for gail to only track real focus changes, and not transient focus changes?

Samuel

Assignee
Assign to
Time tracking