Skip to content

Conversation

@jtaala
Copy link
Collaborator

@jtaala jtaala commented Dec 26, 2023

Fixes #739, and partially fixes #638.

This PR includes improvements to window fullscreening behaviours:

  1. better handle application windows that start as fullscreen windows;
  2. restores window size and positions after un-fullscreening;
  3. scratching a window now properly activates that window (previously is wasn't properly activated);
  4. restores window size and positions after when scratching a window;

(1) is part of the fix required for #638 (the other part is an upstream issue that will be fixed in mutter with patch 3401 - which has been merged but not released yet).

These changes fix issues for me in kodi - but not the osu! issues (which requires also requires mutter fixes as mentioned above).

@jtaala jtaala marked this pull request as draft December 26, 2023 21:55
@jtaala jtaala force-pushed the fix-insert-fullscreen-windows branch 5 times, most recently from ceea1d7 to 2a5e02f Compare December 28, 2023 00:03
@jtaala jtaala force-pushed the fix-insert-fullscreen-windows branch 2 times, most recently from 11bde66 to a74abed Compare December 28, 2023 00:27
@jtaala jtaala force-pushed the fix-insert-fullscreen-windows branch from a74abed to 27fd5dd Compare December 28, 2023 00:28
@jtaala jtaala force-pushed the fix-insert-fullscreen-windows branch from f96a59b to 8fd5ccd Compare December 28, 2023 01:26
@jtaala jtaala changed the title Fix / improve handing (inserting) application windows that start as fullscreen windows Fix / improve fullscreening behaviour: restore pre-fullscreen window size/position; better manage windows that start fullscreen Dec 28, 2023
@jtaala jtaala marked this pull request as ready for review December 28, 2023 01:37
@jtaala jtaala requested a review from Lythenas December 28, 2023 01:46
@jtaala jtaala changed the title Fix / improve fullscreening behaviour: restore pre-fullscreen window size/position; better manage windows that start fullscreen Fix / improve window behaviour: restore pre-fullscreen/pre-scratch window size/position; better manage windows that start fullscreen Dec 28, 2023
@jtaala
Copy link
Collaborator Author

jtaala commented Jan 4, 2024

The other option is I can move this new approach I'm working on to a new branch and release the commit you approved?

honestly sounds like a plan

Yeah, especially since this new approach might turn out to have more issues than the previous approach...

@jtaala
Copy link
Collaborator Author

jtaala commented Jan 4, 2024

@Thesola10 - do have the commit number you approved?

@Thesola10
Copy link
Collaborator

I had c0153754 tagged as working before pulling updates today

@jtaala
Copy link
Collaborator Author

jtaala commented Jan 4, 2024

Okay, I'm going to reset this PR branch back to that commit.

@jtaala jtaala force-pushed the fix-insert-fullscreen-windows branch from c214755 to c015375 Compare January 4, 2024 14:04
@jtaala jtaala marked this pull request as ready for review January 4, 2024 14:05
@jtaala
Copy link
Collaborator Author

jtaala commented Jan 4, 2024

Hey @Thesola10, can you pull and test the latest on this branch. A few small changes here:

  • behaviour change: if you have a fullscreen window and select another tiled window (on the space) - unfullscreen the fullscreened window. This feels more natural to me and allows us to fix the following multimonitor bugs:
  • remove flash of topbar spacing when moving mouse to another monitor;
  • stop window position bar from showing on monitor you left when it has a fullscreen window.

Copy link
Collaborator

@Thesola10 Thesola10 left a comment

Choose a reason for hiding this comment

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

feels pretty nice, fixes fullscreen issues

@Lythenas
Copy link
Collaborator

Lythenas commented Jan 4, 2024

behaviour change: if you have a fullscreen window and select another tiled window (on the space) - unfullscreen the fullscreened window. This feels more natural to me and allows us to fix the following multimonitor bugs:

I think that could cause problems. I guess mostly with games or other things that are supposed to be always fullscreen. But let me test it a bit.

@Lythenas
Copy link
Collaborator

Lythenas commented Jan 4, 2024

Actually immediately found some^^

Normally when this game is fullscreen and you focusing another window (on the current or other monitor) the game minimizes). You have to Alt+Tab back to it again.

