Skip to content

Implement maximize gesture#2789

Open
leolost2605 wants to merge 2 commits intomainfrom
leolost/maximize-gesture
Open

Implement maximize gesture#2789
leolost2605 wants to merge 2 commits intomainfrom
leolost/maximize-gesture

Conversation

@leolost2605
Copy link
Copy Markdown
Member

@leolost2605 leolost2605 commented Mar 2, 2026

Fixes #1697

On my system touchegg had a gesture configured for four finger swipe down which would mess with this gesture but idk if that's just on my system. If the gesture is configured for you too just kill touchegg and you can test this.

To test make sure you enable it via dconf editor and not via the settings because that would also enable the touchegg gesture which also messes with this.

I'm not sure how the old gesture worked but I decided to go for swipe up -> maximize, swipe down -> unmaximize.
It will animate a tile from the window position to maximized and from maximized to the old window position. I'd be happy about some UX input here whether it's ok like it's currently or what could be improved :)

Kooha-2026-03-02-21-50-17.mp4

@leolost2605 leolost2605 force-pushed the leolost/maximize-gesture branch from 025290b to cf784bf Compare March 2, 2026 20:53
@leolost2605 leolost2605 changed the title WIP: Implement maximize gesture Implement maximize gesture Mar 2, 2026
@leolost2605 leolost2605 requested review from a team March 2, 2026 20:59
@leolost2605 leolost2605 marked this pull request as ready for review March 2, 2026 20:59
@leolost2605 leolost2605 force-pushed the leolost/maximize-gesture branch from cf784bf to 3aef6a4 Compare March 2, 2026 20:59
Comment thread src/Widgets/WindowMaximizer.vala Outdated
@leolost2605 leolost2605 force-pushed the leolost/maximize-gesture branch from 3aef6a4 to 8ab3b34 Compare March 22, 2026 12:47
@garaevdi
Copy link
Copy Markdown
Contributor

garaevdi commented Apr 2, 2026

Tested it once more, but still it's kinda broken. Could get_unmaximized_state_geometry () return garbage data instead of null? This could also be related to my multimonitor setup or to the fact that I'm using mutter 49.

Kooha-2026-04-02-12-04-05.mp4

}

public override void commit_progress (GestureAction action, double commit) requires (action == TOGGLE_MAXIMIZED) {
if (current_window == null) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check should be something like: if (current_window == null || current_window.get_window_type () != Meta.WindowType.NORMAL || !current_window.can_maximize ()) so this wouldn't happen

Kooha-2026-04-04-14-55-30.mp4

If we managed to register our captured event handler before another
instance it can happen that we steal the gesture from the other
instance.
E.g. the user clearly swipes horizontal but once they swiped
long enough they drifted over the vertical threshold and we
will start stealing the gesture.
@leolost2605 leolost2605 force-pushed the leolost/maximize-gesture branch from 41a1fb3 to bc38426 Compare April 7, 2026 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement "Toggle Maximized" gesture in Gala

2 participants