Add configurable window position setting#184
Open
mircea-pop wants to merge 1 commit intotom-james-watson:masterfrom
Open
Add configurable window position setting#184mircea-pop wants to merge 1 commit intotom-james-watson:masterfrom
mircea-pop wants to merge 1 commit intotom-james-watson:masterfrom
Conversation
The picker window always opens centered on the primary monitor, which is inconvenient on multi-monitor setups where the user may be working on a different screen. This adds a "Window Position" preference with two options: "Center" (existing default behavior) and "Mouse Cursor" (opens the picker at the current pointer location).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Window Position preference to the Settings dialog with two options:
Gtk.WindowPosition.MOUSE) - opens on the monitor where the mouse cursor currently isProblem: On multi-monitor setups, the picker always opens centered on the primary monitor, even when the user is working on a different screen.
Scope: This PR ensures the picker opens on the correct monitor (where the mouse is). Note that on Wayland, the compositor controls exact window placement -
Gtk.WindowPosition.MOUSEtells GTK which monitor to use, but the compositor (e.g. Mutter) determines the exact position within that monitor. Precise cursor-following positioning would require Wayland-specific APIs (e.g.xdg-positioneror layer-shell) which is outside the scope of this change.Follows existing patterns for settings (theme, skintone) - stored via
shelveinuser_data.py, exposed as a combo box insettings.py.Changes
emote/user_data.py- window position constants,load_window_position(),update_window_position()emote/settings.py-"Window Position" combo box in Preferencesemote/picker.py- use configured position instead of hardcodedCENTERHow was tested