Gesturefy icon indicating copy to clipboard operation
Gesturefy copied to clipboard

Full screen is alway maximising

Open pest4711 opened this issue 8 years ago • 8 comments

The gesture for Full Screen does not toggle between normal size and full screen. After going full screen (which works!) and repeating the gesture the window does not return to its normal size but is maximised (with window title). F11 does toggle between Full Screen and normal size.

pest4711 avatar Nov 17 '17 13:11 pest4711

Damn, you found my little secret :) The problem is, that I don't know the previous state of the window after I've set it to fullscreen mode, so I decided to maximize it.

Robbendebiene avatar Nov 18 '17 16:11 Robbendebiene

...just stumbled about it :-)

Just an idea: Among the window properties are state ("normal", "minimized", "maximized", "fullscreen"), top, left, width and heigth. If they are saved for a "normal" window before going fullscreen it should be possible to restore them with chrome.windows.update to the "normal" state with the saved geometry.

(https://developer.chrome.com/extensions/windows)

pest4711 avatar Nov 19 '17 17:11 pest4711

Yep, it basically would be enough to just store the previous state, because Firefox saves the dimensions by itself. But currently none of the actions does something like this, all of them work stateless. That's the main reason why I decided against keeping track of all the possible user windows. Of course this doesn't make sense from a user perspective, it's more a programming design decision. I'm still torn between both solutions.

Robbendebiene avatar Nov 19 '17 18:11 Robbendebiene

Sure, keeping track of all user windows would be a lot of work. But if Firefox saves the dimensions by itself - what happens when you update an already fullscreened window not to 'maximized' but to 'normal' again?

pest4711 avatar Nov 21 '17 12:11 pest4711

It will always go to the last "normal windowed" state and not to the maximized one, which it may had before.

Robbendebiene avatar Nov 21 '17 13:11 Robbendebiene

Isn't this exactly what F11 does? So the action Fullscreen: function () { chrome.windows.getCurrent((win) => { if (win.state === 'fullscreen') chrome.windows.update(win.id, { state: 'normal' }); else chrome.windows.update(win.id, { state: 'fullscreen' }); }); } would do exactly what F11 does. One would expect the fullscreen gesture to do the same as F11.

pest4711 avatar Nov 22 '17 15:11 pest4711

If you change your window to: Unmaximized window > maximized window > fullscreen Then your function will revert to the unmaximized window (or called normal window), but it should revert to the maximized window.

Robbendebiene avatar Nov 22 '17 16:11 Robbendebiene

You're right. This differs from the F11 behaviour. But, I really would prefer this quirk over ending up with a lot of maximized windows ... Especially as there seems to be no gesture to go from maximized to normal (unmaximized) size.

pest4711 avatar Nov 24 '17 17:11 pest4711