WillPower3309 / swayfx

SwayFX: Sway, but with eye candy!
MIT License
1.29k stars 48 forks source link

Extend minimize logic to work with XWayland and XDG applications #132

Closed ErikReider closed 1 year ago

ErikReider commented 1 year ago

Fixes minimize button not working on applications like GTK apps and Riot launcher not minimizing.

This also improves the initial logic and sets the toplevel minimize state when thrown into scratchpad. I'm not sure if this is desired or not but it seems logical to me to treat the scratchpad as minimize :)

This fixes being able to screenshare scratchpad XWayland windows through Discord or any other software

WillPower3309 commented 1 year ago

This was on my to-do list, thanks for getting to it. Definitely should be the default upstream, but great work here

WillPower3309 commented 1 year ago

Noticing the draft status, what's left to do here? Or would you like it to be more thoroughly tested prior to merge?

ErikReider commented 1 year ago

Noticing the draft status, what's left to do here? Or would you like it to be more thoroughly tested prior to merge?

Yeah, more testing and maybe adding a config option to enable the minimization for the people who don't use the scratchpad that are confused by where their windows went

ErikReider commented 1 year ago

Should be ready, I'll wait with merging in case you have anything else to comment on :)

ErikReider commented 1 year ago

Is this good enough for you Will?

WillPower3309 commented 1 year ago

Yes, I would like to request we change the config option from yes|no to enable|disable though. This would match the format for boolean config options in upstream sway. (I know that we currently have some options set with yes / no, but I plan on switching those over soon, with a swaynag warning to update the config for those using yes / no)

ErikReider commented 1 year ago

Yes, I would like to request we change the config option from yes|no to enable|disable though. This would match the format for boolean config options in upstream sway. (I know that we currently have some options set with yes / no, but I plan on switching those over soon, with a swaynag warning to update the config for those using yes / no)

the parse_boolean function that I'm already using does also handle enable/disable. I'll update the default to enable. Let me know if you only want to be able to parse those two options :)