ChanServ changed the topic of #wayland to: https://wayland.freedesktop.org | Discussion about the Wayland protocol and its implementations, plus libinput | register your nick to speak
DPA has quit [Ping timeout: 480 seconds]
rasterman has quit [Quit: Gettin' stinky!]
DPA has joined #wayland
shsharma_ has joined #wayland
Moprius has joined #wayland
shashanks has quit [Ping timeout: 480 seconds]
yoslin has quit [Quit: WeeChat 3.7.1]
yoslin has joined #wayland
Moprius has quit [Quit: bye]
mohamexiety has quit [Quit: Konversation terminated!]
Ampera has quit [Quit: Don't look at my quit message, steve30 has a better one anyways.]
Ampera has joined #wayland
bbaovanc[envs][m] has quit []
bbaovanc[envs][m] has joined #wayland
realivanjx9 has quit []
nerdopolis has quit [Ping timeout: 480 seconds]
realivanjx has joined #wayland
Dami_Lu has quit [Remote host closed the connection]
Company has quit [Quit: Leaving]
realivanjx4 has joined #wayland
dcz has joined #wayland
realivanjx has quit [Ping timeout: 480 seconds]
realivanjx4 has quit []
<kchibisov>
The xdg_toplevel::configure says "If the width or height arguments are zero, it means the client should decide its own window dimension.", does it mean that if I got only one of them zero -> I should pick value myself for that dimension and keep the other one as is?
<kchibisov>
The other events, like xdg_toplevel::configure_bounds are using different wording and use **and** instead of **or**.
<maria>
Hi friends, I'm having issues setting my EGL application's window size while using server side decorations on KDE's wayland session. Here's a minimal version of the code I'm using: https://github.com/mariakeating/wayland-egl-resize-problem
<maria>
Is this a bug or is there some easy logic to ignore the unwanted configure requests while still maintaining the user's ability to resize? Thank you ^^
<maria>
Apologies for the terrible phone photo; when trying to take a screenshot of the faulty window it goes back to the default size without any glitches https://i.imgur.com/6Gv5vIf.jpg
<maria>
sorry if this is the wrong place to ask for help on this i didn't have any luck on the kde irc channel so if this isn't the right place either i'd appreciate being pointed where to go
___nick___ has joined #wayland
___nick___ has quit []
___nick___ has joined #wayland
Dami_Lu has joined #wayland
genpaku has quit [Read error: Connection reset by peer]
genpaku has joined #wayland
rasterman has quit [Quit: Gettin' stinky!]
agd5f_ has joined #wayland
<kchibisov>
maria: draw in responce to frame events.
<kchibisov>
And apply resize from the frame event.
agd5f has quit [Ping timeout: 480 seconds]
<kchibisov>
Though, your logic is weird, you resize the window back to 1280x720, then you don't set geometry for that resize.
<kchibisov>
So once in a while you force desync?
<maria>
yes sorry the provided code was faulty. in my actual codebase I was setting buffwidth to 1280, bufferheight to 720, and shouldupdategeometry to true while still having the issue.
<maria>
i believe i found a solution to the problem by deferring the xdg configure ack to in the loop and also committing the surface
<kchibisov>
Well, the solution is to apply configure once per frame event.
<maria>
i believe that's achieved in fixed-minimal-egl.c now. i'll have to look into frame events later thank you.
<kchibisov>
The code looks wrong, you don't need to commit, you'll commit from the eglSwapBuffers.
<maria>
if i don't commit the window glitches out
<kchibisov>
So double commit works?
<kchibisov>
because right now you commit twice.
<maria>
yes
<kchibisov>
would, suggest to look into WAYLAND_DEBUG=1 and ask kde folks. But the logic of randomly resetting size and acking configure just looks wrong.
nerdopolis has joined #wayland
<maria>
the goal is to, on user request, resize the window to a set resolution while not fullscreen e.g. in a game menu. here's a video of comparing the double commit to single commit. https://bighatwitch.net/files/691827044.mp4
<kchibisov>
How I do, is simply draw with the size I want, set geometry, commit, but I never tested on KDE.
<kchibisov>
doing random acks like you do seems weird.
<maria>
what do you mean by random acks?
<maria>
i ignore all but the lastest by deferring to when i'm drawing the frame i don't think that's random is it?
<kchibisov>
If you ack before updating geometry will it change anything?
<kchibisov>
I mean, you have an option to validate via logs, if the logs are sane -> KDE bug.
<kchibisov>
A good check in your case would be that your buffer dimensions match the geometry you set. You also shouldn't set geometry without buffer attached.
<kchibisov>
Not that it matters though, just saying.
<maria>
what does setting geometry mean?
<kchibisov>
set_window_geometry.
<emersion>
it's fine to never set geometry if you don't need it
<kchibisov>
yeah, true.
<kchibisov>
Though, some compositors are confused by it...
<emersion>
that's a compositor bug then
<kchibisov>
But from the logs you've posted you always draw a buffer of 640x480.
<kchibisov>
emersion: yeah, there're too many various compositor bugs.
<kchibisov>
in addition you have very inconsistent EGL bugs to help you live better.
<kchibisov>
as in mesa latches buffers on creation with llvmpipe, but not with dmabufs.
junaid has joined #wayland
<kchibisov>
it's not the case in the posted code, because the surface was created after the size was picked.
<maria>
testing it on a nested sway instance the size resets to 640x480 when the mouse leaves the window in all cases both with the double commit, single commit, server side decorations, client side decorations
junaid has quit [Remote host closed the connection]
<kchibisov>
sway will just send you a configure with 640x480 once mouse leaves the window.
<maria>
i'm okay with not arbitrarily setting the window size but i thought it would be nice for the window to resize to any newly selected resolution in-game. i feel pretty defeated after having it not work at all in sway aha.
<kchibisov>
you can simply ignore the size sway tells you.
<maria>
is there a simple way to do that while still respecting the user resizing the window?
<kchibisov>
You mean with mouse?
<maria>
yeah
<kchibisov>
The state must be RESIZING for interactive resizes.
mohamexiety has joined #wayland
<maria>
in the wl_array? XDG_TOPLEVEL_STATE_RESIZING?
<kchibisov>
Yeah, for the configure event.
<maria>
still having weird issues doing that. it doesn't resize when the mouse leaves but if i defloat and refloat after the resize the border and titlebar are for a 640x480 window and go through the actual content.
<kchibisov>
Sway resetting size in float is a sway bug though.
kts has joined #wayland
<kchibisov>
maria: are you sure you're not setting bogus window geometry.
<maria>
let me update the github code
<kchibisov>
because it seems like the case, I don't have such issue myself when setting the size myself on sway.
<kchibisov>
I do have size reset from sway.
<maria>
updated the github repo. fixed-egl-minimal is a bit of an awful name at this point. i'm not doing set_window_geometry at all.
<kchibisov>
Ah, I got an assumption from minimal, that function called update geometry updates geometry.
<kchibisov>
but it's not doing so.
<kchibisov>
Yeah, just sway bugged.
<kchibisov>
Could try weston.
<maria>
doesn't seem weston has client side decorations. works fine both with and without the extra commit though.
<maria>
i started testing different applications on kde for some of the other problems i found during this. i'm giving up trying to get everything working perfectly for now and will try again in a few years. thank you for helping me kchibisov i appreciate it a lot.