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

X application overlaps tab-line #788

Open
jj1uzh opened this issue Oct 27, 2020 · 2 comments
Open

X application overlaps tab-line #788

jj1uzh opened this issue Oct 27, 2020 · 2 comments

Comments

@jj1uzh
Copy link

jj1uzh commented Oct 27, 2020

exwm-issue-resized

As the screenshot above, tab-line (emacs >27.1) is overlapped by X applications.
Looks like the height is correct, as seen the background single line at the bottom.

I'm not sure whether this is caused by exwm or emacs(tab-line-mode, window.el?)...

Thanks.

@jj1uzh
Copy link
Author

jj1uzh commented Oct 27, 2020

(defun exwm-layout--show (id &optional window)
  "Show window ID exactly fit in the Emacs window WINDOW."
  (exwm--log "Show #x%x in %s" id window)
  (let* ((edges (window-inside-absolute-pixel-edges window))
         (x (pop edges))
         (y (pop edges))
         (width (- (pop edges) x))
         (height (- (pop edges) y))
         frame-x frame-y frame-width frame-height)
    (with-current-buffer (exwm--id->buffer id)
      (when exwm--floating-frame
        ...)
      (when (exwm-layout--fullscreen-p)
        ...)
;; edited here
      (when (bound-and-true-p tab-line-mode)
	(setq y (+ y (frame-char-height))))
;; edited here
      (exwm--set-geometry id x y width height)
      (xcb:+request exwm--connection (make-instance 'xcb:MapWindow :window id))
      (exwm-layout--set-state id xcb:icccm:WM_STATE:NormalState)
      (setq exwm--ewmh-state
            (delq xcb:Atom:_NET_WM_STATE_HIDDEN exwm--ewmh-state))
      (exwm-layout--set-ewmh-state id)
      (exwm-layout--auto-iconify)))
  (xcb:flush exwm--connection))

This is my simple workaround.

@djeis97
Copy link
Contributor

djeis97 commented May 27, 2022

I can confirm this as well, it looks like a bug in window-inside-absolute-pixel-edges (and so, really, a bug in window-edges). window-edges doesn't reference #'window-tab-line-height anywhere, but it does explicitly reference #'window-header-line-height (and correspondingly, the header-line does work properly with exwm). A cursory glance at the source of emacs master suggests that this has not been fixed yet, but I have not actually tested it.

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

No branches or pull requests

2 participants