02:31 ddshore: Hi, I'm trying out wayland, was previously using x. I am trying to use WM_CLASS and it will be detected on some windows (emacs) but not on others (konsole), I know WM_CLASS isn't supported, but I wanted to understand why it will sometimmes be detected, does any one know why it is acting like this?
02:31 ddshore: sometimes*
02:42 psykose: stuff still running in x has wm_class
02:43 psykose: x applications run in xwayland
02:43 psykose: wayland ones have app_id instead
02:44 dD_: psykose: Thanks. Do you know if there is a way to get konsole to run in xwayland? That's the one I need the most
02:44 psykose: you didn't say what you need to find the wm_class for
02:46 dD_: I'm using a keymapping software called xkeysnail that depends on WM_CLASS
02:46 dD_: to find the correct mapping for a window
02:59 dD_: looks like this worked: QT_QPA_PLATFORM=xcb konsole
07:57 yshui`: why is the design of wl_subsurface so idiosyncratic? the double-buffering cached state is convoluted enough, then on top of that there are also exceptions you need to remember: stuff that are still synced in desync mode; stuff that is desync even in synced mode.
07:58 yshui`: are all these complexities really necessary?
08:18 vyivel: "stuff that is desync even in synced mode" …that's just not double-buffered state
08:28 yshui`: hmm, actually it does make sense for subsurface stack order and position to remain synced. 🤔
09:57 wlb: wayland Issue #447 opened by yshui (yshui) Request for clarication, sync mode wl_subsurfaces https://gitlab.freedesktop.org/wayland/wayland/-/issues/447
21:32 wlb: weston Issue #890 opened by Dylan Aïssi (daissi) weston fails to build with neatvnc 0.8.0 https://gitlab.freedesktop.org/wayland/weston/-/issues/890
22:56 JoshuaAshton: Anyone do libdecor stuff here? https://gitlab.freedesktop.org/libdecor/libdecor/-/merge_requests/147
22:57 JoshuaAshton: set_visibility doesn't work at all under labwc/Plasma, but seemed fixable with a simple MR
22:57 JoshuaAshton: I feel like I am doing something wrong given... surely I am not the first person to find this (?), but I also can't find anyone else reporting this and it seemed trivially fixable...
23:02 JoshuaAshton: Maybe others using libdecor are falling back to xdg_toplevel directly if SERVER_DECORATIONS? Not sure
23:03 Consolatis: not sure what version 2 of the xdg-decoration protocol they are referring to..
23:03 JoshuaAshton: Me neither, I can't find it anywhere
23:04 JoshuaAshton: This also fixes it for me on labwc as well as Plasma
23:08 riteo: WHAT
23:08 riteo: THAT WAS IT?!?!?!!
23:09 riteo: I looked at the code and went "uh... This looks messy... Doesn't look easy to fix" and then I find out that the comment talked about a non-existent protocol version
23:09 riteo: JoshuaAshton: I reported that a few months ago as Godot uses that https://gitlab.freedesktop.org/libdecor/libdecor/-/issues/63
23:10 JoshuaAshton: riteo: I recently found it in Gamescope
23:10 riteo: IIRC I also had some concerns on how the global was handled at runtime, but I can't remember right now what was the exact issue
23:11 JoshuaAshton: also libdecor putting its userptr at the end of the interface callbacks is truly devastating
23:11 JoshuaAshton: =(
23:11 riteo: there's also another quirk regarding plugin (e.g. GTK) frame destruction where you could "double-free" the thing, but I never found the opportunity to investigate further
23:11 riteo: JoshuaAshton: just use tags ;)
23:11 JoshuaAshton: tags?
23:11 riteo: you can assign a string to a proxy and check it
23:12 JoshuaAshton: heh
23:12 riteo: on Godot we tag most of our proxies with the "godot" tag and check it, no-opping or whatever in the various listeners
23:12 riteo: (if we don't find our proxy)
23:12 riteo: takes nothing also because it's a const char pointer so you can do a direct equality check IIRC
23:12 JoshuaAshton: I ended up writing this shit for the automated forwarding to class function
23:12 JoshuaAshton: template <typename Func, typename... Args>
23:12 JoshuaAshton: auto CallWithAllButLast(Func pFunc, Args&&... args)
23:12 JoshuaAshton: {
23:12 JoshuaAshton: auto Forwarder = [&] <typename Tuple, size_t... idx> (Tuple&& tuple, std::index_sequence<idx...>)
23:12 JoshuaAshton: {
23:12 JoshuaAshton: return pFunc(std::get<idx>(std::forward<Tuple>(tuple))...);
23:12 JoshuaAshton: };
23:13 JoshuaAshton: return Forwarder(std::forward_as_tuple(args...), std::make_index_sequence<sizeof...(Args) - 1>());
23:13 JoshuaAshton: }
23:13 JoshuaAshton: #define LIBDECOR_USERDATA_TO_THIS(type, name) []<typename... Args> ( Args... args ) { type *pThing = (type *)std::get<sizeof...(Args)-1>(std::forward_as_tuple(args...)); CallWithAllButLast([&]<typename... Args2>(Args2... args2){ pThing->name(std::forward<Args2>(args2)...); }, std::forward<Args>(args)...); }
23:13 JoshuaAshton: x_x
23:13 JoshuaAshton: This is probably the worst thing I have written ever
23:13 riteo: oof
23:13 JoshuaAshton: Who knew std::forward'ing all but the last arg would be so hard
23:13 riteo: is this server-side?
23:14 JoshuaAshton: Yeah :b
23:14 riteo: oh I see
23:14 JoshuaAshton: https://github.com/ValveSoftware/gamescope/blob/master/src/wayland_backend.cpp
23:14 riteo: perhaps libdecor should just tag its stuff and ask clients to check for it
23:15 JoshuaAshton: well gamescope is a server that is also a client :b
23:15 JoshuaAshton: i guess this is client for gamescope
23:15 riteo: I never quite understood that part
23:16 JoshuaAshton: Hm?
23:16 riteo: is one supposed to normally run steam through it?
23:16 JoshuaAshton: You can run Steam in big picture mode or games directly yeah
23:16 JoshuaAshton: It's the only way to play games in HDR on Plasma 6 also
23:16 riteo: like, the fact that it can auto-switch is great for big picture but there are like zero instructions on how to use it properly
23:16 riteo: no scripts, nothing
23:17 riteo: I have a script called `itsgamingtime`, but it's all done through my research, which is a bit of a bummer
23:17 JoshuaAshton: I mean it's really just
23:17 JoshuaAshton: gamescope -e -- steam -bigpicture
23:17 JoshuaAshton: for the most part
23:17 JoshuaAshton: *-gamepadui
23:18 riteo: mh, I _may_ have made my life extremely hard by having steam as a flatpak
23:18 JoshuaAshton: oh for sure
23:18 riteo: it works though 8)
23:18 JoshuaAshton: especially as Gamescope WSI probably doesn't work there
23:18 riteo: yeah I had to override some paths
23:19 riteo: oh well
23:19 JoshuaAshton: Daily reminder that the Steam Flatpak/Snap etc is not officially supported
23:20 riteo: libdecor would really need some love, although I suppose that most people eventually switched to an homebrew CSD solution
23:20 riteo: JoshuaAshton: yeah nw, I'm aware of that
23:21 riteo: like, on Godot we're aready slowly moving towards our own CSDs since we need them anyways, plus we're otherwise losing a lot of benefits
23:21 riteo: does SDL use libdecor?
23:21 JoshuaAshton: it can yes
23:22 riteo: cool
23:22 JoshuaAshton: i think for serverside it uses xdg toplevel directly
23:22 riteo: wait, how does it detect that?
23:22 riteo: you get the global yeah, but that does not mean that you have SSDs
23:22 JoshuaAshton: the configure callback
23:22 JoshuaAshton: on the decoration global
23:23 riteo: what callback
23:24 riteo: there's one but you have to pass in a toplevel
23:24 JoshuaAshton: configure in zxdg_toplevel_decoration_v1_listener
23:24 riteo: yeah but you have to pass a toplevel
23:24 JoshuaAshton: hmmm
23:25 riteo: I'm not sure when you get sent the event though, but still, you'd have to at least roundtrip, assuming the compositor sends the event instantly
23:26 riteo: also because libdecor has its own toplevel wrapper which starts from an xdg_surface
23:28 ifreund: is there any supported way to run steam on a musl based distro?
23:28 ifreund: flatpak is pretty convenient for that
23:28 JoshuaAshton: flatpak
23:28 JoshuaAshton: but not supported really
23:28 JoshuaAshton: so to answer fully, no :frog:
23:31 Consolatis: riteo: when creating the xdg-toplevel either call set_mode() *if* you really have a preference or unset_mode() if not (recommended usually), then use the configure handler to update your decoration (e.g. render them / remove them)
23:33 riteo: Consolatis: yeah, but the idea was to use libdecor only if the compositor asks for CSDs
23:33 riteo: we can't do it like that as we'd have to recreate the window since libdecor has its own toplevel wrapper
23:34 Consolatis: that sounds difficult indeed, I guess if you just want to know the preference of the compositor you could create a dummy xdg-toplevel manually before
23:35 Consolatis: the kde decoration protocol has a preferred event for the manager itself, the xdg doesn't doesn't afair
23:37 Consolatis: the xdg one doesn't*
23:42 JoshuaAshton: mmmm
23:42 JoshuaAshton: seems my MR has another bug where you set and unset and get entirely different decorations... lol
23:51 Consolatis: JoshuaAshton: not sure right now but I'd assume you just need to call another set_mode() there?
23:51 Consolatis: the configure handler should then (hopefully) react to that correctly by either rendering the CSD or not
23:53 Consolatis: be aware of loops though if that function may be called on the configure handler.. afair the protocol stated something like "do not send the same value twice"
23:56 JoshuaAshton: Consolatis: Yeah just pushed up my MR with tbasically that
23:56 JoshuaAshton: https://gitlab.freedesktop.org/libdecor/libdecor/-/merge_requests/147