#๐ฅ-vesktop-development
1 messages ยท Page 26 of 1
Ok so the spec is like
kde or hyprland?
KDE
You can only register shortcuts once in a session
According to the spec
In KDE you can just do it however often you want
uhh no?
I do not see the prevention in here nor in setactions
I also found your duplicate issue
setactions has no safeguard against duplicate either
that was an intentional choice theres a comment in the impl pr
where in the spec does it say once a session
Okay well its a bad choice because hyprland only allows once per session
This isnt a spec if no one follows it
Or only some people follow it
I feel like relying on applications to check the DE/WM just to correctly implement shit is a terrible idea
how have I never seen that ๐ญ๐ญ
This is a case where an application would or it would have to take the more strict behavior of destroying the session
to reregister
on every de/wm
Oh yeah it gets worse
They actually removed the shortcut clearing
ok so why did the kde implementor do that
the reason its there is the older version of the spec
accepted the shortcuts in CreateSession
which obviously.. is once per session
The protocol changed in https://github.com/flatpak/xdg-desktop-portal/commit/8cb5b6d997108443ecc26152c95bbca8c8c58fc3 to accept shortcuts in BindShortcuts instead of CreateSession. xdg-desktop-portal no longer forwards shortcuts from CreateSession so before this change, no shortcuts could be created. BUG:...
Essentially the implementor just Moved It and didnt read the spec
Saw changed to listshortcuts and just moved it in 5 seconds
Entirely unmentioned in the merge request description or reviews
this "only once" line was added in a pr with the message
global-shortcuts: Improve documentation
Various small cleanups in wording, formatting, and whatnot.
that is NOT a small cleanup and improvement that is a SPEC CHANGE
Various small cleanups in wording, formatting, and whatnot.
Related: https://github.com/flatpak/xdg-desktop-portal/issues/889
wait so is the spec wrong
What happens if you pass a shortcut with some stupid fucking LOOONG description
Throw like 2kb of @'s in a shortcut description please i wanna see that
I'd assume itd just error out at the dbus level
my laptop is off I was about to go to bed ๐ญ๐ญ๐ญ
aww
Input validation is not in the global shortcuts spec yet and no one validates anything
What could possibly go wrong
well atp the app would be intentionally breaking things and that'd count as malware
so like who caress
No but heres the idea
It saves in system settings
Can you just crash loop kde lol
Super annoying to fix!
last time an entry got corrupt (the no Id thing) restarting kde cleared it
Alright @humble mortar, in 11 hours: attempt to cook kde
I'll make an issue for the bind return thing then too
maybe you should make an issue for the non spec conformity
xdgportaltest.cpp: Line 236
{ QLatin1String("session_handle_token"), "XdpPortalTest" },
their test impl uses a static session handle token
oooh my god
Like
The spec isnt great
But they could at least try to read it??
The spec has been reasonable for literally a year
thats when all the fixes were made to it
I'm beginning to go insane
ashpd libportal both do it correctly
Unless the spec is saying something in clear english where it does not in fact mean the clear english of "use a library prefix combined with a random number"
๐ญ
Then it is definitely kde's fault
where's the spec on how it grabs the appid
if their test app is made to conform it'll be the random token issue all over again because it doesnt have a desktop entry & its not launched from it
why are app icons and stuff implemented different from the session appid grabbing
this is all insane
You dont need one
Implementation detail
All you're guaranteed is the app id is:
- most likely in a format defined by https://systemd.io/DESKTOP_ENVIRONMENTS/, and
- that retrieved app ID as defined by the systemd spec most likely/does conform to the spec here https://developer.gnome.org/documentation/tutorials/application-id.html except for the 'two or more elements' bit
It grabs the appid just based on the systemd desktop environments spec for a systemd unit
For flatpak and snap its some insane garbage code I haven't read
As an aside the gnome 48 feature freeze is on February 1st
They have 21 days to get the global shortcuts pr merged into xdp-gnome
for support on day 1 of gnome 48
maybe use
flatpak runand edit the .desktop to use that?
I'm just not sure if the parameter is processed by Vesktop, i've used the approach suggested by @Vendicated and the runtime shows that's invoked with the parameter:
This does however not affect the scrollbars inside Vesktop, so it appears that the parameter doesn't propagate as expected.
I'm not sure how else i could approach this.
If no application ID is available, the launcher should generate a reasonable name when possible (e.g. using basename(argv[0])). This name must not contain a - character.
Should kde/hyprland not do this instead of falling back to the token or nothing
does the flag work on chromium and discord.com/app
does the flag work on chromium and discord.com/app
Hmm good point, it appears the scrollbar always stays visible in the main panel there as well (non-overlay).
In Firefox the scrollbar in the main panel is overlay, so perhaps there is custom scrollbar code specifically in Chromium/webkit CSS that is forcing the scrollbar to stay visible.
@humble mortar, <t:1736578156:R>: attempt to cook kde
Yes, please, this is absolutely necessary, I often stream to my friends in 1080P 60FPS and every single time I have to switch it from 720P 30FPS.
now who wants to do the honors of testing the PR?
https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/merge_requests/166
I also have this issue on Zorin OS.
Settings selected when screensharing
How audio routes as shown by Helvum
What I have to do to get audio to work
OS: Zorin OS 17.2 x86_64
Kernel: 6.8.0-51-generic
stable 35801...
yeah ive seen the pr
its just not done yet\
I doubt it'll be merged by then
there needs to be at least 3 years of bikeshedding for a big feature in gnome to be merged
And it depends on https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3343 and https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/2485
the gnome-shell one is literally a edited js file
and a new xml file
and it has still not been merged after 7 months
this isnt even a big feature either
@humble mortar sorry for the ping but is vesktop screenshare being very choppy on windows a known issue
quite a few people have mentioned it in support and i can reproduce it on my laptop
is it choppy on the streamers client or just the viewer
just the viewer
disable hardware accel
ive noticed and reproduced hardware encoded streams are COOKED on the viewers end
except on web clients
and mobile
something is going wrong between webrtc and whatever custom solution discord desktop uses
@humble mortar just did that, quit vesktop from the system tray and its still really fucking choppy
idk then
stream from chromium to a web client to confirm if its just vesktop
ive seen people say it happens on other custom web based apps so I dont think it is just us
also try to view vesktop from chromium
I'm already watching from a web client, so I'll try streaming from one as well
its choppy when viewing from web on windows?
it was choppy when streaming from a vesktop client on windows and watching from a web client on linux
i will now try streaming from web on windows to and watching from web on linux
@humble mortar its choppy when streaming from web
on chrome
is the stream being hardware encoded
how do i find that out
idk I dont use windows ๐ญ
either way its something wrong with chromium
maybe try to stream from firefox
alr
if its laggy viewing that too discord cooked their native module
huh wdym
isnt there no native module on web
ยฏ_(ใ)_/ยฏ
too lazy
idfk
๐ญ๐ญ๐ญ๐ญ๐ญ๐ญ๐ญ
i dont stream on windows so i cant be bothered to find out
if you know how to check ill do it
idk check process viewer gpu usage?m
task manager
also this is def a larger issue because vesktop/chromium hardware accelerated stream -> macos desktop client = didnt load but -> macos web client (chromium based) it loaded and was fine
does chromium -> firefox work fine
huh
chrome was choppy
firefox wasnt
stream from chrome to firefox
maybe the upstream libwebrtc made a change to their impl and discord hasn't pulled them in to their fork
huh why would that matter
wouldnt there be no native module in browser -> browser
discords native module is patches ontop webrtc
if streaming from chrome to Firefox works fine this is almost likely the issue
it's a big feature for gnome ๐ฑ
i have this issue on sway
please use online resources such as https://wiki.archlinux.org/title/Chromium#Hardware_video_acceleration for how to get hardware acceleration (encode and decode) working on Linux.
@floral ledge do you think I should make a single issue on kdes bug tracker for these or one for each
I also have this issue on Zorin OS.
Settings selected when screensharing
How audio routes as shown by Helvum
What I have to do to get audio to work
OS: Zorin OS 17.2 x86_64
Kernel: 6.8.0-51-generic
...
I cant figure whether the developers will be more pissed at separate issues than the one
I think you make the one to save yourself 15 minutes
the side note is less of an issue
the spec does not specify how you should save shortcuts
Here is a script that doesn't require setting PULSE_PROP="discord.id=vesktop" vesktop. It is also modified to not mute screenshare, and allows adding different Vencord clients like Equibop.
#!/bin/bash
DISCORD_ID="io.github.equicord.equibop"
WANT_MUTE=$1
DISCORD_IDS=("dev.vencord.Vesktop" "io.github.equicord.equibop")
APP_ID_SELECTORS="("
for i in "${!DISCORD_IDS[@]}"; do
APP_ID_SELECTORS+=".info.props.\"pipewire.access.portal.app_id\" == \"${DISCORD_IDS[$i]}\""
i...
but it does define how to get the appid no?
No
LOL
The spec doesnt actually define anything about the app id
xdp-utils.c: Line 291
xdp_is_valid_app_id (const char *string)
The portal source code defines it
THANK FUCK
they need to do this
The settings before I hit stream
Stream Settings
What shows in QjackCTL
Friends cannot hear audio.
Also some more info just in case?
Server Name: PulseAudio (on PipeWire 1.0.7)
Server Version: 15.0.0
I wo...
I think that's a better approach
especially if it isn't sandboxed
kde instantly +1'd holy moly
no movement past that tho ๐ญ
also
I made this discussion
maintainer agreed it would be good to point out in the spec
Disable microphone workaround?
New discussion
conflicting things are up to the implementation
kde has unset shortcuts
hyprland wouldn't since its all config driven
trigger_description is however the implementation conveys how to trigger a shortcut
so it obviously won't have unset info
thats for the settings panel
shortcuts are already 'saved' for relaunches based on the implementation
this makes sense to have in the spec though
kde does appid then prefixed session token
hyprland does appid then nothing
soo
actually I bet theres a spec for saving persistent session stuff
which covers everything
Proof With Microphone Workaround Turned off
Before I hit stream
What QjackCTL shows
Friends can still not hear. Ive verified I am not muted on their end and their stream volume is still up
wait no its literally defined to be app_id
where
and then it breaks due to a bug
it doesnt break it just misreports
its registered and unbound
but still says ctrl+1 in the trigger_description which is wrong
on any impl spec for CreateSession iit has the app_id field
yes
it doesnt specify how shortcuts should be saved
remember kde was doing with appid + token
that was a mistake i believe
yeah but still spec doesnt specify
its implied like that other thing
this is notr implied
this will break compatibility depending on program behavior
between backends
trigger_description is just a string
the app should treat it as such
and display it to the user
its not something to be parsed or anything
okayu
that doesnt answer the question
what do you do when theres a conflicting keybind
do you not register it?
mind you theres multiple possible answers
its up to the impl
its preferred_trigger for a reason
you dont rely on what you send
does the app just not know what the trigger key is
you rely on what it returns
you cant figure out what the trigger key is
gg
i dont get why thats an issue for you
so you register and return "unset" from the implementation
or some arbitrary value
implementation defined
you ask to register to ctrl+1
the impl returns what to show the user in trigger_description
simple
that does not answer my question
you keep saying that but that doesnt answer my question
what should an implementation do with conflicting keybinds
you cant just say "up to the implementation" because im asking what the implementation should make up
disregard or store it like kde
hyprland doesnt care about preferred_trigger at all
kde stores it as 'default shortcut' but unchecked if its conflicting
I think the reason the functionality was hard to think about for me is because I forgot we should just implement it completely differently in vesktop for wayland/xdg compared to any other platform
we should just be registering all the possible discord global shortcuts with no preferred trigger
on vesktop start
yeppp
and then the user can configure it
its a different paradigm
Yeha
the keybind ui will simply be a display
I forgot that I should have had that paradigm in mind
The keybind UI shouldnt even show shit
Just turn it off on wayland except for the like help thing that shows default ones
well it should still be there to display the trigger_description
https://github.com/tuxinal/venbind/pull/1#issuecomment-2585930319 i laid it out here
Yeah this is true
Also that PR is ready
So is the windows one
Basically they're both like. Not actual full implementations
I am going to have to clean up both afterwards
theres literally no keyup support in either
I need to clean up the key trigger logic in both
Including the registration logic
the tomorrow in question
I would help but I'm waiting for stuff to get reviewed and merged
before I start overhauling things
I need the windows pr and xdg pr in to start overhauling
merge locally
I could do that in my own branch but thats really annoying
the git rebase in question
his last comment on it implies he was gonna merge as is
sooo
also remember an internal debounce thing
i dont think any keybinds discord has are press and hold incremental ones
yes the keydown spam wont work for any discord keybinds
will be fixed also
yep yep
๐
you're doing god's work
gods work is going insane with freedesktop standards
i was waiting to see if the other contributor responds and undrafts their pr
i guess i could just undraft it myself
oh i just saw your responses
@scenic hollow conflicts resolved
i regenerated the lockfile
i plan on porting to napi-rs so CI will be fixed soon with new pr
also i think refrain from making a new version until this is somewhat usable software
uh also we do kinda rely on the fact that you can define multiple keybinds per session
idk how else we would do it? how would the user set up a new keybind in one session?
okay other thing i was curious about
is there something that stops us from using wayland seats
instead of xdg
per-compositor security?
does that not require focus on the window?
I mean not according to the Wayland protocol
I think that'd be implementation specific
"A seat typically has a pointer and maintains a keyboard focus and a pointer focus."
hmm
Using the wl_seat.get_pointer request, clients may obtain a wl_pointer object. The server will send events to it whenever the user moves their pointer, presses mouse buttons, uses the scroll wheel, etc โ whenever the pointer is over one of your surfaces
where is this
next page
oh
thats the book
im talking about the spec mainlty
anyways yeah, that's true
I can see in hyprland they check focus before sending any events
total security model victory
But it technically is up to the compositor
You could make a shitty compositor with no seat security
LMAO
yeah and ask every vesktop user to use it if they want shortcuts and then support nothing else
I lied
defined for wl_pointer in the spec
"The wl_pointer interface generates motion, enter and leave events for the surfaces that the pointer is located over"
nevermind i didnt lie
god this is confusing
I cannot tell where the security is actually defined lmfao
either ways i'd assume it's not intended to be used as a way to define shortcuts
Found the security in hyprland
they have grabs
This is the actual security
1 active seat grab at a time
and it only sends to seats made by the surface client
Well the security model is much better than windows
good luck secretly keylogging ig
read evdev and ask every vesktop user to run vesktop as root
gg
what do you mean
does discord support one keybind for multiple keys
like one action
ok yeah it does
You don't
You would have to end and recreate the session really
the idea is this supports 1 shortcut -> 1 keybind trigger
and you remove the ability to change them from the settings panel. you just display the trigger_description and you change them from the compositor's method of changing them
on kde being system settings, hyprland being the configuration files
i meant we currently call BindShortcuts once for each shortcut defined. according to the spec we can't do that
An application can only attempt bind shortcuts of a session once.
so we'd have to first gather all our shortcuts and then add them in one BindShortcut call. idk how we'd do that
keyword
"of a session"
free the session
make a new session
ok but that's kinda crappy in it's own way
That is ONLY if we want to support the user adding more keybinds though
The correct way is whenever Vesktop starts we grab all the possible actions that can be bound
since there's only like 15 of them
that discord allows you to bind
And we bind them
No preferred triggers
Edit the keybinds through your compositor
Basically the paradigm is going to be completely different to any other platform for how it will work
I don't know if anyone actually seriously binds an action to more than one key very often at all
Seems very niche to go through the effort of session reregistration to support unfortunately
And if they really want that it should be a compositor supported thing
AKA Hyprland supports that
Just add another config entry
With the same shortcut
Boom the hyprland event dispatcher will handle it for you
idk about kde
kde disables shortcuts on conflict 
That's not what I'm saying
I'm talking about binding several keys to one action
I imagine KDE just supports 1
OH yeah i read that backwards
yeah
no i think kde supports multiple actually???
Binding one key to multiple actions is flat out never happening
Dead on arrival because no compositor is gonna handle that properly
Except hyprland lawl
yeah you can just checked
KDE just breaks whenever theres a conflict its stupid
If it does happen then its the portal backend's issue not ours at least
dont have to worry about it
seems like hyprland's config file is the most solution free issue
and they dont have to spend time making 4 prs to implement it in UI
they're on to something here!!
Effortless multiple keys to one action and multiple actions to one key !
honestly in this scenario i'd rather ask the xdp people to consider changing the spec cause that's a weird requirement
It's not really a weird requirement
Because you're seeing this from a Vesktop perspective
Where all of this requires some insane JS modding and app modification
When you're like making a normal desktop app and you want shortcuts you have a list of actions you want to be able to be bound to a key
So its actually really easy for that use case
All i do is i pass the portal my actions and boom
The user can configure shortcuts in the compositors' method for that whether that be a UI or a file and I dont have to do any input logic
I just get my activated and deactivated events
And the compositor can support multiple keys to one action and multiple actions for one key on its own in UI/configuration
It's pretty easy/elegant for the vast majority of an application's purposes
guhh yeah i guess
It's a different paradigm to discord and like conventional applications though where they have hteir inbuilt settings UI and you can go and do whatever keybinds you want in there
But that's part of the security model
All of that is handed off to the compositor
So you really don't actually want an application to be abusing preferred_trigger and freeing/creating sessions
The correct ergonomic way is a session at app start and sending over all the possible shortcut actions
And the compositor handles the rest
Frankly it's easier than windows input where you have to go use some library that makes a hook or some insane garbage and receives every input event on the entire system and has to filter it
If not for d-bus requiring a wohle lotta boilerplate to interface with at least
but its just IPC instead of insane global input hooking
Yeah the idea I think is literally rip out like the entire shortcut ui
literally yoinking it would be liscence violation I think
Like just rip out the top part not the keybind help at the bottom for the default keybinds
yeah
don't yoink it just remake it
yop
It would not look good anyway with the changes
You'd have to remove the record button
Then display the trigger description (which on hyprland is literally always an empty string mind you)
2 billion patches vs writing a bit of ui
yes
I think you can just remove the react element at the top and then replace it
tbh
it doesnt return anything even if you set a bind in the config??
It does heres the trigger_description code
combines all the trigger names
Nope lol
Too lazy ig
open bug report
Not a bug implementation decision
thats not spec conformant
That'd be a feature request
the spec says it should return a string on how to trigger
"User-readable text describing how to trigger the shortcut for the client to render."
exactly
kde is 1 bind per shortcut
I don't think it's super duper easy for hyprland to pull this off
you can add more in the settings page
Their wayland protocol doesnt support that
query whatever config constructor thing they have for the appid+shortcut id
Yeah thats not simple
yes but multiple shortcuts can't have the same bind active
The portal interfaces only through their wayland extension
A better way to read Wayland documentation
shortcuts can have multiple binds
They would have to modify their protcol to support returning the triggers
And signals for when those change
It would be such a mess
I READ IT BACKWARDS AGAIN sorry
how else should they do it
They made a wayland protocol extension for global shortcuts specific to hyprland
the portal talks to the compositor through their extension
everyone is happy
insane layers
No other way to do it unfortunately
๐ช
KDE does it through QActions or some stupid shit
I don't know how kde works lol
I dont know why it uses qt
Nor how the compositor registers them
I can tell
How the hell does that even work
Do they have a custom fucking layer on top of qt that makes shit actually work
like
qt isnt solely ui
How do those qactions work in the compositor lmfao
I know it's not solely ui
Qt has an insane amount of stuff in it
Qt sucks every app that uses it takes 200mb of memory now I might as well be using an electron app
anyway yeah open a report on hyprland
let them figure out how to mangle their shit
I think thats just the specific app using an insane amount of widgets
the spec defines trigger_description as something you can rely on
so it shouldnt always be empty
chat does it suck
...
chat clients are always gonna be 'heavy'
so many things if you want it to be stylized and not simple text boxes
This is true considering halloy uses 220mb of memory on start and that's made with iced
also exe so its all bundled and can't share the libs
so fair point
also why doesnt the spec have any method to trigger opening the shortcuts settings beyond BindShortcuts
seems like an oversight
node_bindgen was the single biggest architectural mistake venbind made i gotta fix this
holyy
i have nodejs in path stop downloading it my guy

Also this is fair enough
what is even happening here
is this lifetimes coming to haunt me
huh no i remember having a lot of issues with u64 in general
i am removing the display_id and window_id btw for now disable the node feature
or
wait for me to commit my stuff
okay I will just revert my conversion to a move closure
and push the other windows compilation fix
Like entirely?
I will have to remove them from windows start_keybinds_internal
that or I wait for you to commit and rebase
(again)
if its entirely I can just remove it really easiyl from the windows impl
yeah entirely i thought it's required for wayland but apparently not
wait does hyprctl globalshortcuts not even return what theyre bound as ?
thats so silly
It might
It intentionally is that way for hyprctl globalshortcuts
Hyprctl globalshortcuts basically just gives you the info you need to add that to the config file
If you use hyprctl binds or whatever it will show up
just read the source
in not reading source on my phone ๐ญ
hyprctl binds - lists active keybinds
hyprctl globalshortcuts - lists active global shortcuts solely for the purposes of easy reference/addition to the config file
it just lists the appid/shortcut description practically
hyprctl binds will list global shortcuts you actually bound

dont ask me why
you cant
binds is reading from the internal keybind manager m_vKeybinds array
hyprctl is built into hyprland
the portal is a separate source tree that only communicates through the wayland protocol extensions
ughh
:3
I love... MODULARITY!!!
Ironically hyprland is the most reasonable and easy to interpret implementation which is hilarious
Instead of insane Qt bullshit its just a wayland protocol extension
are kde and hyprland really the only 'full' implementations
Ohh
I remember how kde's one works
Oh my god lmfao
They just create a qaction and then stick it into KGlobalAccel
Great work guys
not really that much different than hyprland tbh
tacking it onto the existing shortcuts impl
archwiki has dde as an implementation of GlobalShortcuts

no
hyprland's wayland protocol extension thing is great
super easy to find the documentation and its all specified
want to use it? u can use that protocol in any app without dbus
Contribute to linuxdeepin/xdg-desktop-portal-dde development by creating an account on GitHub.
its a stub
just using the protcool with wayland-scanner or hyprland-wayland-scanner
good job archwiki guys
kde's implementation?
yeah. we use kglobalaccel
which is like ok whatever
works ig
except theres even more layers
it goes portal -> kglobalaccel -> kde daemon
so kglobalaccel is just a middleman
oh my god
wait its even worse
ohh nooooo
@humble mortar
Client dbus -> xdg-desktop-portal -> impl dbus to backend -> KGlobalAccel -> kde daemon THROUGH ANOTHER DBUS
hyprland uses a wayland protocol. they use another fucking dbus
:-(
You thought hyprland's wayland protcol was bad
Yet thats a super simple portal backend -> compositor direct protocol that I can find just by going on the wayland protocol browser
on the pretty docs page
KDE? Extra middleman and an extra dbus protocol
enjoy
Its not even to the compositor
counterpoint: plasma has wobbly windows
its to kde daemon
What the hell does kde daemon do
Do they just have a service that runs and grabs input directly
do they even bother with wayland input
KGlobalAccel is so ancient I would imagine not
Oh god
The kglobalaccel source says the relevant handler is in kde daemon
(The relevant handler is not in kde daemon)
Where is it going
No way to tell since its a random dbus request with no docs so it doesnt tell you
Where is John KDE to consult on this matter
You cant search an org for code on gitlab
github mirrors exist
http://wiki.tf/Right_Behind_You
Audio was created and is owned by Valve Corporation.
my reaction
KDE devs are allergic to spacing
Discord Account
psychloor
Motivation
Whenever Vesktop starts up, it doesn't remember last position it was on my desktop unlike discord.
have to drag it to the secondary monitor every time
Solution
remember last position on drag and monitor and startup there
Alternatives
aren't any?
Additional context
I did see another but that was because of wayland and was solved. this is on windows
Request Agreement
- [X] I have searched the existing issues and found no s...
Basic Windows and Wayland (via xdg-desktop-portal) support have been merged into Venbind! ๐ฅณ
There won't be another tagged version of Venbind until it is at least somewhat usable (confirmed with maintainer) - key release events aren't implemented and there's issues with the existing implementation that need to be fixed. Once that's done, and Darwin support is done (shouldn't be too hard - libuiohook has it inbuilt) then Venbind should be pretty ready, and then everything's on the JavaScrip...
god does anyone here even have a macos machine to test it
honestly i think we can delay darwin support until someone comes around and contributes it i don't think it should block our release
like. we can see if it builds using a macos target because rust is Awesome but like..
A fair amount of people seem to use vesktop on macos
just from a basic search of this discord
@scenic hollow swapping over to napi-rs gives a lot more architectural freedom
how do you want this designed lol
separate thread for the platform-specific handler and the JS callback loop?
so 2 threads?
n-api has this delusional insane support under the threadsafefunction api that makes that possible
yeah. we could theoretically try fixing up async for the libuiohook dispatch function so it's one thread but that might prove difficult. two threads it is
i think that was actually why it was such a pain in the ass to implement it using napi rs
like for node bindgen you can literally have js callbacks with the same syntax as rust closures
Yeah node bindgen does it all for you
The napi-rs implementation is, indeed, a pain in the ass
It's much more flexible but its a huge pain
btw i'm making progress for making windows work with the current ci cd
turns out libuiohook is very insistent on targeting linux despite having set the target to windows
lmao
Just realized uiohook isnt grabbing my mouse button events for my usual push to talk key
on windows
mouse4 is not a key I guess
separate event
EVENT_MOUSE_PRESSED
tragic
is that what you see in the vesktop keybinds screen??
It's what I'm seeing looking at the libuiohook codebase
huh
We'll end up needing to support that too
annoying as fuck
I imagine same issue on x11
hilariously I made some random internal napi function assertion fail immediately upon testing this new napi-rs code
its going well
same here, been happening since starting to use vesktop. i have the NoDevtoolsWarning plugin and Developer Mode on, but the active account always gets logged out upon resume from suspend
I've noticed that it works just fine when running through XWayland
macos vm:
can you show to contents of state.json at %AppData%\vesktop\state.json? Does the windowBounds array and displayid field change when closing in different positions?
I have a mac
I can test it
does the PR to vesktop need to be updated with the newer version? ๐ค
actually I'll figure it out
I have a similar issue.
- If I share the whole screen, the stream will never load for other people.
- If I share a windowed application, the stream works. However it freezes the moment I fullscreen the application, and turns back normal if I window it again.
- If I share a fullscreened application, the stream does not load. If I window the application, stream will load instantly.
- If I share region of screen, the stream never loads, and for some reason the preview on host pc is showin...
vesktop is cancelled
too many yappers saying the same thing 100 people have already said before them
finally
can't wait for vesktop 2
people think if they repeat the same thing a 100th time it will get fixed quicker or smth
Added a video showing the entire process as well as attaching a log now that I figured out how to do so. I also tried this time using only my headset mic and disconnected my blue yeti. The same thing occurs with both microphone workaround and without. Below is the video
Screencast from 2025-01-13 16-57-52.webm
Here is the log
venmic.log
...
i literally cannot repro this locally (streaming to myself with an alt) no matter the env but when i stream to a friend they get the cooked loading
I can consistently repro this with them in chromium by disabling and enabling hardware encoding
im confused why my local macos/windows vm or my phone doesnt have the issue but guh
webrtc routing shenanigans?
this is entirely a discord issue though
someonej should open a discord ticket
and you're trying on xdph?
Holy hell 1280 lines of code in xdph for screencopy
"disabling and enabling hardware encoding" is crazy
It could theoretically be a vesktop issue
Okay nevermind it uses electron's api which uses webrtc::DesktopCapturer
Okay the portal does matter webrtc uses xdp
wasnt too sure if they did before
same here, been happening since starting to use vesktop. i have the NoDevtoolsWarning plugin and Developer Mode on, but the active account always gets logged out upon resume from suspend
does this still happen when you turn developer mode off?
@scenic hollow
How is the thing behind so far
Stable rustc is at 1.83.0
Thanks nix
Also why is mold disabled
The lockfile needs to be updated
idk how to do allat im on windows
with WSL of course
there
relatively easy with wsl
yup everything is kind of out of date rn on main i was updating
dont you dare
i already updated the devenv lock
napi-rs cli is my personal 9/11
i hate github actions
i THINK it's gonna work this time
i think github actions is hung on uiohook rn
had 2 change the target in devenv
which i missed
I hate nix
Bad software
@scenic hollow Ironically I got the CI working fully except uiohook-sys is now failing because cmake cant find ninja
Despite the fact that I have added it tot he devenv
I lied
it found it
This sucks
yeah i've also had to manually specify where advapi32 is
and the windows.h include directory
the portal isnt the issue
well its not the issue for the non loading issue
idk about the artifacts
the hardware encoded enabled vs disabled, loading vs not thing can be replicated in pure chromium with vaapi so its 2000% not us
what's driving me insane though is i can't repro it purely locally
it always loads for me from my alt
I think I'll report it to discord and see what they say
can be replicated in pure chromium? LMFAO
figured that out immediately btw
you use a like
2 year old uiohook for some reason
way earlier than the latest commit at the time u started this repo so
newest one has a fixed cmake lists
oh huh yeah i think there was issues with the latest commit at the time i don't remember what
Yeah there's some unknown type issues
I don't know how theres no issue for it
Discord Account
octogonee
Operating System
EndeavorOS
Linux Only ~ Desktop Environment
Hyprland
Package Type
AUR
What happens when the bug or crash occurs?
Screensharing is just weird.
Sometimes it doesnt load, and other times it does what is displayed in the images below.
I've been looking everywhere for a solution and found nothing.
Thanks!
What is the expected be...
{
"firstLaunch": false,
"windowBounds": {
"x": 3870,
"y": 139,
"width": 1872,
"height": 1161
},
"displayid": 274386696,
"maximized": false,
"minimized": true
}```
and now for some reason it works, weird
I spent forever looking for a fix only to read the error more closely and discover it was bindgen being stupid
.header("stdint.h")
World leading fix for mr worldwide
It is because uiohook is bad and uses C coder mind rot
Where the only reason it compiles is because they only include the specific header after stdint is included
However... EVIL binden with clang would not know about this since its trying to bindgen a single header file...
VICTORY IS MINE
@scenic hollow
Does what it says on the tin. Also removes a debug print from windows.rs and updates the README a bit.
CI now works fine, napi-rs with proper threading in place of node-bindgen. CI builds successfu...
turns out the build scripts were bugged before. you can't use cfg(target_os = abc) in a build script
have to use the cargo env variables
otherwise cross compilation explodes
yeah i also noticed that turns out build.rs is different
so i was working on my own ci cd fixes and i was stuck at a part where you need some libpthread thing for compiling to windows and i'm wondering if all that could've been avoided by using x86_64-pc-windows-msvc instead
You have to use cargo-xwin though
napi-rs requires it for its cross builds and it solves 99% of issues so
i dont mind it
x86_64-pc-windows-gnu is a bad stupid target
dont use it
cargo-xwin is fascinatingly peak tbh. Generates a cmake toolchain for you for any build scripts using cmake-rs and automatically injects it into the environment with no intervention needed, automatically sets up clang-cl and llvm-lib for MSVC abi compat
Pulls in windows-msvc-sysroot to use the windows header set
yeah it's so cool dunno why i haven't heard of it
only 376 github stars is crazy
The cools just use this nowadays i think https://github.com/cross-rs/cross
Free of charge multi platform building and testing i guess
Nevermind it sucks it just spins up a bunch of docker containers
:(
So boring!!
That doesn't count as cross compilation thats just docker abuse
Probably related: #1012 and #372
what if chromium wasnt bad and everything just worked
I really dont think this is a duplicate.
I'm using an AMD gpu, and no issue has this exact problem.
Discord Account
No response
Operating System
Debian 12 bookworm
Linux Only ~ Desktop Environment
Gnome on Wayland
Package Type
stable 358711 (f042b2b) Build Override: N/A Vencord 3243120 (Vesktop v1.5.4) Electron 33.2.1 Chromium 130.0.6723.137
What happens when the bug or crash occurs?
When I want to upload a file
What is the expected behaviour?
I can't access to files in Documents and Music, It appear one day (I had access before)
An update ? I have ac...
if you're using flatpak - either don't, or grant vesktop access to the desired folders with flatseal
otherwise, electron/chromium/system issue so nothing we can do, it will likely fix itself in a future update of any of those
probably the electron changing to a new portal version before it was stable thing
based on the screenshots those pickers are different
so likely their de doesnt sync the pinned stuff between portal impls
speaking of-
34.0.0 hit stable
which has the fix for that
soo
Discord Account
iirzd
Motivation
It is often quite nice to have quick control over your input and output, especially when in a hurry. Discord has a menubar icon on macOS similar to Windows, allowing you to mute and/or undeafen:
Vesktop however, lacks this important feature.
Solution
Implement a menu bar icon into vesktop for macOS. If it isn't present on...
what kind of alternate universe do you wish you were living in
Replace chromium with firefox and make gecko great
Peak alt universe...
Add further support for 8K streaming as well as an option to stream 120 FPS as well.
A modified version of the original pull request #1024 .
great job bruh, we have just added another pull request which further allows the user to choose 8k and/or 120 FPS screenshare #1051
hi @Vendicated can you please help review and merge this pull request? TYSM
great job bruh, we have just added another pull request which further allows the user to choose 8k and/or 120 FPS screenshare #1051
what is this comment lol
isn't there a bitrate cap anyways, so it would look horrible
the point of the -electron packages are to use the system/latest electron. If you wanted to use a supported electron version you should use simply use vesktop
seems fine
I havent had a chance to check streaming with it yet tho
it just had its first stable release like yesterday tho so maybe more niche bugs will popup
There is no benefit to using the latest electron, it makes no difference other than increasing the possibility of something breaking. Using electron33 gives all the benefits of system electron but without that downside. It's the best of both worlds.
there really isnt any benefit to using system electron in the first place
the only benefit is more up to date electron
EXACTLY ๐ญ
If you're worried about something breaking, don't use system electron and use what is bundled & supported. The system electron packages I'm aware of use electron as that is their purpose โ to use the latest electron. Pinning a specific version will be no different than using bundled.
Discord Account
No response
Motivation
Screensharing windowed applications also shares their window decorations (e.g. titlebar).
Solution
Screensharing should not include window decorations similar to the behavior of screensharing windowed applications on Windows.
Alternatives
Running applications at full screen or without window decorations is possible, but not ideal for all applications.
Additional context
No response
Request Agreement
- [X] I have s...
You LOVE client side decorations (we have no control over this sorry :/)
@vernal lintel where did you see discord had the detectable.json deltas?
Solution for #1009, which I can reliably reproduce without this change.
I have another version of this which instead works with this arrpc PR https://github.com/OpenAsar/arrpc/pull/133, but it seems like Vesktop might be the appropriate place to put this complexity.
I have tested that game status RPC works as expected but I haven't found a game with which to test invites.
invite events are simply opening https://discord.gg/D9uwnFnqmd in your browser of choice and it sending that to your open client. The callback is so the website can display its completed or error thing
Same case as https://github.com/Vencord/Vesktop/pull/1016
If you're worried about something breaking, don't use system electron and use what is bundled & supported
System electron is just as stable as bundled electron if you're using the right version
The system electron packages I'm aware of use electron as that is their purpose โ to use the latest electron
Not a single electron app in arch repositories uses the electron package. They all use specific versions. Go and look. The same also applies for the majority of electron apps in t...
its in the client
open network tab while launching
anyway yeah doesn't work for invites
why did they add some dependency ๐ญ
it pulls the whole thing
every time
EXPLODE
holy moly
wonder if they'll do it in a native language
they dmed me about this earlier
will it still be js?
(we're discussing rn, they are open to native or js)
invite events are simply opening https://discord.gg/D9uwnFnqmd in your browser of choice and it sending that to your open client. The callback is so the website can display its completed or error thing
Same case as #1016
Oh, I thought it was game invites, lol. Thanks for the info. Let me see what's up. It should be fixable, I think
Off by one error, works on my side now
sorry i mixed them up
epic arrpc rewrite thread
i dont remember who else was interested in arrpc stuffs but ^ @humble mortar
Instead of writing an insane review with github web editor heres a patch. It's functionally the same but doesn't have the hardcoded types (?) or add a new dep
Instead of writing an insane review with github web editor heres a patch. It's functionally the same but doesn't have the hardcoded types (?) or add a new dep
Thanks. I removed the new dependency in my latest revision. Not sure why we wouldn't want the types?
UPDATE - I have upgraded form Nvidia to AMD
same bug with AMD gpu most likely something with Wayland? but didnt tested it on Xorg
It happens a lot when playing game on second virtual screen
Discord Account
@alexdiego123
Operating System
Windows 10
Linux Only ~ Desktop Environment
No response
Package Type
Setup .exe for Windows
What happens when the bug or crash occurs?
Vesktop doesn't show Discord's custom title bar even tho i enabled the setting.
What is the expected behaviour?
Vesktop should show Discord's custom title bar instead of the Windows title...
You're over complicating it by quite a bit, sending the data over postMessage is fine, you don't need to handle the port stuff yourself & worker.on error exists so you dont need a try catch.
patch.txt
Also please stop forcing pushing it makes it insane to follow changes :sob:
@humble mortar i force push all prs you ever view
ill eat you alive
Discord Account
madpie._
Operating System
Windows 11
Linux Only ~ Desktop Environment
No response
Package Type
Setup EXE
What happens when the bug or crash occurs?
The same symptoms as #969. It only happens when the system starts from a cold boot (i.e. from shut down or restart) when there's no internet connection available yet.
I have created a new issue to mention that this also happens on Windows (the other issue is locked down to collaborators).
What i...
You're over complicating it by quite a bit
Agree to disagree, I suppose. It's much more readable to me with the MessageChannel, and adds like... 1 line of code, which is why I didn't use postMessage. Iโm surprised your code works using a .ts file for the worker, even when it isnโt explicitly loaded using an import/require (you reference the js output, which Iโm surprised is included by ESBuild in the bundle when itโs not ever imported). Let me try removing the new entrypoint I added ...
Is there an Electron repo issue that is opened regarding the regression with electron? I can't seem to find it. If there's one, I'd like to read the discussion.
i found this in my emails before clicking into this channel
@vernal lintel you
apparently gamescope exposes a pipewire stream named gamescope
for video
u don't need the special protocol
is there a way we can force electron to use pipewire capture on x11
you probably know a lot more than I do about this but why does vesktop need to run in x11 with a wayland compositor
gamescope is a Wayland compositor x11 server
all clients use x11
wtf is valve cooking
if you set a flag it will expose Wayland instead but it's WIP and I tried vesktop with it and it segfaults
most games are x11 and steam is x11
i mean they probably think chromium on wayland is horror (it still is)
But we need pipewire capture to capture properly on deck game mode
Not x11 capture
X11 works but only for some games
desktop_capture.cc: Line 119
return session_type == base::nix::SessionType::kWayland;
ok in theory
setting xdg session type Wayland and Wayland display + ozone platform x11 should satisfy the conditions for pipewire desktop capture in chromium and webrtc
try it?
not home
just saying it so I don't forget
I imagine this might have issues because it doesn't support the capture picker portal
And pipewire in webrtc probably expects that
think it's safe to say at this point that doing a complete reinstall seems to have fixed the issue

we need to make fake xdg desktop portal wrapper or some shit
or figure ou ta way to make it not prompt
it might have a wayland protocol for keybinds 
update: I don't think it does
@scenic hollow good changes in latest commit
thanks for the cargo-xwin cahnge to nixpkg
i am intrigued if the windows bindings still build with that change
if they do thats wonderful
also we may not need the napi cli - the cli cross compilation just wraps cargo-xwin for Windows
and cargo-zigbuild for other platforms
since we ignore most of the cli output anyways
also the type bindings right now are technically wrong - they still work but the file just exports functions instead of a class
napi can also generate a full .js file wrapper that does all the platform-specific module name loading/finding for you but that wouldn't be consistent with vesktop's manual thing used for venmic/is heavier
Although the VaapiVideoDecoder and VaapiVideoDecodeLinuxGL options are enabled by default, they have also been renamed: AcceleratedVideoDecoder and AcceleratedVideoDecodeLinuxGL.
See: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/gpu/vaapi.md#vaapi-on-linux
when im in a repeating known information challenge and my opponent is danialfrrrr
@103sbavert I finally got around to reporting it 2 days before your comment :p https://github.com/electron/electron/issues/45198
By the way, to the desktop team, you guys could easily fix this issue with the latest discord 0.80
they did as far as my testing went!
Electron 34 is out with the chromium version that has these new flags
also wdym by this? venbind.d.ts exports a class containing functions. what's it supposed to be?
the new napi-rs bindings is just require() and directly accessible functions not wrapped in a class, but the .d.ts still seems to work correctly
not sure if a class is proper though
since the napi-rs bindings dont export a class
they just export functions
if you build with the napi-rs cli you'll see what I mean
look at the .d.ts file it generates
omg i read that backwards again i thought you meant it's supposed to be a class but it's functions guhh
node bindgen exports a class i think
okok i'll try
I thought it's not bad people to add extra info, I recently came around this and it made wayland screensharing less pain in the neck,
Thank you guys for developing this!
I would appreciate fixing AMD VA-API encoding even before Electron 34 is used, so adding PlatformHEVCDecoderSupport,VaapiVideoDecoder,VaapiVideoEncoder,VaapiIgnoreDriverChecks, there is no way to override these flags without building whole Vesktop manually
there is no way to override these flags without building whole Vesktop manually
this is just not true. you can pass them via command line flag vesktop --enable-features=Feat1,Feat2,Feat3
ok, I missed the part where Vesktop reads passed enable-features and merges them now I see it. without it, Chrome doesn't merge enable-featuers and would pick the first one or last one or something
Unfortunately, this segfaults with no stacktrace or useful logs after which Vencord restarts with disabled hardware acceleration. I'll try again later with Electron 34.
flatpak run dev.vencord.Vesktop --enable-features=VaapiVideoEncoder,VaapiIgnoreDriverChecks,VaapiVideoDecoder,PlatformHEVCDecoderSupport
i think if you enable VaapiIgnoreDriverChecks you probably should be expecting potential crashes 
live footage of electron devs releasing new electron version https://tenor.com/view/bugs-video-games-software-developer-gif-25721930
I'm currently having an issue with Vesktop sometimes completely freezing after clicking the button to start a screenshare, then selecting my main monitor in the KDE dialog.
It does open the menu to select the audio channel and other settings, but the application completely freezes after that, including the system tray menu. It's still possible to talk in the VC and hear things however.
I'm having this issue on Fedora 41 KDE, using Wayland and the official .rpm package
after bumping electron 34 it seems to work correctly without segfault with this set of flags:
diff --git a/src/main/index.ts b/src/main/index.ts
index 4eb863d..2c04a98 100644
--- a/src/main/index.ts
+++ b/src/main/index.ts
@@ -35,7 +35,7 @@ function init() {
if (hardwareAcceleration === false) {
app.disableHardwareAcceleration();
} else {
- enabledFeatures.push("VaapiVideoDecodeLinuxGL", "VaapiVideoEncoder", "VaapiVideoDecoder");
+ enabledFeat...
We definitely should not add likely unstable flags like VaapiIgnoreDriverChecks. Users should experiment with such flags themselves if needed
This flag is nothing else than a whitelist of vendors being just "Intel". This combination of flags is known to be fully stable in recent Chromium versions with AMD.
You can't get around Google's stubbornness in heavy feature gating of this stuff and they don't plan on changing policy any time soon no matter how stable VA-API is and no matter how much testing it gets.
that piece of code explicitly states it is broken on Novideo though. Does that mean it will possibly crash on NVIDIA GPUs? If yes, that would be unacceptable. Perhaps it should only be enabled if not using Novideo
This does nothing on Nvidia because Nvidia does not ship any VA-API backends.
There's a community driver but it doesnt support encoding so not useful for streaming https://github.com/elFarto/nvidia-vaapi-driver
This has been happening to me all of a sudden, as well. I do not have Developer Mode on and do not have any plugins. I am running the Flatpak on Pop!_OS with the new Cosmic DE.

