ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
riteo has joined #wayland
Company has joined #wayland
guru_ has joined #wayland
Company has quit [Remote host closed the connection]
privacy has quit [Remote host closed the connection]
privacy has joined #wayland
guru_ has joined #wayland
guru__ has quit [Ping timeout: 480 seconds]
nerdopolis has quit [Ping timeout: 480 seconds]
privacy has quit [Quit: Leaving]
crazybyte has quit [Ping timeout: 480 seconds]
mxz_ has joined #wayland
sima has joined #wayland
FreeFull has quit [Server closed connection]
FreeFull has joined #wayland
chamlis has quit [Server closed connection]
chamlis has joined #wayland
yang2 has quit [Server closed connection]
zumbi has quit [Server closed connection]
zumbi has joined #wayland
zumbi is now known as Guest614
yang2 has joined #wayland
occivink has quit [Server closed connection]
occivink has joined #wayland
melonai5 has quit []
Hypfer has quit [Ping timeout: 480 seconds]
kts has joined #wayland
tzimmermann has joined #wayland
outfoxxed has joined #wayland
<outfoxxed>
Hello, I'm having some issues with xdg_positioner. Using the top_right anchor with bottom_right gravity and flip_xy constraints, I assume the popup should point towards bottom_left and start at top_left however it is weirdly offset to the left in every compositor. Anything I could be doing wrong?
<outfoxxed>
*when flipping due to a screen border to the right
llyyr has quit [Server closed connection]
llyyr has joined #wayland
<outfoxxed>
Specifically the wayland requests are - set_anchor_rect(1030, 28, 1, 1), set_anchor(7), set_gravity(8), set_size(235, 263), set_constraint_adjustment(12)
<outfoxxed>
same also happens with the bottom_right edge (set_anchor(8))
<outfoxxed>
I have no idea why its broken as gtk positions popups with the exact same anchors and gravity, but with every constraint flag set (which also doesn't work when I try it), and it works fine
<vyivel>
"I assume the popup should [...] start at top_left" - don't you want set_anchor(5) then?
<outfoxxed>
typo, sorry
<outfoxxed>
lets just go with bottom_right, so 8, for consistency with what gtk does
<outfoxxed>
it behaves the same
<outfoxxed>
actually no, misread - what I mean is I assume the opposite anchor would be picked when flipping
rv1sr has joined #wayland
<vyivel>
hm not sure if anchor matters at all if the anchor rect is 1x1 in size
<vyivel>
so, with bottom_right gravity the anchor point would the top left corner of the popup
<outfoxxed>
anchor does seem to matter, even when sized 1x1
<outfoxxed>
sway no longer flips it and just pushes it if i set it to top_left instead of bottom_right
<vyivel>
ah right anchor matters for constraint adjustment
kts has quit [Quit: Konversation terminated!]
<outfoxxed>
let me get a picture of this, got a good site to dump images? I don't have anything set up as I don't normally use irc.
garnacho has joined #wayland
<vyivel>
also gtk3 sets anchor 8 and gtk4 sets anchor 6 (tested with demo apps)
<outfoxxed>
any additional information I could provide that might shed some light on it, or any non wlroots compositors that support layer shell I can test it with?
<vyivel>
kwin supports layer-shell iirc
<vyivel>
also hyprland technically but i think they just copied whatever wlroots had
<outfoxxed>
the hyprland impl is broken, but differently
<outfoxxed>
is it possible to install just kwin without all of kde
<vyivel>
depends on how you distro packages it
<outfoxxed>
oh nice it just launched nested
<outfoxxed>
was not expecting it to be that easy
<outfoxxed>
kwin does the same thing
kts has joined #wayland
<vyivel>
i have replicated the setup in wlr-clients' layer-shell and it works as i'd expect (no offset, correct flip)
<outfoxxed>
would you mind helping me look at this WAYLAND_DEBUG log to see if its doing anything odd? from what I can tell everything looks correct as its positioning a surface and creating it all with the right sizes and flags
* vyivel
is waiting for quickshell to finish building
<outfoxxed>
forgot the uncommitted changed which modify the anchors, but it has the same effect with or without. can send the patch if you want to test that too
<outfoxxed>
thats Fcitx, its part of the system tray
<vyivel>
ah
<outfoxxed>
same happens with any tray popup though
manuels2 has quit [Server closed connection]
manuels2 has joined #wayland
<soreau>
It seems like it could be the shadow area? does waybar popups have shadows?
<soreau>
do*
<outfoxxed>
the waybar popup appears to. qt's should not
<outfoxxed>
(maybe it might depending on QPA)
<outfoxxed>
can you reproduce the issue at least?
<soreau>
well maybe gtk layer shell handles the offset?
<outfoxxed>
there shouldn't be an offset without setting one though
<soreau>
there is if there's a shadow area, I'd think
<outfoxxed>
there is in waybar yes
<soreau>
is there a way to disable the shadows for the tooltip to test it?
<outfoxxed>
I'm not sure, I think that would be up to gtk
<soreau>
like set_decorated(bool) in gtk
<soreau>
but I thought quickshell was qt?
<outfoxxed>
yeah, there is no shadow for the qt menu
<outfoxxed>
no offset either
<outfoxxed>
waybar which is gtk has a shadow and offset
<soreau>
so you have a menu that is also a popup but it is shadowless?
rasterman has joined #wayland
<soreau>
and the popups with the issue have shadows?
<outfoxxed>
no. My popup gets offset oddly to the left when flipping, and has no shadow or offset. waybar's popup looks fine and has a shadow and offset
<outfoxxed>
this was tested on sway, wayfire, kwin and hyprland
<outfoxxed>
hyprland's impl is generally broken so I haven't taken the anchors that do do what I want at face value, as they work nowhere else
<soreau>
I'm surprised people dare to run that software :P
<soreau>
ech, cmake
<soreau>
probably should add you a meson build system for your own sanity's sake
<outfoxxed>
tbh every time I've looked at meson it seemed like more of a pain in the ass than cmake
<soreau>
nope
<soreau>
you'd be wrong
<soreau>
:-)
<soreau>
but that's a topic for another channel..
leon-anavi has joined #wayland
<soreau>
hopefully vyivel can figure out what's going wrong
<soreau>
it's either client or wlroots bug
<outfoxxed>
it happens in kwin and hyprland as well, so if it is wlroots its a bug everyone else copied
<vyivel>
i wrote wlroots' xdg-positioner impl from scratch and kwin has its own too
<soreau>
ah, in that case the bug isn't in wlroots
<soreau>
vyivel's code is naturally bugless xD
<vyivel>
i wish that was the case
<outfoxxed>
I'd try just adding an offet to quickshell's popup but the simplest way is to go edit and rebuild qtwayland which is a huge pain
<vyivel>
so uhhhh
<vyivel>
i commented out the platformmenu hook and it seems to work correctly
<outfoxxed>
its related, theres a patch in the chat above to match it to what i have locally
<outfoxxed>
wayland_debug reveals it to be working as intended though
<outfoxxed>
massive hacks are required where qtwayland comes into play though, extremely buggy
<vyivel>
popus are positioned correctly for me without the linked patch and commented out platform hook
<outfoxxed>
do they flip correctly
<outfoxxed>
when hitting screen edges
<vyivel>
yep
<vyivel>
oh well
<vyivel>
they don't flp
<vyivel>
they slide
<outfoxxed>
yeah they need to flip
<outfoxxed>
the entire problem only happens when it flips
<outfoxxed>
slide is terrible ux for context menus
<vyivel>
is it
<outfoxxed>
yes because submenus pile up on top of parent menus and its hard to go up a level
<kennylevinsen>
Both slide and slip can end up covering the parent menu, no?
<outfoxxed>
flip should not cover the parent menu
<outfoxxed>
it should flip around it using the anchor rect
<kennylevinsen>
Ah right
<kennylevinsen>
But whether that’s possible depends on the geometry of the menu and screen, more so than slide - and then the question is whether a cut off menu is better UX than one that slided…
<outfoxxed>
the geometry of the screen should always work with flip unless the screen is about 10 by 10 pixels
<outfoxxed>
(tested with Xwayland -retro -noreset :2)
<kennylevinsen>
Ah fair. I was thinking of e.g. very tall menus that might not have enough room for a flip-y either
tommybomb has quit [Server closed connection]
tommybomb has joined #wayland
<outfoxxed>
then its left up to the compositors which will likely fall back to slide iirc
atiltedtree has quit [Server closed connection]
atiltedtree has joined #wayland
<kennylevinsen>
(Although in my opinion, nested hover-navigated menus are always bad UX as they’re too finicky to navigate - one can be fine, but having to keep your mouse position within a sliver to not accidentally navigate away is dumb.)
<kennylevinsen>
No, the compositor isn’t allowed to fall back
<kennylevinsen>
You have to specify if it’s allowed to slide
<kennylevinsen>
If not, and there isn’t room for flip, it just runs off the edge
<outfoxxed>
ah that must be why gtk specifies 63
<outfoxxed>
tried setting that myself and it doesn't affect this particular bug though
<outfoxxed>
I'll just do 15 myself then
d_ed[m] has joined #wayland
<d_ed[m]>
your anchors are wrong too, you probably want the window to start from the bottom left of your anchor rect, otherwise it'll cover the thing you're trying to flip round
<outfoxxed>
have not gotten to making submenus work again but probably
<outfoxxed>
I just took the anchors that gtk uses that work
<karcio_>
Hey, yesterday switched to wayland (sway) I can see I have a problem to run electron apps - so far using this switch enable-features=UseOzonePlatform --ozone-platform=wayland but it is pain - I would like to run apps from fuzzel or any other menu
kode54 has joined #wayland
<selckin>
ask your $distro places, this is a development channel
KDDLB has joined #wayland
<karcio_>
Oh sorry
guru_ has quit [Ping timeout: 480 seconds]
Arsen has quit [Server closed connection]
Arsen has joined #wayland
karcio_ has quit [Remote host closed the connection]
karcio_ has joined #wayland
kode54 has quit [Read error: Connection reset by peer]
KDDLB has quit [Read error: No route to host]
kode54 has joined #wayland
mooff has quit [Server closed connection]
mooff has joined #wayland
tzimmermann has quit [Remote host closed the connection]
nowrep has quit [Server closed connection]
nowrep has joined #wayland
<outfoxxed>
vyivel: I patched qtwayland to add an offset to popups, the bug remains
<outfoxxed>
have not touched xdg_surface yet though, just the positioner
<vyivel>
:shrug:
<vyivel>
i've realized i've spent over 2 hours on this already which 2 hours of staring at c++/qt code too much
<outfoxxed>
thanks for the effort at least
<outfoxxed>
I'll patch window geometry and see if that does anything. if so that would be a bug in every implementation except hyprland right?
<vyivel>
highly doubt it
noord has quit [Server closed connection]
<outfoxxed>
I mean I did too but I've checked the wayland logs as well and I can't find anything that seems amiss
noord has joined #wayland
<outfoxxed>
the surface geometry is basically the only difference
<kennylevinsen>
hmm weston doesn't have a positioner test client? :/
<vyivel>
looking at the logs, anchor rect x is set to "output width - menu width" and the flip is applied on top of that so the behavior is technically correct
<outfoxxed>
that doesn't sound right
tzimmermann has joined #wayland
karcio_ has quit [Remote host closed the connection]
karcio_ has joined #wayland
karcio_ has quit [Remote host closed the connection]
kts has quit [Ping timeout: 480 seconds]
karcio_ has joined #wayland
karcio_ has quit [Remote host closed the connection]
bindu has quit [Server closed connection]
bindu has joined #wayland
kts has joined #wayland
<outfoxxed[m]>
<vyivel> "looking at the logs, anchor rect..." <- I reread this a couple times and I think I see whats happening now, thanks
<outfoxxed[m]>
appears qt's normal positioner logic is still taking effect when it should be handled by wayland
calcul0n_ has quit [Server closed connection]
calcul0n_ has joined #wayland
karcio_ has joined #wayland
karcio_ has quit [Remote host closed the connection]
Company has joined #wayland
cyrinux has quit [Server closed connection]
karcio_ has joined #wayland
cyrinux has joined #wayland
karcio_ has quit [Remote host closed the connection]
rgallaispou has joined #wayland
abeltramo589523 has quit [Server closed connection]
abeltramo589523 has joined #wayland
mohit81582263 has quit [Server closed connection]
mohit81582263 has joined #wayland
kts has quit [Quit: Konversation terminated!]
<outfoxxed[m]>
hacked around it on my end, thanks for pointing that out vyivel
<vyivel>
👍
garnacho has joined #wayland
outfoxxed_ has joined #wayland
rasterman has quit [Quit: Gettin' stinky!]
kts has joined #wayland
outfoxxed_ has quit [Remote host closed the connection]