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
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion quicktile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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?

g[2] = 0
_Su(0, g[4], g[0], g[5] - g[4] + 1) # left
_Su(_w - g[1], g[6], g[1], g[7] - g[6] + 1) # right
_Su(g[8], 0, g[9] - g[8] + 1, g[2]) # top
Expand Down Expand Up @@ -725,7 +728,19 @@ def reposition(cls, win, geom=None, monitor=gtk.gdk.Rectangle(0, 0, 0, 0),
#
# ...however, that still doesn't explain why the non-topleft
# gravities have no effect. I'm guessing something's just broken.
win.set_geometry(wnck.WINDOW_GRAVITY_STATIC, geometry_mask,
#win.set_geometry(wnck.WINDOW_GRAVITY_STATIC, geometry_mask,
# new_x, new_y, geom.width, geom.height)

# a hack to eliminate the gap at the top for windows
gdk_window = gtk.gdk.window_foreign_new(win.get_xid())
if new_y == 0:
logging.debug("RESIZING")
gdk_window.resize(800, 900)
gdk_window.move(new_x, new_y)
# the -40 is to adjust for the window menu bar size for terminal windows.
gdk_window.resize(geom.width, geom.height - 40)
else:
win.set_geometry(wnck.WINDOW_GRAVITY_STATIC, geometry_mask,
new_x, new_y, geom.width, geom.height)

# Restore maximization if asked
Expand Down