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

Initial window size isn't restored after maximize #110

Closed
sojusnik opened this issue Nov 21, 2016 · 8 comments
Closed

Initial window size isn't restored after maximize #110

sojusnik opened this issue Nov 21, 2016 · 8 comments

Comments

@sojusnik
Copy link

sojusnik commented Nov 21, 2016

When a window is maximized (with a move to center/maximize shortcut), then the initial window size isn't restored, although it works with f.i. move to right, like you'll see in this video.

Shortcuts used in the video:
move to right
move to right
move to right
unmaximize (see in dconf at org.gnome.desktop.wm.keybindings)
move to center/maximize (only once)
unmaximize
move to center/maximize (twice)
unmaximize

As you can see, after move to center/maximize (twice) the window takes the center width, specified in the extensions' settings (in my case 70).

Is this a bug or by design?

For me it would be much better and logical, if the initial window size would be also restored after using move to center/maximize twice.

@negesti
Copy link
Owner

negesti commented Nov 24, 2016

It's kind of "by design" :)

What you describe is the build in functionality of maximize and unmaximize (super up, down). Must of the time I use "move to center" to move a small window to the center of the screen, maximize it if it's still to small and then move it "back" using win + numPad.

I will come back to this, once the extension works properly on gnome-shell 3.22.

If you want to fix this on you own, you just have to change extension.js _moveFocused function:

    // line 595
    if (where == "c")  {
    	
    	// TODO check the config how move-to-center should behave
    
    	 var flags = Meta.MaximizeFlags.HORIZONTAL | Meta.MaximizeFlags.VERTICAL;
    	 if (win.maximized_horizontally && win.maximized_vertically) {
    	    win.unmaximize(flags);
    	 } else {
    	    win.maximize(flags);
    	 }
    
    }

@sojusnik
Copy link
Author

sojusnik commented Dec 8, 2016

I see, thanks for clarifying that!

@sojusnik
Copy link
Author

@negesti
Can you officially add the code from your last post to the extension and make an appropriate setting for it please? It's very inconvenient to edit the code manually after every update :/

@negesti
Copy link
Owner

negesti commented Jan 15, 2017

sorry totally forgot about that, fix is on the way

@negesti
Copy link
Owner

negesti commented Jan 15, 2017

question remains which issue i wanted to tag with "Wont fix" 😕

@sojusnik
Copy link
Author

Thanks :))

@sojusnik
Copy link
Author

Just wanted to ask, if you've submitted the new version, with this fix, to gnome extension website, since I didn't receive an update on that?

@negesti
Copy link
Owner

negesti commented Feb 28, 2017

The extension is not working properly with wayland and ends up in a SegFaul everytime time preferences windows is opened. I have to find an alternative to get the running apps from wayland. wnck is obviously not an option..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants