ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
that_guy_ has quit [Remote host closed the connection]
that_guy has joined #wayland
ity has quit [Quit: WeeChat 4.2.1]
ity has joined #wayland
fmuellner has quit [Ping timeout: 480 seconds]
glennk has quit [Ping timeout: 480 seconds]
julio7359 has joined #wayland
guru_ has joined #wayland
Guru_DE has quit [Ping timeout: 480 seconds]
columbarius has joined #wayland
co1umbarius has quit [Ping timeout: 480 seconds]
<Company> "after all xdg_output properties have been sent (when the object is created and when properties are updated), a wl_output.done event is sent. This allows changes to the output properties to be seen as atomic, even if they happen via multiple events."
<Company> How does that work with registering globals?
<Company> like, once I register the wl_output global, doesn't that send a done?
<Company> so if I then register the xdg_output global, does that send another done?
<Company> do I need to make my app distinguish between those two?
<Company> or do I only get one if I register them both right after each other?
<Company> How does that work?
<soreau> Company: when wl_display_roundtrip() is called, it sends a done event internally
<Company> by whom? The app or the compositor?
<soreau> events are from the compositor
<soreau> you can see it in wl dbg output
<Company> I'm not calling wl_display_roundtrip()
<soreau> but in general, it's probably best practice to try and use the same registered object everywhere instead of trying to rebind.. might confuse the compositor
<Company> but maybe something else does?
<Company> I'm not rebinding
<Company> I'm using wl_output and xdg_output
<Company> those are 2 objects
<Company> and xdg_output sends a wl_output.done even when it's done setting up
<Company> and wl_output sends a wl_output.done event when it's done setting up
<soreau> well it just depends on the protocol as to if there's a done event or not
<soreau> IIRC
<Company> what protocol?
julio7359 has quit [Ping timeout: 480 seconds]
<Company> yes
<Company> so how many done events do I get?
<Company> and when?
<Company> xdg_output sends wl_output.done
<Company> wl_output sends wl_output.done
<Company> do they send the same event?
<Company> do they send it twice?
<Company> can I choose?
<soreau> wl dbg should tell what your compositor does, no telling if it follows protocol or if this is clarified anywhere
<Company> I would very much hope that this is clarified somewhere
<danieldg> Company: often two done events after initial bind, but later (resolution changes) there's one
<Company> because I would very much like to know if we're done or not
<soreau> I would guess, whever you do the call to tickle the compositor to sneeze up the events you're looking for, it will send a done event per output
<danieldg> Company: look at the order of what you send, and realize the compositor processes a request before moving to the next
<danieldg> so you bind an output -> it produces events + done; you bind xdg-output, it sends *those* and then done
<Company> danieldg: and if I bind in the other order I don't get a wl_output.done because wl_output isn't bound yet?
<Company> danieldg: or some crap like that?
<danieldg> think about how you'd bind in the other order
<danieldg> you'll find it hard to do
<Company> so I need to pretend that xdg_output isn't supported for the first done event
<Company> because the compositor hasn't figured it out yet
<danieldg> yep
<Company> that's junk
<danieldg> eh, just use a newer wl-output and don't use xdg-output
<danieldg> problem solved
<Company> well, we have that same problem elsewhere
<Company> every time there's state from multiple protocols associated with objects
<danieldg> the solution is the same, except when it isn't
<Company> like, fractional scale for surfaces and configure events
<danieldg> configure events in xdg batch things together
<danieldg> those just go in the next frame
julio7359 has joined #wayland
<Company> every frame is perfect
<Company> just not the first one
<danieldg> you should get fractional scale before you get the configure and render the first frame
<danieldg> if not, that's the compositor being wrong
<Company> I need to have the fractional scale object created though
<Company> otherwise it won't send it
<danieldg> sure; just create it with the surface
<danieldg> configure won't get sent until the first (no-attach) commit
<Company> but I guess I need to create the fractional_scale before creating whatever role I use
<danieldg> no, just that commit
<Company> so that's only a problem for globals then?
<danieldg> basically
<Company> well, or objects that can't be committed
overholts has quit [Quit: overholts]
overholts has joined #wayland
<Company> that's still exceptionally crappy
<Company> code-wise
<danieldg> an easy solution is to do a sync after binding & creating, and don't process the dones until that
<Company> because the client needs to juggle what state the compositor is in when sending done events
<danieldg> but yeah, xdg-output makes a mess
<Company> if I don't process the dones until then, I need to track what dones I still need to process
<Company> that's also not much better
<Company> kinda like XWindow configure counting after resizes
<danieldg> just have a 'first' flag
<danieldg> or... don't use xdg-output
<Company> don't other protocols have the same problem?
<danieldg> mostly no
<Company> when they add state to some surface/output/seat/whatever?
<danieldg> they tie things to particular events
<danieldg> this is really an 'initial event' problem
<danieldg> and xdg-output did not help by sharing the done event (imo that change was a mistake)
<Company> not sharing the done event is a mistake, too
<Company> because you don't know on updates if the other done event is gonna happen or not
<danieldg> imo it should have defined: if you have xdg-output, its done event comes last; you can ignore wl-output-done
<danieldg> but I suppose that would be harder to extend more
<Company> define done events to be alphabetical?
<Company> done events are always sent for all objects that have one, their order is always alphabetical
<danieldg> alternatively, you just have events on xdg-output-manager instead
<Company> that works outside of initialization
<danieldg> have them include the output, then you just bind the manager first
<danieldg> easy, no double done
<danieldg> it does mean every event needs to carry the wloutput object, though
<Company> does that help?
<danieldg> it prevents double-done
<Company> yeah, it does, because you bind the output
<Company> so if you've bound all the managers, the output will be fine
<danieldg> I guess it would be useful if protocols like fractional-scale would explicitly say 'this will always be sent prior to a configure event on the assocated xdg toplevel/popup/etc'
<danieldg> maybe get that added?
<Company> wasn't there an issue for that already?
<Company> I remember talking about that here
<danieldg> I don't read all words here
<Company> can't find one in the repo
Company has quit [Quit: Leaving]
kts has joined #wayland
kts has quit []
Leopold___ has joined #wayland
Leopold_ has quit [Ping timeout: 480 seconds]
navi has quit [Quit: WeeChat 4.1.2]
Leopold___ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
garnacho has quit [Ping timeout: 480 seconds]
Leopold_ has quit [Remote host closed the connection]
Leopold has joined #wayland
julio7359 has quit [Ping timeout: 480 seconds]
nerdopolis has quit [Ping timeout: 480 seconds]
julio7359 has joined #wayland
Leopold has quit [Read error: Connection reset by peer]
Leopold has joined #wayland
Leopold has quit [Remote host closed the connection]
Leopold_ has joined #wayland
silverpower has quit [Ping timeout: 480 seconds]
silverpower has joined #wayland
Leopold_ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
mxz has quit [Ping timeout: 480 seconds]
kts has joined #wayland
kts has quit []
Leopold_ has quit []
kts has joined #wayland
Leopold_ has joined #wayland
Leopold_ has quit [Remote host closed the connection]
Leopold has joined #wayland
kts has quit [Ping timeout: 480 seconds]
kts has joined #wayland
kts has quit []
Leopold has quit [Remote host closed the connection]
Leopold has joined #wayland
agd5f has quit [Ping timeout: 480 seconds]
rolf has joined #wayland
rolf1 has quit [Ping timeout: 480 seconds]
mxz has joined #wayland
glennk has joined #wayland
Leopold__ has joined #wayland
Leopold has quit [Remote host closed the connection]
guru_ has quit [Ping timeout: 480 seconds]
Leopold__ has quit [Remote host closed the connection]
lbia has joined #wayland
Leopold has joined #wayland
Leopold has quit [Remote host closed the connection]
Leopold has joined #wayland
guru_ has joined #wayland
junaid has joined #wayland
Leopold has quit [Remote host closed the connection]
Leopold_ has joined #wayland
Leopold___ has joined #wayland
Leopold_ has quit [Remote host closed the connection]
garnacho has joined #wayland
<kennylevinsen> Company: wl_output::done is sent at the end each time the output has properties updated, not "once and for all". An output can have its modes change or have a new interface added, and so multiple done events are normal.
Leopold___ has quit [Remote host closed the connection]
Leopold has joined #wayland
<kennylevinsen> If the client bind xdg_output after output, I'd expect you to first get wl_output properties, done, xdg_output stuff (possibly also a repeat of wl_output props), done, as that's the order it asked for things in.
JayBeeFOSS has quit [Ping timeout: 480 seconds]
JayBeeFOSS has joined #wayland
<kennylevinsen> you also need to call get_xdg_output with wl_output, so that's the only order things can happen in
<kennylevinsen> (that is, the events are not send when xdg_output_manager is bound, but when you call get_xdg_output with a specific wl_output you want extended - which requires both globals to already be bound, and so order is unimportant)
Leopold has quit [Read error: Connection reset by peer]
Leopold has joined #wayland
<kennylevinsen> danieldg, Company: there is no configure sent on scale change, so it would be hard to order it with respect to them. They are sent whenever, for example when a window is dragged across multiple screens.
<kennylevinsen> Oh company left
sima has joined #wayland
Leopold has quit [Remote host closed the connection]
Leopold has joined #wayland
Leopold has quit [Remote host closed the connection]
Leopold_ has joined #wayland
lsd|2 has joined #wayland
Leopold_ has quit [Remote host closed the connection]
Leopold has joined #wayland
privacy has joined #wayland
Leopold has quit [Remote host closed the connection]
Leopold has joined #wayland
Leopold has quit [Remote host closed the connection]
Leopold has joined #wayland
Company has joined #wayland
shark_descent81 has joined #wayland
shark_descent81 has left #wayland [#wayland]
Leopold has quit [Remote host closed the connection]
Leopold has joined #wayland
junaid has quit [Remote host closed the connection]
kts has joined #wayland
junaid has joined #wayland
modin has quit [Quit: ZNC 1.8.2 - https://znc.in]
modin has joined #wayland
Brainium has joined #wayland
mort_ has quit [Ping timeout: 480 seconds]
Leopold__ has joined #wayland
Leopold has quit [Remote host closed the connection]
mort_ has joined #wayland
lsd|2 has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
lsd|2 has joined #wayland
Leopold__ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
kts has quit [Quit: Konversation terminated!]
Fischmiep has quit [Read error: Connection reset by peer]
rasterman has joined #wayland
Leopold_ has quit [Remote host closed the connection]
Leopold has joined #wayland
qaqland has quit [Remote host closed the connection]
qaqland has joined #wayland
fmuellner has joined #wayland
nerdopolis has joined #wayland
qaqland has quit [Remote host closed the connection]
qaqland has joined #wayland
qaqland has quit [Remote host closed the connection]
qaqland has joined #wayland
Leopold___ has joined #wayland
Leopold has quit [Remote host closed the connection]
navi has joined #wayland
kts has joined #wayland
mart has joined #wayland
ecloud has quit [Remote host closed the connection]
ecloud has joined #wayland
zvarde1988303206779191685 has joined #wayland
Net147 has quit [Ping timeout: 480 seconds]
rolf1 has joined #wayland
Net147 has joined #wayland
rolf has quit [Ping timeout: 480 seconds]
MrCooper has quit [Remote host closed the connection]
MrCooper has joined #wayland
<danieldg> kennylevinsen: so what should a compositor that resizes a window and also changes its scale send in order to get a single frame? Example trigger would be a workspace under sway moving to another output with different resolution and scale.
fossdd has quit [Ping timeout: 480 seconds]
<danieldg> because I think today that's almost always going to generate two frames, assuming an application state that isn't currently waiting on a frame callback when the changes are delivered
fossdd has joined #wayland
<danieldg> I guess if you send scale first then conifgure, the compositor could discard the first frame as it doesn't have the ack'd configure
<danieldg> I suppose I got stuck thinking of that case and forgot the more common 'dragged across a screen bounary' case :)
rasterman has quit [Quit: Gettin' stinky!]
Leopold___ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
fossdd has quit [Ping timeout: 480 seconds]
Leopold__ has joined #wayland
Leopold_ has quit [Ping timeout: 480 seconds]
fossdd has joined #wayland
<Company> danieldg: wouldn't you ideally want to require a scale change to always require a configure?
* Company aware that's not the case today, but wondering about the ideal case
<danieldg> no, because usually it doesn't need a configure
<danieldg> the usual cause of a scale change outside the initial setup is 'window was dragged to a higher-DPI screen'
<danieldg> and window drags in general don't need reconfigures
Leopold__ has quit [Remote host closed the connection]
<danieldg> screen magnifiers or recorders could also trigger it without movement
<Company> I was wondering from an application level
<Company> but it depends on the design of the application
<Company> I'm trying hard to make scale changes in GTK not require a resize, but that requries conscious effort
<Company> because what usually happens is that text hinting depends on the scale
<Company> and that causes relayout
<Company> and then there's various apps like image viewers or (retro) games that want to align with the pixel grid
<Company> which also causes subtle differences, especially with fractional scales
privacy has quit [Quit: Leaving]
<d_ed[m]> clients don't need a configure to resize themselves
<Company> sure
<danieldg> that's tricky, yep
<Company> I was thinking about the benefit of having an extra path for scale changes without configuire
<Company> vs scale changes with configure
Leopold_ has joined #wayland
<Company> and those are both cases you want to support
<Company> like, maximized/fullscreen windows with "move window to next monitor" is a use case where you want that
Leopold_ has quit [Remote host closed the connection]
<danieldg> I suspect the best you'll get today is sometimes rendering a frame that isn't ever shown
<danieldg> if you delay rendering until after processing inbound events that'll usually not happen because they'll all arrive in one recvmsg() call
<Company> fwiw, scale + size go through the same codepath in GTK
<Company> but I think we detect which ones actually changed and skip stuff when things stayed the same
Leopold_ has joined #wayland
<Company> and that was a deliberate choice, because that's the path that needs to deal with swapchains
<Company> I wonder how much extra work that is if you have to recreate the swapchain twice - probably not too important
<Company> though if it's something like gnome-boxes, there's quite a lot of code triggered there
fossdd has quit [Ping timeout: 480 seconds]
fossdd has joined #wayland
<danieldg> for text hinting you almost want two modes for scaling: legacy-layout that doesn't move glyphs from how they'd be located at scale=1, and a flowing layout that acts more like web browser zoom
guru_ has quit [Ping timeout: 480 seconds]
<danieldg> I'm not sure how often you'd actually need the legacy mode but I would not be surprised if some things need it
Leopold_ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
mart has quit [Quit: Konversation terminated!]
fossdd has quit [Ping timeout: 480 seconds]
silverpower_ has joined #wayland
silverpower has quit [Ping timeout: 480 seconds]
fossdd has joined #wayland
kts has quit [Quit: Leaving]
Leopold_ has quit [Remote host closed the connection]
Leopold has joined #wayland
kts has joined #wayland
kts has quit []
fmuellner has quit [Ping timeout: 480 seconds]
<Company> danieldg: the legacy mode is necessary if the screen is significantly < 100dpi
<Company> how much depends on the person
<Company> because at that resolution you notice bad keming and hinting and it's worth it to adjust everything by 1px to make it look good
<Company> once your > 300dpi you don't need hinting anymore because basically nobody notices
<Company> so what you need depends pretty much on the hardware you want to support
<Company> those numbers are rough estimates, deduced from the flamewars in the font-related issue trackers
fossdd has quit [Ping timeout: 480 seconds]
<danieldg> I'd expect that nobody would be happy with font redering at scale 1.1 then - you'll shift everything around and mess up careful pixel positioning, or you make everything ugly
fossdd has joined #wayland
<Company> yeah
<Company> which is why people with bad monitors don't scale stuff
<Company> I mean, zoom in browsers is a pretty recent ivnention
<Company> that coincides with better screens
<danieldg> text zoom in browsers was there for ages
<kennylevinsen> danieldg: if scale and configure happen in rapid succession, the client can always just immediately render in response and supercede their last frame before it was displayed. The compositor shouldn't start discarding frames as the scale is just a suggestion.
<Company> text zoom used to do relayout
<kennylevinsen> If the client is actively rendering it can also just wait for the next frame event to debounce things
<danieldg> if a frame crosses a configure, doesn't the compositor discard the frame that doesn't have the most recent ack-configure in its commit? (yes, it doesn't have to discard it, but if it's doing a clean mutual resize of two surfaces it has to discard one of the two)
<danieldg> maybe discard is the wrong word there, but waiting for another frame that fits the intended layout better
<ifreund> danieldg: yes, thats what several compositors do (river and sway at least, perhaps more)
Guru_DE has joined #wayland
Guru_DE has quit [Remote host closed the connection]
Guru_DE has joined #wayland
<danieldg> that means that if you send scale first, then configure, you'll end up with only good frames displayed (and possibly one at the new scale but the wrong size discarded)
Leopold has quit [Remote host closed the connection]
fossdd has quit [Ping timeout: 480 seconds]
Leopold_ has joined #wayland
fossdd has joined #wayland
kts has joined #wayland
Leopold_ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
Leopold_ has quit [Remote host closed the connection]
fossdd has quit [Ping timeout: 480 seconds]
fossdd has joined #wayland
fossdd has quit [Ping timeout: 480 seconds]
mart has joined #wayland
mohit8158226 has quit [Quit: mohit8158226]
fossdd has joined #wayland
mohit8158226 has joined #wayland
<kennylevinsen> Compositors with transaction systems for coordinated tiling resize do that at least. Not sure if any stacking compositors would do that
fossdd has quit [Ping timeout: 480 seconds]
Leopold_ has joined #wayland
calcul0n has joined #wayland
fossdd has joined #wayland
fossdd has quit [Ping timeout: 480 seconds]
Leopold_ has quit [Remote host closed the connection]
fossdd has joined #wayland
Leopold_ has joined #wayland
julio7359 has quit [Ping timeout: 480 seconds]
rolf has joined #wayland
rolf1 has quit [Ping timeout: 480 seconds]
fossdd has quit [Ping timeout: 480 seconds]
Leopold_ has quit [Remote host closed the connection]
fmuellner has joined #wayland
peelz has quit [Read error: Connection reset by peer]
peelz has joined #wayland
fossdd has joined #wayland
Guest630 has quit [Remote host closed the connection]
julio7359 has joined #wayland
cool110 has joined #wayland
cool110 is now known as Guest983
kts has quit [Ping timeout: 480 seconds]
fossdd has quit [Ping timeout: 480 seconds]
fossdd has joined #wayland
fossdd has quit [Ping timeout: 480 seconds]
fossdd has joined #wayland
privacy has joined #wayland
fossdd has quit [Ping timeout: 480 seconds]
julio7359 has quit [Ping timeout: 480 seconds]
Brainium has quit [Remote host closed the connection]
fossdd has joined #wayland
junaid has quit [Remote host closed the connection]
Leopold_ has joined #wayland
Leopold_ has quit [Remote host closed the connection]
rasterman has joined #wayland
Leopold_ has joined #wayland
junaid has joined #wayland
fossdd has quit [Ping timeout: 480 seconds]
junaid has quit [Remote host closed the connection]
Guest983 has quit [Remote host closed the connection]
cool110 has joined #wayland
fossdd has joined #wayland
cool110 is now known as Guest987
mart has quit [Quit: Konversation terminated!]
Leopold_ has quit [Write error: connection closed]
rv1sr has quit []
sima has quit [Ping timeout: 480 seconds]
lsd|2 has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
graywolf has joined #wayland
<graywolf> Hello. Is there a keynav alternative I could use on wayland?
<psykose> something like https://github.com/moverest/wl-kbptr ?
<graywolf> Ah yeah, looks promising, thanks
<graywolf> Sorry, I am not very familiar with wayland's standardization process, but what does mean that protocal is -unstable and at the same time -v1?
<psykose> -unstable doesn't mean anything anymore
<psykose> -v1 means v1 since things start at v1
calcul0n has quit [Quit: WeeChat 3.8]
Leopold_ has joined #wayland
julio7359 has joined #wayland
calcul0n has joined #wayland
Leopold_ has quit [Remote host closed the connection]
Leopold_ has joined #wayland
yrlf has quit [Quit: The Lounge - https://thelounge.chat]
graywolf has quit [Quit: WeeChat 4.0.4]
yrlf has joined #wayland
rasterman has quit [Quit: Gettin' stinky!]
glennk has quit [Ping timeout: 480 seconds]