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

Gap at top of tiled windows #54

Closed
travisallison opened this issue Jul 21, 2015 · 7 comments
Closed

Gap at top of tiled windows #54

travisallison opened this issue Jul 21, 2015 · 7 comments

Comments

@travisallison
Copy link

I am running ubuntu 14.04. When tiling windows, there is a small gap at the top of the windows. I've tried changing the struts, but even when running reposition with (800, 0, 800, 900), I get the same issue:
DEBUG: Repositioning to (800, 0, 800, 900)

I have even tried changing the new_y value to -20 and it still won't move the window up. Maximize does work in all situations.

I wonder if it is a similar problem to what this person had:

http://stackoverflow.com/questions/10415097/window-position-a-little-off-just-after-spawning-and-moving-using-python-wnck

screenshot from 2015-07-21 12 24 20

@ssokolow
Copy link
Owner

Hmm. A libwnck bug would make sense but the whole reason I switched to libwnck was because the GDK approach also has bugs.

(When tiling applications like LibreOffice which set a non-default window gravity, using GDK to reposition gets a similar but more severe offset on all desktop environments unless you write a ridiculous amount of raw X11 code to detect it so you can fudge your positioning request to counteract it.)

If you consider that an acceptable trade-off, I can try adding an option to the config file to opt into using GDK for repositioning. Otherwise, I can only see two potential solutions:

  1. Get someone to patch libwnck for GTK+ 2.x to fix the problem.
  2. Wait for me to get caught up on my backlogged life enough to port this to GTK+ 3.x where, with luck, libwnck will be less buggy.

@travisallison
Copy link
Author

I was unable to get it working using GDK without a hack. The hack can be seen in the pull request that I just made.

@ssokolow
Copy link
Owner

For records cross-referencing, that's #55

@travisallison
Copy link
Author

Sorry, I might have made a bunch of pull requests. I thought that there was a confirmation page before you submit the pull request. (I should have done compare first) Anyways, you can look at what I've done in the latest. As the commit says, I used a global variable. That way, the function signatures remain unchanged and you won't have to do much to remove the hack if you choose to add it in the first place. As the commit also says, unity has keyboard shortcuts that I just found which duplicates a lot of the functionality of quicktile.
http://askubuntu.com/questions/28086/what-are-unitys-keyboard-and-mouse-shortcuts

If you are going to rewrite the code for gtk3, then there's probably no need to add my unity hack. You definitely won't be hurting my feelings! I just thought you might want to know this info.

@ssokolow
Copy link
Owner

I'll take a look at it anyway as soon as I can spare the time. I'm not sure how long it'll be before I can make room for the GTK+ 3 porting work.

@ssokolow
Copy link
Owner

There's a GTK+ port now in the gtk3_port branch which uses libwnck 3.x.

If you're still listening, please test it and let me know if the problem is still present.

(And sorry for letting things fall to pieces for half a decade.)

@ssokolow
Copy link
Owner

ssokolow commented Apr 5, 2020

Closing for lack of response after two months.

@ssokolow ssokolow closed this as completed Apr 5, 2020
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