02:31ddshore: 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:31ddshore: sometimes*
02:42psykose: stuff still running in x has wm_class
02:43psykose: x applications run in xwayland
02:43psykose: wayland ones have app_id instead
02:44dD_: 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:44psykose: you didn't say what you need to find the wm_class for
02:46dD_: I'm using a keymapping software called xkeysnail that depends on WM_CLASS
02:46dD_: to find the correct mapping for a window
02:59dD_: looks like this worked: QT_QPA_PLATFORM=xcb konsole
07:57yshui`: 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:58yshui`: are all these complexities really necessary?
08:18vyivel: "stuff that is desync even in synced mode" …that's just not double-buffered state
08:28yshui`: hmm, actually it does make sense for subsurface stack order and position to remain synced. 🤔
09:57wlb: wayland Issue #447 opened by yshui (yshui) Request for clarication, sync mode wl_subsurfaces https://gitlab.freedesktop.org/wayland/wayland/-/issues/447
21:32wlb: 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:56JoshuaAshton: Anyone do libdecor stuff here? https://gitlab.freedesktop.org/libdecor/libdecor/-/merge_requests/147
22:57JoshuaAshton: set_visibility doesn't work at all under labwc/Plasma, but seemed fixable with a simple MR
22:57JoshuaAshton: 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:02JoshuaAshton: Maybe others using libdecor are falling back to xdg_toplevel directly if SERVER_DECORATIONS? Not sure
23:03Consolatis: not sure what version 2 of the xdg-decoration protocol they are referring to..
23:03JoshuaAshton: Me neither, I can't find it anywhere
23:04JoshuaAshton: This also fixes it for me on labwc as well as Plasma
23:08riteo: WHAT
23:08riteo: THAT WAS IT?!?!?!!
23:09riteo: 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:09riteo: JoshuaAshton: I reported that a few months ago as Godot uses that https://gitlab.freedesktop.org/libdecor/libdecor/-/issues/63
23:10JoshuaAshton: riteo: I recently found it in Gamescope
23:10riteo: 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:11JoshuaAshton: also libdecor putting its userptr at the end of the interface callbacks is truly devastating
23:11JoshuaAshton: =(
23:11riteo: 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:11riteo: JoshuaAshton: just use tags ;)
23:11JoshuaAshton: tags?
23:11riteo: you can assign a string to a proxy and check it
23:12JoshuaAshton: heh
23:12riteo: on Godot we tag most of our proxies with the "godot" tag and check it, no-opping or whatever in the various listeners
23:12riteo: (if we don't find our proxy)
23:12riteo: takes nothing also because it's a const char pointer so you can do a direct equality check IIRC
23:12JoshuaAshton: I ended up writing this shit for the automated forwarding to class function
23:12JoshuaAshton: template <typename Func, typename... Args>
23:12JoshuaAshton: auto CallWithAllButLast(Func pFunc, Args&&... args)
23:12JoshuaAshton: {
23:12JoshuaAshton: auto Forwarder = [&] <typename Tuple, size_t... idx> (Tuple&& tuple, std::index_sequence<idx...>)
23:12JoshuaAshton: {
23:12JoshuaAshton: return pFunc(std::get<idx>(std::forward<Tuple>(tuple))...);
23:12JoshuaAshton: };
23:13JoshuaAshton: return Forwarder(std::forward_as_tuple(args...), std::make_index_sequence<sizeof...(Args) - 1>());
23:13JoshuaAshton: }
23:13JoshuaAshton: #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:13JoshuaAshton: x_x
23:13JoshuaAshton: This is probably the worst thing I have written ever
23:13riteo: oof
23:13JoshuaAshton: Who knew std::forward'ing all but the last arg would be so hard
23:13riteo: is this server-side?
23:14JoshuaAshton: Yeah :b
23:14riteo: oh I see
23:14JoshuaAshton: https://github.com/ValveSoftware/gamescope/blob/master/src/wayland_backend.cpp
23:14riteo: perhaps libdecor should just tag its stuff and ask clients to check for it
23:15JoshuaAshton: well gamescope is a server that is also a client :b
23:15JoshuaAshton: i guess this is client for gamescope
23:15riteo: I never quite understood that part
23:16JoshuaAshton: Hm?
23:16riteo: is one supposed to normally run steam through it?
23:16JoshuaAshton: You can run Steam in big picture mode or games directly yeah
23:16JoshuaAshton: It's the only way to play games in HDR on Plasma 6 also
23:16riteo: 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:16riteo: no scripts, nothing
23:17riteo: I have a script called `itsgamingtime`, but it's all done through my research, which is a bit of a bummer
23:17JoshuaAshton: I mean it's really just
23:17JoshuaAshton: gamescope -e -- steam -bigpicture
23:17JoshuaAshton: for the most part
23:17JoshuaAshton: *-gamepadui
23:18riteo: mh, I _may_ have made my life extremely hard by having steam as a flatpak
23:18JoshuaAshton: oh for sure
23:18riteo: it works though 8)
23:18JoshuaAshton: especially as Gamescope WSI probably doesn't work there
23:18riteo: yeah I had to override some paths
23:19riteo: oh well
23:19JoshuaAshton: Daily reminder that the Steam Flatpak/Snap etc is not officially supported
23:20riteo: libdecor would really need some love, although I suppose that most people eventually switched to an homebrew CSD solution
23:20riteo: JoshuaAshton: yeah nw, I'm aware of that
23:21riteo: 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:21riteo: does SDL use libdecor?
23:21JoshuaAshton: it can yes
23:22riteo: cool
23:22JoshuaAshton: i think for serverside it uses xdg toplevel directly
23:22riteo: wait, how does it detect that?
23:22riteo: you get the global yeah, but that does not mean that you have SSDs
23:22JoshuaAshton: the configure callback
23:22JoshuaAshton: on the decoration global
23:23riteo: what callback
23:24riteo: there's one but you have to pass in a toplevel
23:24JoshuaAshton: configure in zxdg_toplevel_decoration_v1_listener
23:24riteo: yeah but you have to pass a toplevel
23:24JoshuaAshton: hmmm
23:25riteo: 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:26riteo: also because libdecor has its own toplevel wrapper which starts from an xdg_surface
23:28ifreund: is there any supported way to run steam on a musl based distro?
23:28ifreund: flatpak is pretty convenient for that
23:28JoshuaAshton: flatpak
23:28JoshuaAshton: but not supported really
23:28JoshuaAshton: so to answer fully, no :frog:
23:31Consolatis: 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:33riteo: Consolatis: yeah, but the idea was to use libdecor only if the compositor asks for CSDs
23:33riteo: we can't do it like that as we'd have to recreate the window since libdecor has its own toplevel wrapper
23:34Consolatis: 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:35Consolatis: the kde decoration protocol has a preferred event for the manager itself, the xdg doesn't doesn't afair
23:37Consolatis: the xdg one doesn't*
23:42JoshuaAshton: mmmm
23:42JoshuaAshton: seems my MR has another bug where you set and unset and get entirely different decorations... lol
23:51Consolatis: JoshuaAshton: not sure right now but I'd assume you just need to call another set_mode() there?
23:51Consolatis: the configure handler should then (hopefully) react to that correctly by either rendering the CSD or not
23:53Consolatis: 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:56JoshuaAshton: Consolatis: Yeah just pushed up my MR with tbasically that
23:56JoshuaAshton: https://gitlab.freedesktop.org/libdecor/libdecor/-/merge_requests/147