ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput
<whot>
bl4ckb0ne: I don't think it's a good fit tbh
<whot>
bl4ckb0ne: whatever joysticks need is probably something else (in addition to?) libinput, but I don't have enough experience with the details to really scope that
nerdopolis has joined #wayland
<bl4ckb0ne>
ill start a new project and see how it goes
<whot>
bl4ckb0ne: what's the specific issue you're trying to address with that, that's the main question. because there are a few issues around joysticks that are all related but also somewhat orthogonal (fd forwarding, identification, conversion of events, etc.)
<whot>
bl4ckb0ne: and unlike libinput where we were mostly guaranteed to be useful immediately a potential libjoystick suffers from the drawback that nothing will use it and the backwards compat pieces already in place will be used for approximately forever
<whot>
bl4ckb0ne: and adding joystick support to libinput to move the pointer around was enough of a niche case that I never wanted it, plus it would then also require the negotation of when to ignore the device (because a game currently uses it)
<whot>
kennylevinsen: luckily I'm in the wrong TZ so there are few buses around when I'm awake :)
nerdopolis has quit [Ping timeout: 480 seconds]
Guru_DE has quit [Ping timeout: 480 seconds]
<bl4ckb0ne>
my goal is some boilerplate for the joystick protocol im working on
<bl4ckb0ne>
what are the backward compat pieces you're talking about?
<whot>
SDL basically
<bl4ckb0ne>
yeah thats a big piece
mxlcjckmsmz has joined #wayland
mxlcjckmsmz has quit []
co1umbarius has joined #wayland
columbarius has quit [Ping timeout: 480 seconds]
fmuellner has quit [Ping timeout: 480 seconds]
nerdopolis has joined #wayland
sevz has joined #wayland
nerdopolis has quit [Ping timeout: 480 seconds]
nerdopolis has joined #wayland
nerdopolis has quit [Ping timeout: 480 seconds]
crcvxc has quit [Read error: Connection reset by peer]
riteo has joined #wayland
<riteo>
hi!
<riteo>
I'm implementing fractional scaling in godot and the specs says that sizes must be half rounded away from 0
<riteo>
that sounds nice and all, but what about converting from a scaled to a logical size?
<riteo>
like, do I do round(scaled_size / scale_factor) or do I just blindly divide and truncate the result?
<riteo>
from some dumb experimentation using the python REPL as a calculator it looks like that the decimal result is always under 5 when this happens, but I have no hard proofs about that
carlos_ has quit [Ping timeout: 480 seconds]
PuercoPop has joined #wayland
PuercoPop has quit [Ping timeout: 480 seconds]
<riteo>
well I'll go for now but as usual I'll read the logs if someone wants to help me, byeeeee!
<kennylevinsen>
riteo: The "primary" dimensions are the logical one, so you should generally only need to go logical -> "physical".
<kennylevinsen>
IIRC, it was found that it is possible to convert back assuming proper rounding is applied in both direction
tristianc670 has joined #wayland
tristianc67 has quit [Ping timeout: 480 seconds]
leon-anavi has joined #wayland
tristianc6701 has joined #wayland
tristianc6704 has joined #wayland
tristianc670 has quit [Ping timeout: 480 seconds]
carlos_ has joined #wayland
tristianc6701 has quit [Ping timeout: 480 seconds]
cmichael has joined #wayland
crcvxc has joined #wayland
manuel1985 has joined #wayland
qyliss has quit [Quit: bye]
qyliss has joined #wayland
qyliss has quit [Quit: bye]
qyliss has joined #wayland
mvlad has joined #wayland
crazybyte has quit [Ping timeout: 480 seconds]
caveman has quit [Remote host closed the connection]
caveman has joined #wayland
nightquest has joined #wayland
fmuellner has joined #wayland
nerdopolis has joined #wayland
Nefsen402 has quit [Remote host closed the connection]
bl4ckb0ne has quit [Remote host closed the connection]
emersion has quit [Remote host closed the connection]
Nefsen402 has joined #wayland
bl4ckb0ne has joined #wayland
emersion has joined #wayland
crazybyte has joined #wayland
nerdopolis has quit [Ping timeout: 480 seconds]
bodiccea has joined #wayland
Guru_DE has quit [Ping timeout: 480 seconds]
jmdaemon has quit [Ping timeout: 480 seconds]
Leopold has joined #wayland
nerdopolis has joined #wayland
manuel_ has joined #wayland
manuel1985 has quit [Ping timeout: 480 seconds]
mblenc has joined #wayland
psykose has joined #wayland
nerdopolis has quit [Ping timeout: 480 seconds]
nerdopolis has joined #wayland
nerdopolis has quit [Ping timeout: 480 seconds]
enick_227 is now known as ForeverNoob[m]
crcvxc has quit [Read error: Connection reset by peer]
ShapeShifter499 has joined #wayland
<ShapeShifter499>
hi
<ShapeShifter499>
it's been a while since I last posted any PRs. libinput still requires tablet files from libwacom for proper device support correct?
<ShapeShifter499>
I'm just now realizing I should make and test a '.tablet' file to see if palm rejection occurs properly
<ShapeShifter499>
for my device
mblenc1 has joined #wayland
Company has joined #wayland
mblenc has quit [Ping timeout: 480 seconds]
kts has joined #wayland
mblenc has joined #wayland
mblenc1 has quit [Ping timeout: 480 seconds]
manuel_ has quit [Quit: Leaving]
vbt has quit [Remote host closed the connection]
vbt has joined #wayland
gallo has quit [Remote host closed the connection]
cmichael has quit [Quit: Leaving]
junaid has joined #wayland
Leopold has quit [Remote host closed the connection]
Leopold has joined #wayland
kts_ has joined #wayland
kts has quit [Ping timeout: 480 seconds]
rbmarliere has quit [Ping timeout: 480 seconds]
mblenc has quit [Ping timeout: 480 seconds]
mblenc has joined #wayland
Guru_DE has joined #wayland
kts_ has quit []
mblenc1 has joined #wayland
<ShapeShifter499>
I'll wait for more help, the tablet file did not help solve the hand rejection
mblenc has quit [Ping timeout: 480 seconds]
leon-anavi has quit [Quit: Leaving]
junaid has quit [Remote host closed the connection]
mblenc has joined #wayland
mblenc1 has quit [Ping timeout: 480 seconds]
riteo has joined #wayland
<riteo>
kennylevinsen: regarding the monodirectionality of conversion, that's not doable with godot as due to the way that it works we must convert the user-facing windowing requests from "godot-space" to "wayland-space", where the former is pretty much local to the buffer and the latter to the surface
<riteo>
uh so I should round both for scaling and unscaling
mvlad has quit [Remote host closed the connection]
mvlad has joined #wayland
<riteo>
I'm not actually that sure about rounding both ways
<riteo>
I mean it should in theory have the same result
<kennylevinsen>
riteo: well the "wayland-space" is the primary space, and must dictate the window dimensions. You cannot take arbitrary scaled dimensions and assume they will convert back.
<riteo>
I see
<kennylevinsen>
E.g. at scales between 1.25 and 1.5 you can have 1 or 3 pixel wide buffer, never 2 pixel wide
<riteo>
The conversion isn't used for window size though
<kennylevinsen>
You will get incorrect representation (stretched or squeezed) if you convert such "wrong" dimensions
<kennylevinsen>
What then?
<riteo>
instead for stuff like "pointer_set_hint"
<riteo>
and actually... Only that? I'm currently looking in the code and it's the only instance of `/=` lol
<kennylevinsen>
I mean if it's just for an offset into your buffer, whatever
<riteo>
lmao it indeed looks like it's the only scaled->logical conversion done in the entire wayland thread helper
<riteo>
soooo... I shouldn't even bother?
<kennylevinsen>
If it is taking input from a Wayland pointer, then the original source is logical pixels
<riteo>
it isn't, it's just a way to let the godot part ask to set the pointer hint for when it's hidden
<kennylevinsen>
But yeah not the end of the world, just make sure it's calculated as doubles and rounded to not make things too bad
junaid has joined #wayland
<riteo>
oh I should calculate as doubles? I think that I did everything in floats for some reason
<riteo>
I didn't think this stuff required that much precision
<kennylevinsen>
it's rather that floats have terrible precision
<immibis>
floats have 24-bit precision which is not terrible
<immibis>
doubles have 53-bit precision
<immibis>
if your screen is 4096 pixels wide (12 bits) then floats are accurate to 1/4096 of a pixel (another 12 bits)
mblenc has quit [Ping timeout: 480 seconds]
tristianc6704 has quit [Read error: Connection reset by peer]
caveman has quit [Remote host closed the connection]
<riteo>
so, should I switch my logic to doubles?
<riteo>
(sorry for the delay)
caveman has joined #wayland
<riteo>
eh, I suppose it wouldn't hurt
<riteo>
well, I think I'll go. I'll round that one silly conversion and switch to doubles because it doesn't hurt. As usual, thanks a lot folks!
<riteo>
Byeeeeeeeeeee!
riteo has quit [Quit: epic rounding moment 2: electric bongaloo]
<kennylevinsen>
immibis: float is bad once you start doing fractional math that depend on correct rounding
<kennylevinsen>
On an absolute scale they are of course extremel close to the real value, but being infinitesimally off can mean rounding in the wrong direction
bodiccea_ has joined #wayland
bodiccea has quit [Ping timeout: 480 seconds]
iomari891 has quit [Ping timeout: 480 seconds]
dcz_ has quit [Ping timeout: 480 seconds]
ShapeShifter499 has quit [Quit: Leaving]
rv1sr has quit []
junaid has quit [Remote host closed the connection]
sevz has joined #wayland
jmdaemon has joined #wayland
sima has quit [Ping timeout: 480 seconds]
cool110 has joined #wayland
cool110 is now known as Guest426
Guest356 has quit [Remote host closed the connection]
sevz17 has joined #wayland
sevz has quit [Ping timeout: 480 seconds]
Brainium has joined #wayland
mvlad has quit [Remote host closed the connection]