Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support focusing windows without raising them on X11 #193

Merged
merged 2 commits into from
Jan 11, 2020

Conversation

drmfinlay
Copy link
Member

This PR implements set_focus() methods for each Window class and allows using it in the BringApp and FocusWindow actions via an optional focus_only argument (False by default). The X11Window class has the set_focus() method since it was introduced (#102).

set_focus() and focus_only only currently do anything different on X11 (Linux). Windows and macOS don't seem to support focusing windows without raising them, so set_focus() is just an alias for set_foreground() on those platforms.

The set_focus() method is an alias for the set_foreground() method
on every platform except X11, where it focuses the target window,
but does not raise it.
This optional argument allows focusing a matching window without
raising it above other windows. The argument currently only does
anything different on X11 (Linux). Windows and macOS don't seem
to support this.
@drmfinlay drmfinlay added Enhancement Enhancement existing feature Linux/X11 Issue regarding Linux or X11 support labels Jan 11, 2020
@drmfinlay drmfinlay self-assigned this Jan 11, 2020
@drmfinlay drmfinlay merged commit 5540b2d into master Jan 11, 2020
@drmfinlay drmfinlay deleted the feat/set-focus branch January 11, 2020 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhancement existing feature Linux/X11 Issue regarding Linux or X11 support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant