fix(hyprlua,hyprdrive): float/center the xdg-desktop-portal-hyprland share picker
Discord's screen-share source picker wasn't matching the modal-dialog
windowrules and tiled instead of floating. It's the Qt "hyprland-share-picker"
binary, which sets its app_id/class via
QCoreApplication::setApplicationName("org.hyprland.xdg-desktop-portal-hyprland")
— neither the GTK portal-dialog rule (different class) nor the title-based
dialog-float rule (title doesn't match) catches it. Added a dedicated rule
matching that class with the same float+center-on-monitor treatment.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
main
parent
9cd8eb2065
commit
b92a43c8ea
|
|
@ -103,6 +103,19 @@ hl.window_rule({
|
||||||
move = "(monitor_w/2 - window_w/2) (monitor_h/2 - window_h/2)",
|
move = "(monitor_w/2 - window_w/2) (monitor_h/2 - window_h/2)",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- screen-share source picker (xdg-desktop-portal-hyprland) — same treatment as
|
||||||
|
-- the GTK portal dialog above. This is the Qt "hyprland-share-picker" binary
|
||||||
|
-- that pops up asking which output/window to share (e.g. from Discord); it
|
||||||
|
-- calls QCoreApplication::setApplicationName("org.hyprland.xdg-desktop-portal-hyprland"),
|
||||||
|
-- which becomes its Wayland app_id/class. It's a parentless top-level like the
|
||||||
|
-- GTK portal dialog, so it needs the same explicit float+center rule.
|
||||||
|
hl.window_rule({
|
||||||
|
name = "hyprland-share-picker",
|
||||||
|
match = { class = "org.hyprland.xdg-desktop-portal-hyprland" },
|
||||||
|
float = true,
|
||||||
|
move = "(monitor_w/2 - window_w/2) (monitor_h/2 - window_h/2)",
|
||||||
|
})
|
||||||
|
|
||||||
-- dialogs — float any dialog-like window at its natural (minimum) size, centred on
|
-- dialogs — float any dialog-like window at its natural (minimum) size, centred on
|
||||||
-- the cursor: renaming dialogs, generic Save/Open/Confirm/Delete/Move/Copy/Replace/
|
-- the cursor: renaming dialogs, generic Save/Open/Confirm/Delete/Move/Copy/Replace/
|
||||||
-- Properties/Preferences dialogs, and Firefox "Opening <file>" download prompts.
|
-- Properties/Preferences dialogs, and Firefox "Opening <file>" download prompts.
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,19 @@ hl.window_rule({
|
||||||
move = "(monitor_w/2 - window_w/2) (monitor_h/2 - window_h/2)",
|
move = "(monitor_w/2 - window_w/2) (monitor_h/2 - window_h/2)",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- screen-share source picker (xdg-desktop-portal-hyprland) — same treatment as
|
||||||
|
-- the GTK portal dialog above. This is the Qt "hyprland-share-picker" binary
|
||||||
|
-- that pops up asking which output/window to share (e.g. from Discord); it
|
||||||
|
-- calls QCoreApplication::setApplicationName("org.hyprland.xdg-desktop-portal-hyprland"),
|
||||||
|
-- which becomes its Wayland app_id/class. It's a parentless top-level like the
|
||||||
|
-- GTK portal dialog, so it needs the same explicit float+center rule.
|
||||||
|
hl.window_rule({
|
||||||
|
name = "hyprland-share-picker",
|
||||||
|
match = { class = "org.hyprland.xdg-desktop-portal-hyprland" },
|
||||||
|
float = true,
|
||||||
|
move = "(monitor_w/2 - window_w/2) (monitor_h/2 - window_h/2)",
|
||||||
|
})
|
||||||
|
|
||||||
-- dialogs — float any dialog-like window at its natural (minimum) size, centred on
|
-- dialogs — float any dialog-like window at its natural (minimum) size, centred on
|
||||||
-- the cursor: renaming dialogs, generic Save/Open/Confirm/Delete/Move/Copy/Replace/
|
-- the cursor: renaming dialogs, generic Save/Open/Confirm/Delete/Move/Copy/Replace/
|
||||||
-- Properties/Preferences dialogs, and Firefox "Opening <file>" download prompts.
|
-- Properties/Preferences dialogs, and Firefox "Opening <file>" download prompts.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue