Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 03 01:48
    bayswaterpc opened #1360
  • Jun 02 13:13
    maroider edited #1359
  • May 30 17:29
    jmaargh closed #1358
  • May 30 17:29
    jmaargh commented #1358
  • May 29 23:40
    maroider commented #1358
  • May 29 23:39
    maroider reopened #1358
  • May 29 23:39
    maroider closed #1358
  • May 29 23:39
    maroider commented #1358
  • May 29 23:22
    jmaargh commented #1358
  • May 29 22:33
    maroider commented #1358
  • May 29 22:31
    maroider labeled #1358
  • May 29 22:31
    maroider labeled #1358
  • May 29 22:31
    maroider labeled #1358
  • May 29 22:31
    jmaargh commented #1358
  • May 29 22:30
    jmaargh opened #1358
  • May 22 13:52
    mkieblesz edited #1357
  • May 22 13:52
    mkieblesz edited #1357
  • May 22 13:51
    mkieblesz edited #1357
  • May 22 13:50
    mkieblesz edited #1357
  • May 22 13:48
    mkieblesz opened #1357
maroider
@maroider:matrix.org
[m]
which kind of transparency
the visual kind?
or the mouse input kind?
if it's the regular kind, then it should be working just fine
Red Artist
@redartist:matrix.org
[m]
the visual kind. i can't get it to work with the usual windowbuilder.withtransparent(true)
maroider
@maroider:matrix.org
[m]
what are you using to render
and what platform are you on?
Red Artist
@redartist:matrix.org
[m]
arch kde. X11.
maroider
@maroider:matrix.org
[m]
do you have a compositor?
you sort of need one for transparency to work on X11
Red Artist
@redartist:matrix.org
[m]
sure, kwin is a compositor
when i drag windows, they all go semi transparent
maroider
@maroider:matrix.org
[m]
and what are you using to render?
Red Artist
@redartist:matrix.org
[m]
i don't really know
i think i might be doing something wrong
maroider
@maroider:matrix.org
[m]
are you just running Winit's examples without anything extra?
Red Artist
@redartist:matrix.org
[m]
yes
maroider
@maroider:matrix.org
[m]
you need to render something for transparency to work, IIRC
Winit's examples don't render at all
Red Artist
@redartist:matrix.org
[m]
i am in a deadlock now 😿
can't test if transparency is working with winit without rendering anything. can't test if transparency is working with rendering by wgpu-rs because it doesn't support transparency yet
maroider
@maroider:matrix.org
[m]
try Glutin's examples
Red Artist
@redartist:matrix.org
[m]
yay, its working
maroider
@maroider:matrix.org
[m]
that's good to hear
Lukas Bombach
@lukasbombach:matrix.org
[m]
maroider: RE: opening a window from node js and not blocking node's event loop: You were completely right the whole time. There is no other way than exiting the Winit / NSApp event loop and picking up from there*. I have looked at other implementations, esp. GLFW and they too just start the loop, wait for the "applicationDidFinishLaunching" event and stop the loop.
  • there might be another way by moving node's event loop into a thread, but that is a whole different story
Lukas Bombach
@lukasbombach:matrix.org
[m]
maroider: I don't know if I annoy you or if you're interested, but i think I got an idea of this non-breaking event-loop thing now, at least for macOS. You probably already know that Cocoa wants you to use NSApp run, which is blocking and kind of wants to to just accept their main loop and that's it. There are a couple of libraries that tried to circumvent that API design and some blogpost that basically found hacks or undocumented ways to get out of this restraint. Usually you would call stop on the app in your app delegate's applicationDidFinishLoading event. This mean you stop the event loop, however your window stays on the screen, it just does not respond to events anymore. Luckily you can pick up from there and imlement your own event loop by polling nextEventMatchingMask in your loop. Another way is to subclass NSApp and override the run method and use nextEventMatchingMask there.
It's all crazy hacky and probably not something you wanna bet a lot of money on, but there are a few bigger libraries out there that just go with that
I am not sure on the CPU usage though when you poll nextEventMatchingMask like a looney
maroider
@maroider:matrix.org
[m]
I don't maintain macOS
but that does sound like a terrible hack
Lukas Bombach
@lukasbombach:matrix.org
[m]
yeah. and Imma shut up now, just though you might have wanted to hear the end of the story
:P
maroider
@maroider:matrix.org
[m]
I'm curious, though, as to what projects would do this
Lukas Bombach
@lukasbombach:matrix.org
[m]
that was the first one that I found, I found a few other ones but those were not as big
arturkovacs
@arturkovacs:matrix.org
[m]
Lukas Bombach: does winit's current design prevent you from doing something?
1 reply
arturkovacs
@arturkovacs:matrix.org
[m]
As far as I can tell from earlier messages, the issue was resolved and the current design of winit works fine for your use case, right?
Lukas Bombach
@lukasbombach:matrix.org
[m]
it seems i can apply that hack where i stop cocoa‘s event loop an create an own one by using run_return, i will create a small poc to confirm
Red Artist
@redartist:matrix.org
[m]
Just saw an advt for a rust project. Might be a useful reference ☺️ https://www.reddit.com/r/rust/comments/npnl1p/help_wanted_with_backrollrs_new_networking_library/
Ralith
@ralith:ralith.com
[m]
maroider: planning to unbridge freenode?
1 reply
I guess we'd probably have to track down gentz for that
1 reply
maroider
@maroider:matrix.org
[m]
and that's the biggest reason as to why I haven't looked into this much, if at all
Ralith
@ralith:ralith.com
[m]
at this point I think freenode is a spam risk, if nothing else
maroider
@maroider:matrix.org
[m]
a spam risk?
Ralith
@ralith:ralith.com
[m]
the staff quit en masse, so there's not really anyone left to deal with abuse
maroider
@maroider:matrix.org
[m]
that's a fair point
AidanConnelly
@aidanconnelly2:matrix.org
[m]
Does anyone know if it's possible to use winit and miri together? Miri isn't happy about winit using GetCurrentThreadId in some macro, was wondering if there was a way round that
Ralith
@ralith:ralith.com
[m]
I'd be surprised if that was feasible
miri isn't great for running entire programs
use it on your unit tests
AidanConnelly
@aidanconnelly2:matrix.org
[m]
Thanks @Ralith