ifreund changed the topic of #river to: river - a dynamic tiling wayland compositor || https://github.com/riverwm/river || channel logs: https://libera.irclog.whitequark.org/river/
elshize has quit [Ping timeout: 252 seconds]
elshize has joined #river
waleee has quit [Ping timeout: 240 seconds]
IahTLu has quit [Ping timeout: 240 seconds]
snakedye has quit [Ping timeout: 240 seconds]
Shinyzenith has joined #river
<Shinyzenith> Hi I was redirected to the IRC room for any development questions.
<Shinyzenith> I am trying to submit a patch for a xwayland bug fix, https://github.com/riverwm/river/issues/455 to be specific
<Shinyzenith> I have added an if block with overrideRedirectWantsFocus to check if the surface wants focus, I have also called wlr.XdgSurface.fromWlrSurface on the xwayland surface
<Shinyzenith> the only puzzle piece that I'm stuck on, is how do i set the focus to said surface via the current seat?
<Shinyzenith> ```zig
<Shinyzenith>     const surface = wlr.XdgSurface.fromWlrSurface(xwayland_surface.surface orelse return);
<Shinyzenith>     if (wlr.XwaylandSurface.overrideRedirectWantsFocus(self.xwayland_surface)) {
<Shinyzenith>         // Focus the surface on the current seat.
<Shinyzenith> ```
Shinyzenith has quit [Ping timeout: 252 seconds]
Shinyzenith has joined #river
natris1979[m] has quit [Quit: You have been kicked for being idle]
<novakane> Shinyzenith: you probably want to use the focus() function in Seat.zig
<novakane> also IIRC you have a fromWlrSurface() in View.zig to get a view from the surface
<Shinyzenith> Yes I noticed that focusView exists
<Shinyzenith> I'll try that.
<Shinyzenith> One last question, how to get the current seat which is in use? I don't notice a seat field in the server struct
<novakane> what's the function you're trying to add those lines?
<Shinyzenith> fn handleMap in XwaylandUnmanaged.zig
<Shinyzenith> I tried server.input_manager.seats.first.?.focus but that threw some node error
<Shinyzenith> no member named focus in struct std.linked_list.Node
<novakane> maybe ` const seat = @intToPtr(*Seat, event.seat.data);
<Shinyzenith> There is no event parameter on the callback?
notzmv has quit [Ping timeout: 240 seconds]
<novakane> if you want to use input_manager you need something like this I guess https://github.com/riverwm/river/blob/master/river/View.zig#L528
<Shinyzenith> I already tried that as stated above
<Shinyzenith> I guess I did something wrong, I'll keep trying
<novakane> yeah but server.input_manager.seats.first.?.focus doesn't works because it's a node not a Seat
<novakane> you need to use node.data
<Shinyzenith> server.input_manager.defaultSeat().focus(xwayland_view) worked.
<Shinyzenith> is that alright^ ?
<Shinyzenith> or should I use the node.data approach
<novakane> well it would works right now because river can only have one seat right now but ideally you should already write this like if river would handle multiple seats
<Shinyzenith> alright I'll switch it out for the node approach
<Shinyzenith> and speaking of seats, I'm trying to write my own compositor and just had a question, are multiple seats really needed?
<Shinyzenith>     var buf: [11]u8 = undefined;
<Shinyzenith> and what does the following line do in tinywl.zig?
Shinyzenith has quit [Quit: Connection closed]
<novakane> really needed, I don't know, I mean it doesn't bother me on river but it depends of your setup I guess
Shinyzenith has joined #river
<novakane> I guess that it is used to write a string for something
<Shinyzenith> Not sure if I understand it's application
<tiosgz`> Shinyzenith: from the moment you were disconnected [about seats]: <novakane> really needed, I don't know, I mean it doesn't bother me on river but it depends of your setup I guess
<Shinyzenith> Thank you! I read the irc logs :D
<Shinyzenith> novakane So the patch didn't work
<Shinyzenith> it straight up crashes river
<tiosgz`> ah, ok then :)
<Shinyzenith> Not sure as to what I did wrong but I'll keep investigating
snakedye has joined #river
<novakane> probably because it's xwayland :P
<Shinyzenith> XD
<Shinyzenith>   wlr_xwayland_set_seat(xwayland, seat->wlr_seat);
<Shinyzenith>   seat_set_focus_surface(seat, xsurface->surface, false);
<Shinyzenith> this seems to be sways implementation
<Shinyzenith> and we already set the seat for Xwayland in InputManager
<Shinyzenith> and in XwaylandUnmanaged I'm just setting the focus
<Shinyzenith> So I'm not sure what's going wrong
Shinyzenith has quit [Quit: Connection closed]
mon_aaraj has quit [Ping timeout: 252 seconds]
mon_aaraj has joined #river
notzmv has joined #river
mon_aaraj has quit [Ping timeout: 252 seconds]
mon_aaraj has joined #river
scrollmaster has quit [Quit: disconnecting]
snakedye has quit [Remote host closed the connection]
snakedye has joined #river
IahTLu has joined #river
elshize has quit [Ping timeout: 252 seconds]
elshize has joined #river
mon_aaraj has quit [Ping timeout: 256 seconds]
mon_aaraj has joined #river
waleee has joined #river
_whitelogger_ has joined #river
_whitelogger has quit [Read error: Connection reset by peer]
dbuckley has quit [Remote host closed the connection]
dbuckley has joined #river
mon_aaraj has quit [Ping timeout: 272 seconds]
mon_aaraj has joined #river
<vipulogmx> Ifreund: ahmedraniri1994: I'll wait. Just as i waited two years to try it sway just to hate it at last. I'll wait for river to be included in debian stable and to shift to it completely from bspwm. 👍
<vipulogmx> NickH: you are AMAZING 👍 in trying river in few weeks now thanks to you.
<vipulogmx> <NickH>:" I also have up to date packages for things like....."<- i definitely will.
notzmv has quit [Ping timeout: 240 seconds]
bonic has joined #river
bonic has left #river [#river]
groknull has joined #river
groknull has quit [Remote host closed the connection]
scrollmaster has joined #river
<NickH> vipulogmx: glad to hear it's of use to you. Let me know what other packages you'd like to see.
<NickH> Two that you may find useful are not in Debian at all are fuzzel and wlopm
qyliss_ is now known as qyliss
notzmv has joined #river