ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
crazybyte has quit [Read error: Connection reset by peer]
crazybyte has joined #wayland
sima has quit [Ping timeout: 480 seconds]
riteo has quit [Ping timeout: 480 seconds]
riteo has joined #wayland
Narrat has quit []
emays has joined #wayland
emays has left #wayland [#wayland]
mblenc1 has quit [Read error: Connection reset by peer]
agd5f_ has joined #wayland
fmuellner has quit [Ping timeout: 480 seconds]
agd5f has quit [Ping timeout: 480 seconds]
Brainium has quit [Quit: Konversation terminated!]
coldfeet has quit [Remote host closed the connection]
andyrtr has quit [Ping timeout: 480 seconds]
andyrtr_ is now known as andyrtr
Sid127 has joined #wayland
narodnik has quit [Quit: WeeChat 4.5.1]
narodnik2 has quit [Ping timeout: 480 seconds]
nerdopolis has joined #wayland
iomari891 has quit [Ping timeout: 480 seconds]
iomari891 has joined #wayland
FreeFull has joined #wayland
narodnik has joined #wayland
balrog has joined #wayland
<bitblt>
does the wayland protocol dictates the use of logical coordinates, and if they should be integer or fractional?
<linkmauve>
bitblt, pixels are always spaced by integers, but you have protocols such as wl_viewporter which let you scale a given buffer to an almost arbitrary scale and crop.
<linkmauve>
For input, clients always receive logical coordinates yes.
<bitblt>
yes, thats why I'm asking this. It is obvious that when dealing with buffers (to be presented on screen) the dimensions will be in integer pixels that must be in the same space as the resolution of the screen
<bitblt>
but when doing things such as fractional scaling, the 'logical' space may be fractional too in order to correctly map to the physical resolutions
<bitblt>
I see that in wlroots, the logical positions and dimensions are expressed with integers and this seems wrong
<bitblt>
so either this is a wlroots implementation problems, or the wayland spec dictates the use of integers for the logical coordinate system and wlroots adheres to that
<emersion>
all surface sizes etc are integers in logical coords
<emersion>
almost everything on the wire is logical coords, and almost everything is integers
<bitblt>
emersion: yes, this is my question, is it dictated by the spec that they should be, or its a choice in wlroots implementation?
<emersion>
exceptions: when creating a new buffer the size is in buffer-local coords, xdg-output and wl_output position are in layout coords
<emersion>
and input events are in general wl_fixed
<emersion>
it's spec'ed in the protocol
<bitblt>
buffer-local coords make sense to be in integers (its a pixel buffer with discrete pixels), xdg-output and wl_output and in general layout coords do not make sense to be integers, especially now that the fractional scale protocol exists
<bitblt>
in my setup which is a laptop with resolution 2560x1600 and a scale factor of 1.75, this results in a logical resolution of 1462x914 which is way different from the 1462.8571x914.2457 that it should be
<bitblt>
so further calculations based on these truncated logical dimensions will be off
<bitblt>
if you take 1462*1.75=2558.5 and 914*1.75=1599.5
Brainium has joined #wayland
<bitblt>
even with rounding, you cannot infer the physical resolution correctly, so I thought that in general logical space coordinates/dimensions should be fractional for this to work correctly
<vyivel>
hot take setting a scale such that logical size is fractional shouldn't be allowed
<bitblt>
the problem is that logical sizes are everywhere, every window can result to a a fractional logical scale depending on its dimensions
Vaughn has quit [Read error: Connection timed out]
Vaughn has joined #wayland
<vyivel>
no it can't
<vyivel>
logical sizes of windows (surfaces) are always integer
<vyivel>
you're probably thinking about per-output physical sizes
<bitblt>
that means that each wayland client should get a slightly different scale value from the compositor, in order for it to have proper buffer size that matches its logical size * scale?
<zamundaaa[m]>
<vyivel> "hot take setting a scale such..." <- That doesn't work in practice