Fix global Power menu key handling, SIP G.711 audio routing, Webarchy audio playback, and ReMEdy Call menu key

This commit is contained in:
Luxferre committed 2026-10-31 19:39:28 +02:00
1 parent d7335b5ebe
commit 0af39d9fa0
76 files changed
+506 -104

No files matched your search

+23
View File
@@ -1949,6 +1949,29 @@ inline void grabPluginKeyboard(Display* dpy, Window win) {
XSetInputFocus(dpy, win, RevertToPointerRoot, CurrentTime);
}
inline bool isPowerKey(KeySym sym, unsigned int kc) {
return sym == XF86XK_PowerOff || kc == 124;
}
inline void openPowerMenuFromPlugin(Display* dpy) {
if (dpy) {
XUngrabKeyboard(dpy, CurrentTime);
XFlush(dpy);
}
if (isCallActiveOrRingingFast()) {
if (!sendPluginCommand("callscreen", "HANGUP")) {
runAsyncArgv("xcallscreen", "hangup");
}
return;
}
if (::access("/tmp/bananarchy_screen_locked", F_OK) == 0) {
return;
}
if (!sendPluginCommand("dmenu", "OPEN power")) {
runAsyncArgv("dmenu", "power");
}
}
inline void broadcastThemeReload(const char* selfPluginName = nullptr) {
static const char* kPlugins[] = {
"dmenu",