to safely use wl_container_of with a class the class has to be no
virtual functions, no inheritance, and uniform access control (e.g all
public)
work around this by putting this into a destroywrapper struct.
* Only generate notification on fail
Hyprpm fail/pass notification are mutually exclusive.
* Add option to notify on fail and keep original notify (#1)
* Add option to notify on fail and keep original notify
---------
Co-authored-by: KAGEYAM4 <75798544+KAGEYAM4@users.noreply.github.com>
---------
Co-authored-by: littleblack111 <littleblack11111@gmail.com>
* add snapping to floating windows
Works for both moving and resizing of windows.
It comes with 3 options:
`general:snap:enabled` - whether it's enabled, off by default
`general:snap:window_gap` - minimum gap in pixels between windows before
snapping. Setting to 0 effectively turns off this method of snapping.
`general:snap:monitor_gap` - minimum gap in pixels between window and
monitor edges before snapping. Again, setting it to 0 effectively turns
it off.
* snap: add more ignore criteria and change if clause into a guard
* snap: refactor code
* snap: new refactoring approach and account for border size
* snap: do corner snapping after all edge snapping is done
The approach of performing corner snaps after each individual edge snap
results in far fewer scenarios where snapping can occur.
After trying it out for a while, I found that I prefer an approach
that's more prone to snapping.
* snap: combine snapWindows and snapMonitor into a single function
* snap: add forced aspect ratio functionality
* snap: avoid directly referring to border_size config value
* snap: address vaxerski feedback
- add new line between functions
- use std::function typedef for SnapFn and make snap functions static
- avoid uninitialized variable declarations.
- change ignore condition m_bIsX11 to isX11OverrideRedirect()
- use braces for CBox and Vector2D declarations.
- add SNAP_INVALID to eSnapEdge enum
- use bitshift notation for eSnapEdge and eRectCorner
- make performSnap a non-member function.
* snap: add corner-snapping to forced aspect ratio mode
* layout: enable group rules for new floating windows
* fix comment
* do not apply group rules to a new floating window if it shouldBeFloated.
fixes child windows
* comment