Skip to content

Conversation

@Rohitd3v
Copy link
Contributor

@Rohitd3v Rohitd3v commented Sep 5, 2025

Summary

This PR fixes an issue where file chooser dialogs (Open, Save, Upload) were spawning partially off-screen in Hyprland.
The root cause was case-sensitive mismatches with Xdg-desktop-portal-gtk and missing explicit window rules.

Changes

  • Added windowrulev2 rules to ensure:
    • File chooser dialogs float
    • Open centered on screen
    • Use consistent 70% sizing relative to monitor

Testing

  • Verified in Hyprland on Arch Linux
  • Tested with Brave, Firefox, and system upload/save dialogs
  • All dialogs now correctly center instead of opening off-screen

Changelog

Fixed

  • File chooser dialogs in Hyprland now open centered and floating instead of off-screen

Copy link
Contributor

@kRHYME7 kRHYME7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

~/.local/share/hypr/windowrules.conf

@kRHYME7 kRHYME7 requested review from amit-0i and removed request for zeerayne September 10, 2025 15:48
@Rohitd3v Rohitd3v requested a review from kRHYME7 September 10, 2025 16:06
@zeerayne
Copy link
Contributor

Also, some thougts about windowrules:

Maybe do it with tags (less lines == better):

windowrule = float,tag:portal-dialogs
windowrule = center,tag:portal-dialogs

windowrule = tag +portal-dialogs,class:^(org.freedesktop.impl.portal.desktop.hyprland)$
windowrule = tag +portal-dialogs,class:^(org.freedesktop.impl.portal.desktop.gtk)$
windowrule = tag +portal-dialogs,class:^([Xx]dg-desktop-portal-gtk)$

p.s. as far as I remember windowrulev2 is depreated and windowrule should be used instead

@kRHYME7
Copy link
Contributor

kRHYME7 commented Sep 11, 2025

Also, some thougts about windowrules:

Maybe do it with tags (less lines == better):

windowrule = float,tag:portal-dialogs
windowrule = center,tag:portal-dialogs

windowrule = tag +portal-dialogs,class:^(org.freedesktop.impl.portal.desktop.hyprland)$
windowrule = tag +portal-dialogs,class:^(org.freedesktop.impl.portal.desktop.gtk)$
windowrule = tag +portal-dialogs,class:^([Xx]dg-desktop-portal-gtk)$

p.s. as far as I remember windowrulev2 is depreated and windowrule should be used instead

@Rohit8BitCoder can we have this in this PR too?

@Rohitd3v
Copy link
Contributor Author

Ok

