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

Fixing gap at top of windows between top menu bar #55

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

travisallison
Copy link

The changes are a hack, but they seem to do the job for the problem of a gap between the top menu bar and the window that is being tiled. Using gdk by itself doesn't do the job.

quicktile.py Outdated
@@ -581,6 +581,9 @@ def get_workarea(self, monitor, ignore_struts=False):
for g in struts:
# http://standards.freedesktop.org/wm-spec/1.5/ar01s05.html
# XXX: Must not cache unless watching for notify events.

# a hack to eliminate the offset from the top bar
Copy link
Owner

Choose a reason for hiding this comment

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

As-is, it looks like this comment applies to the _Su lines as well. Is there room to put it on the same line as the g[2] = 0 without going over the PEP8 80-column limit?

@ssokolow
Copy link
Owner

I definitely won't be merging this as-is because, as I mentioned, GDK has bugs that affect everyone, not just Unity users. However, I don't see a problem with taking it if you make it conditional on a config file boolean with a name like unity_hack and make the comment clarity correction I pointed out.

…ty_hack. unity_hack_g conditionally alters window placement in unity to remove space between top of window and top menu bar. Note that unity has keypad combo alt + ctrl + numpad to duplicate much of quicktile functionality, except for various sizings
…ty_hack. unity_hack_g conditionally alters window placement in unity to remove space between top of window and top menu bar. Note that unity has keypad combo alt + ctrl + numpad to duplicate much of quicktile functionality, except for various sizings
…ty_hack. unity_hack_g conditionally alters window placement in unity to remove space between top of window and top menu bar. Note that unity has keypad combo alt + ctrl + numpad to duplicate much of quicktile functionality, except for various sizings
@landscape-bot
Copy link

Code Health
Repository health decreased by 0.46% when pulling a0943ef on travisallison:fix_gap2 into 568dd1f on ssokolow:master.

@mattgodbolt
Copy link

@travisallison if you could bring your branch up-to-date (and fix things like tabs->spaces) I'd love to use your branch for now to fix this issue locally. This has been bugging me for ages. Does this also fix the issue where the bottom of windows is off the bottom of the screen by ~4-8 pixels too?

@travisallison
Copy link
Author

Sorry, I don't use quicktile anymore. My hack didn't work that well
ultimately.

On Wed, Jun 15, 2016 at 9:39 AM, Matt Godbolt notifications@github.com
wrote:

@travisallison https://github.com/travisallison if you could bring your
branch up-to-date (and fix things like tabs->spaces) I'd love to use your
branch for now to fix this issue locally. This has been bugging me for
ages. Does this also fix the issue where the bottom of windows is off the
bottom of the screen by ~4-8 pixels too?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#55 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AK1GPu7CKxenPTy0RxSikP_ltAFztmF2ks5qMCrKgaJpZM4Fd3Mc
.

@mattgodbolt
Copy link

Thanks for the quick reply. Did you find an alternative or have you given
up on tiling?
On Wed, Jun 15, 2016 at 11:50 AM, travisallison notifications@github.com
wrote:

Sorry, I don't use quicktile anymore. My hack didn't work that well
ultimately.

On Wed, Jun 15, 2016 at 9:39 AM, Matt Godbolt notifications@github.com
wrote:

@travisallison https://github.com/travisallison if you could bring
your
branch up-to-date (and fix things like tabs->spaces) I'd love to use your
branch for now to fix this issue locally. This has been bugging me for
ages. Does this also fix the issue where the bottom of windows is off the
bottom of the screen by ~4-8 pixels too?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#55 (comment),
or mute the thread
<
https://github.com/notifications/unsubscribe/AK1GPu7CKxenPTy0RxSikP_ltAFztmF2ks5qMCrKgaJpZM4Fd3Mc

.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#55 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAmsddkXkCXnAaiu8gz4ME7u-SeRQAsWks5qMC1UgaJpZM4Fd3Mc
.

@travisallison
Copy link
Author

I just use the standard tiling the comes with ubuntu. I think it is Alt +
number (from my laptop keypad). I switch between linux and windows and I
am on windows right now so I am not 100% sure. If that doesn't work or you
can't find it on your own, when I switch over to ubuntu, I'll send you
another email. But it might be a few weeks since I don't need to program
right now.

On Wed, Jun 15, 2016 at 1:34 PM, Matt Godbolt notifications@github.com
wrote:

Thanks for the quick reply. Did you find an alternative or have you given
up on tiling?
On Wed, Jun 15, 2016 at 11:50 AM, travisallison notifications@github.com
wrote:

Sorry, I don't use quicktile anymore. My hack didn't work that well
ultimately.

On Wed, Jun 15, 2016 at 9:39 AM, Matt Godbolt notifications@github.com
wrote:

@travisallison https://github.com/travisallison if you could bring
your
branch up-to-date (and fix things like tabs->spaces) I'd love to use
your
branch for now to fix this issue locally. This has been bugging me for
ages. Does this also fix the issue where the bottom of windows is off
the
bottom of the screen by ~4-8 pixels too?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#55 (comment)
,
or mute the thread
<

