ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
<znarf> I should probably add that im testing on hyprland, with the libwayland compiled from latest master
znarf has quit [Remote host closed the connection]
znarf has joined #wayland
znarf has quit [Remote host closed the connection]
fmuellner has quit [Ping timeout: 480 seconds]
riteo has joined #wayland
exxxxkc has quit [Remote host closed the connection]
mclasen has quit [Ping timeout: 480 seconds]
KarenTheDorf has joined #wayland
karenw has quit [Ping timeout: 480 seconds]
KarenTheDorf has quit [Remote host closed the connection]
karenw has joined #wayland
bjorkintosh has quit [Quit: "Every day, computers are making people easier to use." David Temkin]
glennk has quit [Ping timeout: 480 seconds]
bjorkintosh has joined #wayland
kts has joined #wayland
kts has quit [Ping timeout: 480 seconds]
rv1sr has quit []
rv1sr has joined #wayland
Brainium_ has quit []
garnacho has quit [Ping timeout: 480 seconds]
<DemiMarie> When using Xwayland, is there a way to be informed when something clicks outside my window?
<karenw> There is no portable way no. There might be compositor specific ways?
<karenw> But generally, X allowing unprivlidged applications to get global input events is considered a mis-feature and wyaland intentionally doesn't allow that by default.
<DemiMarie> The context is that I have a menu I need to dismiss and switching to native Wayland is going to be hard.
<DemiMarie> One option is to rely on focus changes, but focus changes don’t happen when the user clicks on something that can’t receive focus.
<Consolatis> usually you'd use xdg_popup.grab() for that
<karenw> Hmm, if they click something inside an X window, you would be able to get the event. If they click on a wayland window, you'd get a focus lost event.
<karenw> I assume
<DemiMarie> 1. This application currently uses Xwayland, because GTK3 never implemented tray icons for native Wayland.
<DemiMarie> 2. Even with native Wayland this would have problems, because a layer shell surface will used instead of a popup for absolute positioning reasons.
<DemiMarie> Changing the UX might or might not happen before the end of 2025.
<Consolatis> IMHO re-implementing xdg_popups using layershell surface will give you nothing but headaches
<DemiMarie> Consolatis: there is no alternative
<DemiMarie> I can create a popup from the layer-shell surface, but the initial surface must be a layer-shell surface because nothing else provides absolute positioning.
rgallaispou has joined #wayland
<DemiMarie> The “proper” solution is to reimplement the UI as a desktop-environment-specific plug-in for each supported panel, which won’t happen.
<Consolatis> personally I'd still need to see an actual reason for absolute positioning
<DemiMarie> Consolatis: tray icon menus that cannot be expressed using dbusmenu
<Consolatis> I suggest extending the ext-foreign protocol with a get_popup() request, is there a reason that doesn't work for your use-case?
<DemiMarie> Consolatis: no compositor supports it, and forking them is also not an option
<Consolatis> right. but if you get the change through compositors may support it in the future
<DemiMarie> xdg-foreign would also need to be extended to support layer shell
<Consolatis> otherwise you will throw workarounds on top of workarounds
<Consolatis> re xdg-foreign: no it does not. its all a wl_surface and nothing specific to layershell surfaces at all
<Consolatis> another option is to run the panel applets in-process obviously
<DemiMarie> which requires reimplementing them 3 different ways, unless I can run a Qt6 program in a GTK menubar
<Consolatis> IMHO: if you try to move something to wayland and see that there is an issue not supported with the current wayland protocols (e.g. external processes for something like panels in your case) the best option is to enhance the protocols. This is a long term game. Otherwise the next person does have the exact same issue and comes up with their own work-around or outright says screw that wayland thing.
<DemiMarie> I agree that enhancing the protocols is the right thing to do, but I also need an interim solution until compositors implement the enhanced protocols.
<soreau> is w-p !52 relevant?
<DemiMarie> No, since this menu is (far) too complex for any of the D-Bus protocols.
karenw has quit [Ping timeout: 480 seconds]
<DemiMarie> !26 (surface-transactions) would be relevant because it would allow the cross-client sync needed for “every frame is perfect”, but I can’t wait until I get a solution that allows that.
<DemiMarie> That’s my main problem with Wayland: if one only needs something that mostly works, and can’t wait for a proper solution, things get very ugly.
<Consolatis> note that there are also potential solutions outside of the whole embedding thing like having a dedicated xdg_toplevel or (depending on the required UX) dedicated layershell surface that simply gets shown / hidden via SNI at a position either controlled by the compositor (in case of xdg_toplevel) or on a fixed position based on user-config (in case of a layershell surface)
<Consolatis> e.g. just *not* using menus at all but a tray icon triggering an application
<soreau> DemiMarie: I think your main problem is that you're expecting to lean on other compositors to implement things largely specific to your usecase instead of biting the bullet and adopting/writing your own
<soreau> if you control your own compositor, you can just make whatever special protocols you want and be done with it
<Consolatis> including the benefit of your stuff not working anywhere else and other stuff not working on your compositor :p
<DemiMarie> Consolatis: exactly!
<DemiMarie> soreau: A custom Qubes OS-specific compositor is a complete non-starter. If that means hacky solutions that break in corner cases that don’t happen in practice, then so be it.
<DemiMarie> Consolatis: a tray icon triggering an application is the long-term plan, but it still needs to close when the user clicks outside of it.
<soreau> btw, is there any simple app that uses dbusmenu and tray icon?
<DemiMarie> nm-applet is the first one that comes to mind
<Consolatis> from the client side there is also libayatana-indicators
<soreau> so I just ran nm-applet in wayfire and the icon appears in wf-panel tray widget and the menu seems to work fine..
<soreau> no idea if it's dbusmenu or what
<Consolatis> dbusmenu is limited to some basic UI elements
<DemiMarie> soreau: basically, when one only has a limited amount of time, one does what it takes to get stuff working.
<Consolatis> DemiMarie: just from a user perspective, what is wrong with some keybind + showing a fullscreen (potentially partly transparent) layershell overlay and reacting to ESC? Additionally there could be a second path via some tray icon or button + Hide/Close button in the overlay
<DemiMarie> Consolatis: Would the overlay allow dismissing when the user clicks outside?
<Consolatis> and if you prefer it hacky, make parts of the layershell surface transparent to catch clicks and hide it when a click is detected there
mxz_ has joined #wayland
<DemiMarie> What is hacky about that? Serious question.
<Consolatis> just feels weird to me. /me likes dedicated buttons rather than undocumented side effects like clicking outside of surfaces
<soreau> but what if the user tries to click on another surface 'through' the transparent window?
<soreau> wouldn't you need to forward the click or else they have to click twice?
<Consolatis> yeah, that is also one of "hacky" parts
<Consolatis> of the "hacky" parts*
<DemiMarie> What about creating a layer-shell surface, then immediately creating a popup from it?
<Consolatis> yeah, that should also work
<DemiMarie> Will that need any of the hacky workarounds, or will it just works?
<Consolatis> if the layershell surface is created by the external process that also creates the popup I *think* it should just work
mxz has quit [Ping timeout: 480 seconds]
crazybyte has quit [Ping timeout: 480 seconds]
mxz__ has quit [Ping timeout: 480 seconds]
mxz_ is now known as mxz
<DemiMarie> Consolatis: the problem is that there is no serial to be used for xdg_popup::grab
<Consolatis> you could try to use the one from the tray icon click I guess
<DemiMarie> wrong process
<DemiMarie> serials are per-connection
<Consolatis> but no clue if that works for all compositors as its coming from a different client
<Consolatis> yeah.. right
<DemiMarie> when will a click not cause a focus change?
<Consolatis> can't follow
rgallaispou has quit [Quit: WeeChat 4.4.3]
rgallaispou has joined #wayland
andymandias has joined #wayland
<dviola> is anyone familiar with how xwayland calculates the DPI? my Qt issue disappears if I change those two lines: https://gitlab.freedesktop.org/xorg/xserver/-/blob/xwayland-24.1.4/hw/xwayland/xwayland-output.c?ref_type=tags#L203-204 and set it to monitorResolution
<dviola> monitor going off/on -> fonts missing
<dviola> not saying it's xwayland fault but I wonder if the DPI is being calculated properly
<dviola> Qt5 is doing:
<dviola> - return QDpi(std::max(virtualDesktopPhysicalDPi.first, 96.0),
<dviola> - std::max(virtualDesktopPhysicalDPi.second, 96.0));
<dviola> rather than set it to 96.0
<dviola> I wonder what this 25.4 is
<dviola> setting it to monitorResolution makes it huge first, but at least the fonts don't go missing after my monitor goes off/on
<dviola> I would appreciate some help there
<dviola> Qt6 changed it to 96 but I want to see if xwayland could make it work properly after my monitor goes off/on
andymandias has quit [Remote host closed the connection]
andymandias has joined #wayland
mxz_ has joined #wayland
<dviola> I mean, reading that commit sounds like xwayland is doing that on purpose: "However, if the Wayland outputs get reconfigured, or new outputs added, or existing outputs removed, Xwayland will recompute and update the physical size of the screen, leading to an unexpected change of DPI."
<dviola> but are then apps expected to force the DPI to 96? which is what Qt6 does
<dviola> toolkits/apps
<dviola> I see there's also -dpi but that's probably for non-rootless mode right?
andyrtr has quit [Ping timeout: 480 seconds]
andyrtr has joined #wayland
tzimmermann has joined #wayland
garnacho has joined #wayland
<ofourdan> dviola: check what the compositor reports as the size of the output with "wayland-info -i output"
<ofourdan> (also, keep in mind that are values for the *screen* which may include multiple monitors depending on your setup)
iomari891 has quit [Quit: WeeChat 4.3.1]
<dviola> ofourdan: http://0x0.st/XhSr.txt
<dviola> single monitor
<ofourdan> these seem plausible
<ofourdan> 25.4 is the size of an inch in mm
<dviola> oh
<ofourdan> the maths are pretty basic really
<ofourdan> I fail to see how there could be a bug there, if something goes wrong it's more likely with the data
<dviola> I see
<dviola> thanks
<ofourdan> there is also an Xft.dpi value in XRDB that some older apps used, check what "xrdb -q" gives
<dviola> it's empty, I've not set anything
<ofourdan> that's not the user feeding it. usually, it's a setting daemon - Have you tried different Wayland compositors?
<dviola> I've tried weston and hyprland, the issue with those
<dviola> nothing in xrdb -q with those either
<dviola> I'm using sway currently
<ofourdan> ah, I was thingking more kde or gnome
<ofourdan> *thinking
<dviola> haven't tried those with this issue but I guess I could
iomari891 has joined #wayland
sima has joined #wayland
<dviola> let me try kde first
glennk has joined #wayland
<dviola> ofourdan: yeah, I can't reproduce it on plasma
<dviola> I see it adds Xft.dpi 96 automatically
<dviola> http://0x0.st/XhSH.txt output of xrdb -q in plasma
<dviola> gnome also sets it to Xft.dpi 96 and can't reproduce the issue: http://0x0.st/XhSK.txt
<dviola> I didn't know KDE/GNOME did this by default, and that older software like Qt 5.x required it to work properly, thanks for letting me know
exxxxkc has joined #wayland
leon-anavi has joined #wayland
rasterman has joined #wayland
kts has joined #wayland
riteo_ has joined #wayland
riteo has quit [Ping timeout: 480 seconds]
balrog_ has quit [Ping timeout: 480 seconds]
kts has quit [Quit: Leaving]
Moprius has joined #wayland
___nick___ has joined #wayland
___nick___ has quit []
mclasen has joined #wayland
___nick___ has joined #wayland
andyrtr has quit [Quit: ZNC 1.9.1 - https://znc.in]
andyrtr has joined #wayland
Brainium has joined #wayland
mclasen has quit [Remote host closed the connection]
mclasen has joined #wayland
kts has joined #wayland
fmuellner has joined #wayland
Ramattack has joined #wayland
<Ramattack> Hi!
<Ramattack> in terms of hdipi 4k and so... does it matter using wayland or xorg?
<Ramattack> I say because I use some tools like xdotool which seem not to work in wayland and... I had to switch to xorg (with gnome both cases) and wanted to know if wayland could have improvements in this aspect
<Ramattack> in the aspect of hdipi handling
<Ramattack> because in that case perhaps I would have to find alternatives to xdotool or whatever
___nick___ has quit [Remote host closed the connection]
___nick___ has joined #wayland
<soreau> Ramattack: I'm not sure about hidpi, but there is https://git.sr.ht/~brocellous/wlrctl for wlroots compositors
kts has quit [Read error: Connection reset by peer]
<soreau> but for wayland, usually the compositor has some scale option
<Ramattack> but you mean for just increasing all or.... only the text and icons... I mean for doing it well or... just making twice or... the size?
<soreau> well the clients (apps) should take scale into account
kts has joined #wayland
novenary has quit [Remote host closed the connection]
kts has quit [Read error: Connection reset by peer]
novenary has joined #wayland
Ramattack has quit [Quit: Leaving]
feaneron has joined #wayland
exkc has joined #wayland
iomari891 has quit [Ping timeout: 480 seconds]
iomari891 has joined #wayland
iomari891 has quit [Ping timeout: 480 seconds]
kts has joined #wayland
___nick___ has quit [Ping timeout: 480 seconds]
___nick___ has joined #wayland
fmuellner has quit [Ping timeout: 480 seconds]
kts has quit [Quit: Leaving]
Formula1 has joined #wayland
kts has joined #wayland
balrog has joined #wayland
Moprius has quit [Remote host closed the connection]
rv1sr has quit [Ping timeout: 480 seconds]
tzimmermann has quit [Quit: Leaving]
kts has quit [Remote host closed the connection]
rasterman has quit [Quit: Gettin' stinky!]
Formula1 has quit []
mohit81582263530 has quit [Quit: mohit81582263530]
Formula1 has joined #wayland
mohit81582263530 has joined #wayland
Formula1 has quit []
adamtajti has joined #wayland
leon-anavi has quit [Quit: Leaving]
mohit81582263530 has quit [Remote host closed the connection]
mohit81582263530 has joined #wayland
rv1sr has joined #wayland
wmlhwl has joined #wayland
wmlhwl has quit [Quit: Leaving]
AJ_Z0 has quit [Quit: I have to return some videotapes]
AJ_Z0 has joined #wayland
adamtajti has quit [Ping timeout: 480 seconds]
garnacho has quit [Remote host closed the connection]
coldfeet has joined #wayland
coldfeet has quit [Quit: Lost terminal]
garnacho has joined #wayland
garnacho has quit []
garnacho has joined #wayland
mclasen has quit [Remote host closed the connection]
ryanneph has joined #wayland
<Consolatis> dviola: QT_FONT_DPI=96 indeed seems to work around the Qt 5 bug for me. Thanks for mentioning it.
<bjorkintosh> is QT 5 not by now obsolete?
<dviola> Consolatis: sure, glad it helps
<dviola> bjorkintosh: yes, there are some apps that still use it unfortunately, but they're in the process of being ported over to qt6
<soreau> same situation with X and wayland.. :P
hergertme has quit [Ping timeout: 480 seconds]
<dviola> :D
<soreau> dviola: nice find on the qt5 bug, you really went the extra miles :)
<dviola> thanks :)
iomari891 has joined #wayland
<dviola> still want to figure out what is causing: https://github.com/ValveSoftware/steam-for-linux/issues/11479
<dviola> not sure it's realistic to find out though (steam being proprietary)
___nick___ has quit [Remote host closed the connection]
adamtajti has joined #wayland
lsd|2 has joined #wayland
ryanneph has quit [Ping timeout: 480 seconds]
adamtajti has quit [Ping timeout: 480 seconds]
fmuellner has joined #wayland
sima has quit [Ping timeout: 480 seconds]
ity has joined #wayland
hch129072 has joined #wayland
ryanneph has joined #wayland
hch12907 has quit [Ping timeout: 480 seconds]
hch129072 is now known as hch12907
hch129072 has joined #wayland
gallo has quit [Remote host closed the connection]
hch12907 has quit [Ping timeout: 480 seconds]
hch129072 is now known as hch12907
lsd|2 has quit [Quit: KVIrc 5.2.2 Quasar http://www.kvirc.net/]
glennk has quit [Ping timeout: 480 seconds]
rgallaispou has quit [Ping timeout: 480 seconds]
gallo has joined #wayland
DodoGTA is now known as Guest2590
Guest2590 has quit []
DodoGTA has joined #wayland
<soreau> dviola: it seems there are reports in that thread saying it happens on X too, and caused by recent steam updates, so yea, probably a client bug and nothing to do with wayland per se
ryanneph has quit [Quit: ryanneph has disconnected]
DodoGTA has quit [Read error: Connection reset by peer]
yrlf has quit [Read error: Connection reset by peer]
yrlf has joined #wayland