Re: [Sawfish] issue with html5 datalist element rendering RHEL7 x86_64 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/sawfish Archives
]
I know this is a really old thread, however, recently I hit same problem,
and found a solution which works for me.
Sawfish does not set the _NET_FRAME_EXTENTS property, which gives the offset
of the client window to its top-level frame (the one build by sawfish).
Some clients like firefox, use this information to position their own
temporary X windows, eg. the username/password dropdowns.
If you encounter the mentioned behaviour, try to use a different frame-type
for the window in question: if I set the frame type of firefox to 'none',
then there is not offset, and the dropdowns are positioned correctly. If I
use a frame-style with a big titlebar, the offset gets worse.
The attached patched sets the _NET_FRAME_EXTENTS property and fixed
the problem for me.
Although old, sawfish is still my favourite wm!
On 29/02/2020 23:21, Trevor Cordes wrote:
On 2020-02-21 Robert 'Bobby' Zenz wrote:
Curious...I'm out of ideas on that one in that case.
I've had a similar bug for literally years in my setup, all through
different versions of Fedora. I always thought it was firefox's
fault... I never thought to blame sawfish. But that would explain why
my bz's went unanswered and un-me-too'd.
Anyhow, I can reproduce this bug on my fairly modern setup:
My box is currently:
Fedora 30
Firefox 73.0
sawfish-1.12.90
gtk3-3.24.11
The "datalist element" test has the options pop up halfway over the
text field vertically.
--- old/sawfish/wm/state/wm-spec.jl 2021-05-18 06:01:10.766955792 +0200
+++ new/sawfish/wm/state/wm-spec.jl 2021-12-19 21:33:27.058815290 +0100
@@ -32,7 +32,8 @@
sawfish.wm.workspace
sawfish.wm.viewport
sawfish.wm.state.iconify
- sawfish.wm.util.workarea)
+ sawfish.wm.util.workarea
+ sawfish.wm.util.x)
;; todo:
@@ -74,6 +75,7 @@
_NET_DESKTOP_GEOMETRY
_NET_DESKTOP_NAMES
_NET_DESKTOP_VIEWPORT
+ _NET_FRAME_EXTENTS
_NET_NUMBER_OF_DESKTOPS
_NET_PROTOCOLS
_NET_SHOWING_DESKTOP
@@ -297,6 +299,20 @@
(define-window-strut w (aref data 0) (aref data 2)
(aref data 1) (aref data 3))))))
+ (defun add-net-frame-extents (w)
+ (let*
+ ( (foff (window-frame-offset w))
+ (fdim (window-frame-dimensions w))
+ (wdim (window-dimensions w))
+ (hgap (- (car fdim) (car wdim)))
+ (vgap (- (cdr fdim) (cdr wdim)))
+ (lhs (- (car foff)))
+ (top (- (cdr foff)))
+ (rhs (- hgap lhs))
+ (bot (- vgap top))
+ (ext (vector lhs rhs top bot)) )
+ (set-x-property w '_NET_FRAME_EXTENTS ext 'CARDINAL 32)))
+
(define (honour-client-state w)
(let ((space (get-x-property w '_NET_WM_DESKTOP)))
(when space
@@ -655,6 +671,7 @@
(add-hook 'before-add-window-hook honour-client-state)
(add-hook 'add-window-hook update-client-state)
+ (add-hook 'after-framing-hook add-net-frame-extents)
(call-after-state-changed '(sticky shaded maximized stacking
window-list-skip task-list-skip)
update-client-state)