https://github.com/notifications/unsubscribe/AK1GPu7CKxenPTy0RxSikP_ltAFztmF2ks5qMCrKgaJpZM4Fd3Mc

.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#55 (comment),
or mute the thread
<
https://github.com/notifications/unsubscribe/AAmsddkXkCXnAaiu8gz4ME7u-SeRQAsWks5qMC1UgaJpZM4Fd3Mc

.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#55 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AK1GPvYfjeWAI22XjjeGOce7W3nCnL5jks5qMGHIgaJpZM4Fd3Mc
.

@mattgodbolt
Copy link

Thanks again. I'm aware of the ctrl-keypad tiling built into (some) window
managers: I like quicktile because I get to customize it more (and adds the
ability to toggle a window's active monitor in a dual-monitor setup). It
also (mostly) works across window managers; I just run quicktile.py and I
magically get my setup regardless of the WM.

Thanks for the help!

On Wed, Jun 15, 2016 at 5:41 PM travisallison notifications@github.com
wrote:

I just use the standard tiling the comes with ubuntu. I think it is Alt +
number (from my laptop keypad). I switch between linux and windows and I
am on windows right now so I am not 100% sure. If that doesn't work or you
can't find it on your own, when I switch over to ubuntu, I'll send you
another email. But it might be a few weeks since I don't need to program
right now.

On Wed, Jun 15, 2016 at 1:34 PM, Matt Godbolt notifications@github.com
wrote:

Thanks for the quick reply. Did you find an alternative or have you given
up on tiling?
On Wed, Jun 15, 2016 at 11:50 AM, travisallison <
notifications@github.com>
wrote:

Sorry, I don't use quicktile anymore. My hack didn't work that well
ultimately.

On Wed, Jun 15, 2016 at 9:39 AM, Matt Godbolt <
notifications@github.com>
wrote:

@travisallison https://github.com/travisallison if you could bring
your
branch up-to-date (and fix things like tabs->spaces) I'd love to use
your
branch for now to fix this issue locally. This has been bugging me
for
ages. Does this also fix the issue where the bottom of windows is off
the
bottom of the screen by ~4-8 pixels too?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<
#55 (comment)
,
or mute the thread
<

https://github.com/notifications/unsubscribe/AK1GPu7CKxenPTy0RxSikP_ltAFztmF2ks5qMCrKgaJpZM4Fd3Mc

.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)
,
or mute the thread
<

https://github.com/notifications/unsubscribe/AAmsddkXkCXnAaiu8gz4ME7u-SeRQAsWks5qMC1UgaJpZM4Fd3Mc

.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#55 (comment),
or mute the thread
<
https://github.com/notifications/unsubscribe/AK1GPvYfjeWAI22XjjeGOce7W3nCnL5jks5qMGHIgaJpZM4Fd3Mc

.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#55 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAmsdQrf3QIWnRlrCyv5ZGgPenDDzi9gks5qMH-PgaJpZM4Fd3Mc
.

@paulfeakins
Copy link

paulfeakins commented Sep 3, 2018

Any update on this one as I'm getting this same gap at the top on ubuntu 16.04 LTS?

@ssokolow
Copy link
Owner

ssokolow commented Sep 3, 2018

Not yet. At the moment, I'm still on the tail end of getting everything ready for my copy of Firefox ESR to drop support for legacy extensions in a couple of days.

(And I've been scrambling a bit because the WebExtensions-based Tree Style Tab decided to get eager to corrupt the structure of my trees, so I suddenly had to rush to hack together a suitable stop-gap for preserving that information in usable fashion before I forgot what had been treed in which ways and why.)

I hope to start work on writing the test suite I need in maybe a week. QuickTile has built up too much technical debt, which has been compounded by a segfault bug in the official shim for porting PyGTK (GTK+ 2.x on Python 2) code to PyGI (GTK+ 2.x or 3.x on Python 2 or 3). I need a certain amount of automated regression testing in place before I can port to maintained versions of GDK and libwnck (which is probably enough to fix this bug) and start renovating out the architectural flaws that were present since the very first version of QuickTile.

Basically, I need to write some tests which spin up a virtual X11 desktop using something like Xvfb, start a window manager in it, create some mock windows, ask QuickTile to tile them, check whether the right result was achieved, and then clean up after themselves.

That'll also help with testing on desktops I don't use myself, because it'll be easy to do something like this:

SUPPORTED_WMS = ['openbox', 'kwin', ...]

for wm in SUPPORTED_WMS: 
    with test_desktop(wm) as test_env:
        run_tests(test_env)

@paulfeakins
Copy link

paulfeakins commented Sep 3, 2018

Makes sense, thanks for the update! I may just upgrade this 16.04 work computer to 18.04 as that seems to work nicely.

I've tried making a few quick changes to layout.py but I can't even seem to hack it to work with negative offsets.

@ssokolow
Copy link
Owner

ssokolow commented Aug 6, 2023

After a lot of unexpected mess, I'm finally working to get things back in order. Is anyone still experiencing this problem?

If so, please point me to distro/DE combinations you're experiencing it under so I can fire them up in a VM for testing.

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

Successfully merging this pull request may close these issues.

None yet

5 participants