With these changes after navigating to another window on the same monitor, it looks like this:
Screenshot from 2024-01-04 18-33-36

The game still shows on top of other windows but you click through it to the window that is below. You can still get back to the game via Alt+Tab. Focusing another monitor while the game is maximized still minimizes it.

This means if you don't have a second monitor you can't tab out of the game anymore.

Another game (MTG Arena) is basically the same, except it takes up the entire screen and you just click through it but can't see anything.

Another game (Warframe) does not become fullscreen again after focusing away and back to it. You have to Alt+Enter twice (once to go to windowed mode and the second time to go to fullscreen mode again). I think that is implemented by the game. This game also does not lose focus when navigating to another monitor. So focusing another window on the same monitor is the only way to tab out of the game in PaperWM.

So I'm against the last couple of commits. Games make enough problems on Linux, we should try to avoid introducing any more^^

I think I was also on commit c015375 before and that worked fine.

Regarding the topbar behavior we can probably also change that without unfullscreening a window. E.g. we could consider a space fullscreen only if the active window is fullscreen (instead of any window). In #707 I also try to fix some of these issues.

@Lythenas
Copy link
Collaborator

Lythenas commented Jan 4, 2024

Also I noticed with the last commits navigating workspaces via Super+PageUp/Down does not complete the navigation. You are stuck in the zoomed out animation until you click a window to focus it.

Edit: Actually also the window navigation is the same. The window preview does not close until you click on a window. I saw this error in the logs. But it's not always generated:

gnome-shell[14942]: JS ERROR: TypeError: this.signals is null
                                            destroy@file:///home/ms/.local/share/gnome-shell/extensions/paperwm@paperwm.github.com/navigator.js:254:9
                                            dismissDispatcher@file:///home/ms/.local/share/gnome-shell/extensions/paperwm@paperwm.github.com/navigator.js:468:20
                                            _finish@file:///home/ms/.local/share/gnome-shell/extensions/paperwm@paperwm.github.com/navigator.js:228:26
                                            finishDispatching@file:///home/ms/.local/share/gnome-shell/extensions/paperwm@paperwm.github.com/navigator.js:454:24
                                            select@file:///home/ms/.local/share/gnome-shell/extensions/paperwm@paperwm.github.com/stackoverlay.js:211:19
                                            ClickOverlay/<@file:///home/ms/.local/share/gnome-shell/extensions/paperwm@paperwm.github.com/stackoverlay.js:131:18
                                            @resource:///org/gnome/shell/ui/init.js:21:20

@jtaala jtaala force-pushed the fix-insert-fullscreen-windows branch from ecde301 to 443dcd1 Compare January 4, 2024 21:31
@jtaala
Copy link
Collaborator Author

jtaala commented Jan 4, 2024

Actually immediately found some^^

Into the Breach!

Thanks @Lythenas for the further testing there. I've reverted the unfullscreening approach. And one of the fixes that relied on it.

Still have the small "bobble" issue, it was just a check on layout. Will see if there's something quick that can be done here to resolve that one too, otherwise will leave that one for later.

@jtaala
Copy link
Collaborator Author

jtaala commented Jan 6, 2024

Hey all, I believe I've fixed the "bobble" issue when moving mouse to another monitor when a fullscreen window is active.

Give this one a go.

Copy link
Collaborator

@Lythenas Lythenas left a comment

Choose a reason for hiding this comment

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

Works fine now.

@jtaala jtaala merged commit 84c6dab into develop Jan 8, 2024
@jtaala jtaala deleted the fix-insert-fullscreen-windows branch January 8, 2024 09:48
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.

Fullscreening a window and then unfullscreening change the window size (from original)

5 participants