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

Need workaround to properly resize Gnome Apps #1

Open
pkkid opened this issue May 23, 2016 · 11 comments
Open

Need workaround to properly resize Gnome Apps #1

pkkid opened this issue May 23, 2016 · 11 comments

Comments

@pkkid
Copy link
Owner

pkkid commented May 23, 2016

Bug is being tracked upstream here:
https://bugzilla.gnome.org/show_bug.cgi?id=766496

When moving Nautilus, Gedit and other Gnome apps they are not moving to the proper location. They are off by x:23, y:23 w=-46 h:-46. If I first call window.set_shadow_width(0,0,0,0), then immediately call window.move_resize(...) just as before, they are moving to the correct location and width.

The move_resize() function is including the shadow width when moving. This is only happening on Gnome apps though. For example terminator and google_chrome are moved as expected when calling move_resize() even without calling set_shadow_width(0,0,0,0).

I am running on Ubuntu Gnome 16.04 and see problem on both Gnome 3.18 and 3.20.

@pkkid pkkid added the upstream label May 23, 2016
@pkkid
Copy link
Owner Author

pkkid commented May 24, 2016

Matthias Clasen [gtk+ developer] 2016-05-23 10:54:24 UTC
So you are dealing with foreign windows. GTK is not a window manager toolkit, so it does not offer many functions to get information about foreign windows. Your best bet is to read the _GTK_FRAME_EXTENTS property on the X window.

@pkkid
Copy link
Owner Author

pkkid commented Aug 29, 2018

This is slightly icky, but maybe the best option for now is to have a configuration option to enable or disable the shadow workaround we need for Gnome but others don't want on XFCE.

@SimonDedman
Copy link

Thanks for looking into this. So I assume the _GTK_FRAME_EXTENTS avenue was a non-starter?

Is there something that developers of gnome/python apps can do in order to make pygrid work on them, without materially compromising the apps? A line of code in their apps which reads shadow extents and makes them available to pygrid etc? I realise this would mean all apps had to change, however if it can be boiled down to a single universal line, feasibly devs would be amenable to including it in their next commit...? Maybe??

@pkkid
Copy link
Owner Author

pkkid commented Mar 15, 2019

I'm not sure actually, I never wrote a gnome app myself. My only guess would be to remove the shadow on your app, but that also seems like it wouldn't be an app specific setting to me either. There may also be something else going on.. the workaround to call window.set_shadow_width(0,0,0,0) is still in the code, so maybe its padding or something causing your specific app to not resize correctly.

@pkkid
Copy link
Owner Author

pkkid commented Mar 15, 2019

Interestingly, I just installed catfish from the Ubuntu repo and it is respecting zero spacing for me (Ubuntu 18.04).

@SimonDedman
Copy link

That IS interesting. Possibly the repo is older; the newer builds have moved to python install style, not sure if that would/should change anything... Certainly a recent commit concerned remembering window placement which feasibly meant playing with similar elements that pygrid uses...? Be interested to know if the latest version also works for you but doesn't for me. Cheers for looking into this!

@pkkid
Copy link
Owner Author

pkkid commented Mar 15, 2019

Still working for me on catfish 1.4.7.

Selection_037

@SimonDedman
Copy link

well.... shit. Guess I'll have another bash around at this when I'm back at my linux box this weekend. Cheers Michael

@pkkid
Copy link
Owner Author

pkkid commented Mar 15, 2019

Can I ask what OS and what window manager (with version) you are running?

@SimonDedman
Copy link

xubuntu 18.10 I believe, WM & version - unsure offhand, xfce? Sorry, I'm quite new to the world of WMs and such!

@SimonDedman
Copy link

Right sorry, xfce 4.12 / xfwm4 v4.12.5 rev d730ebb6 Compiled against GTK+-2.24.32, using GTK+-2.24.32. Padding & spacings are definitely all 0 in the pygrid config. Appreciate any ideas you might have!

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