CONTRIBUTORS.md Outdated
- [@amit-0i](https://github.com/amit-0i)
- [@Prof-Shiba](https://github.com/Prof-Shiba)
- [@UnaTried](https://github.com/UnaTried)
<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some badly resolved conflic here

CONTRIBUTORS.md Outdated
- [@rubiin](https://github.com/rubiin)
- [@Metalhearf](https://github.com/Metalhearf)
- [@prime-run](https://github.com/prime-run)
- [@prime-run](https://github.com/prime-run3.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like 3. shouldn't be here

CONTRIBUTORS.md Outdated

- [@Vu4ll](https://github.com/Vu4ll)

>>>>>>> 13abe65a (docs: add Rohit8BitCoder as Tester)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also some conflict artifacts here


windowrulev2 = float, class:^(org.freedesktop.impl.portal.desktop.gtk)$
windowrulev2 = center, class:^(org.freedesktop.impl.portal.desktop.gtk)$
#windowrulev2 = size 70% 70%, class:^(org.freedesktop.impl.portal.desktop.gtk)$
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

size rule is commented out - is it expected?

CHANGELOG.md Outdated
- UWSM: Clean up the xdg freedesktop.org spec as uwsm handles it
- Wallpaper: fix #1136 as exporting arrays are not supported in bash
- Lockscreen: Fix zombie hyprlock
- File chooser dialogs in Hyprland now open centered and floating instead of off-screen
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this should be moved above bc v25.8.3 released already

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suppose this line should be pushed up from line 41 to line 23:

+ [23] - File chooser dialogs in Hyprland now open centered and floating instead of off-screen
- [41] - File chooser dialogs in Hyprland now open centered and floating instead of off-screen

@kRHYME7 kRHYME7 changed the base branch from dev to rc September 13, 2025 16:00
Copy link
Contributor

@kRHYME7 kRHYME7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank You For Bearing With Us!

@kRHYME7 kRHYME7 merged commit a4378fc into HyDE-Project:rc Sep 13, 2025
4 checks passed
kRHYME7 added a commit that referenced this pull request Sep 19, 2025
This is an automated PR to promote changes from `rc` to `master`.
Please review and test before merging.

See [TESTING.md](./TESTING.md) for complete testing instructions.

According to our release policy, this PR is expected to be merged on:
**1st or 3rd Friday of the month**
Testers are encouraged to test the changes before merging.
Please note that this schedule may be adjusted based on the needs of the
project.

---
* fix: [Bug]: Can't kill waybar process Fixes #1284 (40c08c2) by
kRHYME7
* chore Fix: #1270 (15bfb26)
by kRHYME7
* fix: center and resize file chooser,save,download dialogs in Hyprland
(#1216) (a4378fc) by Khing
* fix: File chooser dialogs in Hyprland now open centered and floating
instead of off-screen (f2a139d) by kRHYME7
* chore Merge branch 'rc' into dev (da9a985) by Khing
* chore Merge branch 'dev' into dev (8f1546a) by Khing
* chore style: Update HyDE menu labels (#1269) (55d5e03) by Khing
* chore Merge branch 'rc' into change-hyde-menu-labels (ff56967) by
Khing
* chore style: Update HyDE menu labels (d98f627) by fug0
* chore log: release policy (e6a31d5) by kRHYME7
* chore Update RELEASE_POLICY.md to be more concise and less ambigious
(#1265) (4fb2e64) by Khing
* chore Merge branch 'dev' into patch-1 (3301543) by Khing
* chore Update RELEASE_POLICY.md (6f64d0e) by boulder-roller
* chore Merge branch 'rc' into dev (c9ebeae) by Khing
* chore Closes: #283 (6819527) by kRHYME7
* chore pr (f0ee521) by kRHYME7
* chore hyprlock (eb292be) by kRHYME7
* chore Discard changes to .all-contributorsrc (7283a26) by Rubin
Bhandari
* chore Release Candidate v25.9.3  (#1202) (b4ec613) by Khing
* chore Merge branch 'dev' into dev (f84b4da) by Rubin Bhandari
* chore Update schema and remove problematic defaults (918332a) by
kRHYME7
* chore Merge branch 'dev' into dev (cba20a8) by Khing
* chore Merge branch 'rc' into dev (a50ac9a) by Khing
* chore Merge branch 'master' into rc (ac32fac) by Khing
* fix: prepare hyprland next release (#1198) (9fb66d4) by Khing
* chore Merge branch 'dev' into hyprland_0.51 (ac9e253) by Khing
* fix gestures (bcd5f00) by kRHYME7
* chore Merge branch 'master' into rc (a495be6) by Khing
* chore Merge branch 'dev' into hyprland_0.51 (aed2584) by Rubin
Bhandari
* fix: Deprecated gesture config fix (#1259) (02f5b08) by Rubin
Bhandari
* chore Discard changes to README.md (d79bd92) by Rubin Bhandari
* chore Discard changes to .all-contributorsrc (dcb0e20) by Rubin
Bhandari
* chore Merge branch 'dev' into deprecated-gesture-config-fix (f248a34)
by Rubin Bhandari
* fix: Fix gesture configuration error (20ff836) by vaporised
* fix: using jetbrains ide do not cause window flickering anymore
(#1253) (b6377e7) by Rubin Bhandari
* chore Merge branch 'dev' into fix-jetbrains-flickering (f954a1d) by
Rubin Bhandari
* fix: using jetbrains ide do not cause window flickering anymore
(cf6c553) by Ilya Bogdanov
* fixes an issue as suggested by @kRHYME7 and @zeerayne (7c4c6e2) by
rohit singh negi
* fixes an issue as suggested by @kRHYME7 and @zeerayne (ad289c0) by
rohit singh negi
* chore Update CONTRIBUTORS.md (2a03497) by rohit singh negi
* chore Merge branch 'dev' into dev (182c771) by Khing
* chore Merge branch 'rc' into dev (804f066) by Khing
* chore Merge branch 'master' into rc (3bfd38c) by Khing
* chore Merge branch 'dev' into dev (90a31ac) by Khing
* chore Update CONTRIBUTORS.md (6f9635b) by rohit singh negi
* chore Merge branch 'rc' into dev (1ff23ed) by Khing
* chore Merge branch 'master' into rc (4e36403) by Khing
* chore chase: hyprland gestures (c7fdf5a) by kRHYME7
* chore Merge branch 'dev' into hyprland_0.51 (e97ef1e) by Khing
* chore migration to rofi (e2d85f0) by kRHYME7
* chore Merge branch 'dev' into hyprland_0.51 (5fcc727) by Khing
* feat: improve tesseract accuracy, add different languages support
(#1222) (c203e2a) by Khing
* docs: add changelog entry about OCR improvements (24a4c2f) by Ilya
Bogdanov
* chore ocr: back to imagemagick (5a23cae) by Ilya Bogdanov
* chore Merge branch 'master' into rc (cd6a2e0) by Khing
* chore Merge branch 'dev' into tesseract-charged (d1fce4f) by Khing
* chore pr (a03398c) by kRHYME7
* chore Merge branch 'dev' into dev (ee52a8a) by Khing
* chore updated windowrules.conf : fixed center and resize file
chooser,save,download dialogs in Hyprland (b4d7d8c) by rohit singh negi
* fix(hyprland): center and resize file chooser dialogs (as suggested)
(423ac80) by rohit singh negi
* fix: proreply process array in env var (a86fc5b) by Ilya Bogdanov
* docs: add Rohit8BitCoder as Tester (d216ee0) by rohit singh negi
* fix: add migration script for replacing rofi-wayland with rofi
(ae3cd89) by Rubin Bhandari
* fix: add migration script for replacing rofi-wayland with rofi
(a29c4ee) by Rubin Bhandari
* fix: replace rofi-wayland with rofi in migration script and
pkg_core.lst (a496cf7) by Rubin Bhandari
* fix: replace rofi-wayland with rofi in migration script and
pkg_core.lst (#1223) (b8e7f7a) by Rubin Bhandari
* chore ocr: reworked to use `graphicsmagick` instead of `imagemagick`
(48cd2b5) by Ilya Bogdanov
* fix: add migration script for replacing rofi-wayland with rofi
(f427535) by Rubin Bhandari
* fix: add migration script for replacing rofi-wayland with rofi
(d502576) by Rubin Bhandari
* chore Merge branch 'dev' into tesseract-charged (8494490) by Rubin
Bhandari
* chore Merge branch 'dev' into rofi (3e7ea0e) by Rubin Bhandari
* fix: replace rofi-wayland with rofi in migration script and
pkg_core.lst (e552078) by Rubin Bhandari
* feat: improve tesseract accuracy, add different languages support
(0213e33) by Ilya Bogdanov
* chore Merge branch 'dev' into dev (477be6c) by Rubin Bhandari
* chore Merge branch 'dev' into hyprland_0.51 (249894d) by Rubin
Bhandari
* docs: Add Turkish docs (#1194) (1b7e223) by Rubin Bhandari
* chore Update CONTRIBUTORS.md (3b6055e) by Rohit Singh Negi
* fix(hyprland): center and resize file chooser,save,download dialogs
(1354c1c) by rohit singh negi
* docs: add Rohit8BitCoder as Tester (508c6fe) by rohit singh negi
* chore Merge branch 'turkish-docs' of https://github.com/Vu4ll/HyDE
into turkish-docs (d39afb9) by Vu4ll
* docs: Update changelog for v25.9.1 with recent changes (8398df5) by
Vu4ll
* chore Merge branch 'dev' into turkish-docs (ab0b458) by Khing
* docs: Add Turkish documentation section to changelog (a3cb6cc) by
Vu4ll
* chore Merge branch 'turkish-docs' of https://github.com/Vu4ll/HyDE
into turkish-docs (caf5f4b) by Vu4ll
* docs: Update changelog to include Turkish documentation (a5cc692) by
Vu4ll
* chore Merge branch 'rc' into dev (b2fc389) by Khing
* docs: Correct misleading comment about ZSH plugin loader behavior
(#1201) (841953b) by Khing
* chore Merge branch 'docs/zsh-plugin-comment-correction' of
https://github.com/hexpreso/HyDE into docs/zsh-plugin-comment-correction
(8f93b4e) by hexpreso
* docs: Clarify ZSH plugin loader comment to accurately reflect behavior
(9e694af) by hexpreso
* chore Merge branch 'dev' into docs/zsh-plugin-comment-correction
(7184656) by Khing
* docs: Correct misleading comment about ZSH plugin loader behavior
(5e93f9a) by hexpreso
* chore Merge branch 'dev' into turkish-docs (696460d) by Khing
* chore prepare hyprland next release (f8e6804) by kRHYME7
* chore Merge branch 'dev' into turkish-docs (58fffc0) by Vu4ll
* docs: Remove duplicate design link from Turkish README (954a999) by
Vu4ll
* docs: Remove contributing section from Turkish README (9a25a4d) by
Vu4ll
* docs: Remove "Katkı Sağlamak" link from Turkish README (1043ed5) by
Vu4ll
* docs: Update Turkish README link paths for consistency (652109d) by
Vu4ll
---

Please review the changes carefully before merging.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants