Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 19 21:19
    jean-airoldie commented #1406
  • May 19 21:06
    jean-airoldie edited #1406
  • May 19 20:58
    jean-airoldie opened #1406
  • May 19 02:09
    lattice0 commented #1361
  • May 19 02:09
    lattice0 commented #1307
  • May 19 02:07
    lattice0 opened #1405
  • May 19 00:49
    StratusFearMe21 synchronize #1403
  • May 19 00:35
    StratusFearMe21 synchronize #1403
  • May 16 14:42
    thepperson commented #1034
  • May 16 08:46
    markus-bauer commented #1034
  • May 14 20:13
    unlimitedbacon edited #1397
  • May 14 02:37
    StratusFearMe21 synchronize #1403
  • May 10 06:16
    unlimitedbacon commented #1397
  • May 10 06:09
    unlimitedbacon synchronize #1397
  • May 10 01:31
    StratusFearMe21 synchronize #1403
  • May 10 01:30
    StratusFearMe21 synchronize #1403
  • May 09 15:17
    StratusFearMe21 synchronize #1403
  • May 09 15:14
    StratusFearMe21 synchronize #1403
  • May 09 13:48
    StratusFearMe21 synchronize #1403
  • May 09 13:45
    StratusFearMe21 synchronize #1403
yuri6037
@yuri6037:matrix.org
[m]
Hi, I have some questions about winit: is this rust library able to create a window in both Win7+, Linux (Ubuntu minimum - Xorg + Waylan) and Mac?
yuri6037
@yuri6037:matrix.org
[m]
well nevermind I can't use this lib anyway: I require layout agnostic key codes. If I press Q on a AZERTY layout I want Q not A. If I press Q on any keyboard layout then I want the program to report Q not whatever key based on the QWERTY layout
maroider
@maroider:matrix.org
[m]
well, that happened
Ralith
@ralith:ralith.com
[m]
very classic
madsmtm
@madsmtm:matrix.org
[m]
And is it even true? I mean, couldn't @yuri6037 have used ReceivedCharacter(char)?
maroider
@maroider:matrix.org
[m]
they effectively wanted what we'd get once the keyboard event rework lands
madsmtm
@madsmtm:matrix.org
[m]
Yeah, fair enough
maroider
@maroider:matrix.org
[m]
I'm not sure how relevant this is for you madsmtm, but I saw some discussion in the comments on reddit about macOS/iOS bindings
madsmtm
@madsmtm:matrix.org
[m]
Thanks for the link, I'll probably talk to those people when I get some more time!
DoM
@dom__:matrix.org
[m]

Hey! I have a question about exiting the EventLoop:
I am following a tutorial on wgpu (https://sotrh.github.io/learn-wgpu/) and it uses winit 0.25
I got to the end of the Surface part (https://sotrh.github.io/learn-wgpu/beginner/tutorial2-surface/#challenge)
but when I get to *control_flow = ControlFlow::Exit the window closes but the app is still waiting in the terminal. I was unable to find the proper way to exit a winit app as anything I put after event_loop.run() is unreachable code, returning after setting the control_flow also doesn't seem to do any difference. The example code does the same, but there seems to be no explanation in the tutorial for this. Do you know what my issue may be or what i am missing?

ps I am using Linux/X11

maroider
@maroider:matrix.org
[m]

but the app is still waiting in the terminal

so you're saying the program never stops running?

DoM
DoM
@dom__:matrix.org
[m]
yeah exactly! The window seems to close properly and event handling stops, but the program never exits
maroider
@maroider:matrix.org
[m]
strange...
can you reproduce this with winit's examples?
DoM
@dom__:matrix.org
[m]
i will check, one sec...
DoM
@dom__:matrix.org
[m]
hmmm the control_flow example seems to work and i see that it is different in many ways, but i'm not really sure which change is the culprit
though one thing that sticks out is that the last three events are:
MainEventsCleared
RedrawEventsCleared
LoopDestroyed
Is it possible that if I exit the loop without clearing the events the program just freezes? I never saw any mention of this before but i am pretty new to winit
maroider
@maroider:matrix.org
[m]
no, you don't have to do any work in order to drain events from the platform's queue
winit does that for you
did you check out v0.25.0 or did you just use master?
DoM
@dom__:matrix.org
[m]
i just used master, I'll see what v0.25.0 does
it seems to give the same result
maroider
@maroider:matrix.org
[m]
so it works?
DoM
@dom__:matrix.org
[m]
yeah
maroider
@maroider:matrix.org
[m]
Does this work correctly for you?
DoM
@dom__:matrix.org
[m]
no, this also freezes
i can type into the terminal but it doesn't stop until i kill it with ctrl + c
maroider
@maroider:matrix.org
[m]
does it work if you comment out all rendering/wgpu code?
DoM
@dom__:matrix.org
[m]
omg it actually does
i guess it was a wgpu issue then
1 reply
maroider
@maroider:matrix.org
[m]
paging cwfitzgerald
cwfitzgerald
@cwfitzgerald:matrix.org
[m]
👀
maroider
@maroider:matrix.org
[m]
short summary: DoM's program hangs upon trying to exit the application with ControlFlow::Exit when wgpu is in use
they're using X11 on Linux
cwfitzgerald
@cwfitzgerald:matrix.org
[m]
maroider: idk how winit works wrt reviewing, is there any chance of rust-windowing/winit#2025 getting in before the 0.26 release?
1 reply
Newbyte
@newbyte:matrix.org
[m]
👋 I'm trying to build the wgpu "just open a window" example from here: https://sotrh.github.io/learn-wgpu/beginner/tutorial1-window/
But when I run it, no window actually appears. It doesn't crash, and I do see it in the list of applications running. Just no window
3 replies
I suspect this is because I'm using Wayland via EGLStreams (thanks NVIDIA), and I understand Wayland is enabled by default for winit. Can I force winit to use X11 (and thus go via XWayland) somehow to see if that helps matters?
1 reply
cwfitzgerald
@cwfitzgerald:matrix.org
[m]
Newbyte: wayland is a cargo feature, you can disable it
maroider
@maroider:matrix.org
[m]
it's a bit awkward atm since we lack a maintainer for the web
but the PR seems fairly simple, so it shouldn't be too hard to get it merged in practice
no, it's not wrong per se
if proceeding to the next part of the tutorial doesn't work, then you can assume something is wrong
Newbyte
@newbyte:matrix.org
[m]
All this does is create a window, and keep it open until user closes it, or presses escape. Next tutorial we'll actually start using wgpu!
I mean, is this part wrong?
maroider
@maroider:matrix.org
[m]
it's not entirely correct when it comes to Wayland, yes
Newbyte
@newbyte:matrix.org
[m]
but it is for X11 and such?
maroider
@maroider:matrix.org
[m]
yes
Newbyte
@newbyte:matrix.org
[m]
I see, thanks! I'll try proceeding further into the tutorial then