1
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2025-07-25 09:11:54 -07:00
Commit Graph

605 Commits

Author SHA1 Message Date
Vaxry
016da234d0 Core: Move to aquamarine ()
Moves Hyprland from wlroots to aquamarine for the backend.

---------

Signed-off-by: Vaxry <vaxry@vaxry.net>
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
Co-authored-by: vaxerski <vaxerski@users.noreply.github.com>
Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com>
Co-authored-by: Tom Englund <tomenglund26@gmail.com>
Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com>
Co-authored-by: diniamo <diniamo53@gmail.com>
2024-07-21 13:09:54 +02:00
MightyPlaza
a443902abc core: Improve handling of window properties ()
* add mWindowProperties

modified:   src/debug/HyprCtl.cpp
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp
modified:   src/events/Windows.cpp

* support int values
modified:   src/debug/HyprCtl.cpp
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp

* create m_sWindowData

modified:   src/Compositor.cpp
modified:   src/debug/HyprCtl.cpp
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp
modified:   src/events/Windows.cpp
modified:   src/layout/DwindleLayout.cpp
modified:   src/layout/IHyprLayout.cpp
modified:   src/layout/MasterLayout.cpp
modified:   src/managers/AnimationManager.cpp
modified:   src/managers/KeybindManager.cpp
modified:   src/managers/XWaylandManager.cpp
modified:   src/render/OpenGL.cpp
modified:   src/render/Renderer.cpp
modified:   src/render/decorations/CHyprBorderDecoration.cpp
modified:   src/render/decorations/CHyprDropShadowDecoration.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

* simplify some properties
modified:   src/Compositor.cpp
modified:   src/debug/HyprCtl.cpp
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp
modified:   src/managers/KeybindManager.cpp

* store multiple values in CWindowOverridableVar
modified:   src/Compositor.cpp
modified:   src/debug/HyprCtl.cpp
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp
modified:   src/events/Windows.cpp
modified:   src/layout/IHyprLayout.cpp
modified:   src/managers/AnimationManager.cpp
modified:   src/managers/KeybindManager.cpp
modified:   src/managers/XWaylandManager.cpp
modified:   src/render/OpenGL.cpp
modified:   src/render/Renderer.cpp
modified:   src/render/decorations/CHyprBorderDecoration.cpp
modified:   src/render/decorations/CHyprDropShadowDecoration.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

* clean up
modified:   src/Compositor.cpp
modified:   src/Compositor.hpp
modified:   src/config/ConfigManager.cpp
modified:   src/config/ConfigManager.hpp
modified:   src/debug/HyprCtl.cpp
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp
modified:   src/events/Windows.cpp
modified:   src/layout/DwindleLayout.cpp
modified:   src/layout/IHyprLayout.cpp
modified:   src/layout/IHyprLayout.hpp
modified:   src/layout/MasterLayout.cpp
modified:   src/managers/KeybindManager.cpp

* use SET_PROP priority for exec rules
modified:   src/config/ConfigManager.hpp
modified:   src/desktop/Window.cpp

* add default value
modified:   src/Compositor.cpp
modified:   src/debug/HyprCtl.cpp
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp
modified:   src/events/Windows.cpp
modified:   src/layout/IHyprLayout.cpp
modified:   src/managers/KeybindManager.cpp
modified:   src/managers/XWaylandManager.cpp
modified:   src/render/OpenGL.cpp
modified:   src/render/Renderer.cpp
modified:   src/render/decorations/CHyprBorderDecoration.cpp
modified:   src/render/decorations/CHyprDropShadowDecoration.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

* add setprop toggle
modified:   src/config/ConfigManager.hpp
modified:   src/debug/HyprCtl.cpp
modified:   src/desktop/Window.cpp

* add setprop toggle
modified:   src/debug/HyprCtl.cpp

* make window rules functional
modified:   src/config/ConfigManager.cpp
modified:   src/desktop/Window.cpp

* minor fixes
modified:   src/Compositor.cpp
modified:   src/debug/HyprCtl.cpp
modified:   src/desktop/Window.hpp

* properly clean layout data
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp
modified:   src/events/Windows.cpp
modified:   src/layout/DwindleLayout.cpp
modified:   src/layout/IHyprLayout.cpp
modified:   src/layout/IHyprLayout.hpp
modified:   src/layout/MasterLayout.cpp

* remove newline
modified:   src/events/Windows.cpp

* fixes
modified:   src/config/ConfigManager.hpp
modified:   src/debug/HyprCtl.cpp
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp

* use CamelCase
modified:   src/Compositor.cpp
modified:   src/debug/HyprCtl.cpp
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp
modified:   src/events/Windows.cpp
modified:   src/layout/IHyprLayout.cpp
modified:   src/managers/AnimationManager.cpp
modified:   src/managers/KeybindManager.cpp
modified:   src/managers/XWaylandManager.cpp
modified:   src/render/OpenGL.cpp
modified:   src/render/Renderer.cpp
modified:   src/render/decorations/CHyprBorderDecoration.cpp
modified:   src/render/decorations/CHyprDropShadowDecoration.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
2024-07-11 16:10:42 +02:00
MightyPlaza
0502c3f62b keybinds: fix movewindow float to 0 ()
modified:   src/managers/KeybindManager.cpp
2024-07-05 22:46:38 +02:00
はれなよ
1f43a5c859 session: fix activate events being always treated as on ()
* Fix listener_sessionActive to handle an event correctly when the session get inactivated

* Remove log
2024-06-29 20:04:48 +02:00
Alexander
f2dc48d92f keybinds: never switch to another monitor with per_monitor ()
Co-authored-by: Крылов Александр <aleksandr.krylov@hyperus.team>
2024-06-27 15:07:56 +02:00
Gregory
784c0b5ccb keybinds: fix mouse pass ()
* keybinds: fix mouse pass

* keybinds: keep mouse and keyboard focus separate after pass bind
2024-06-25 13:46:49 +02:00
outfoxxed
eef207ce0a output: fix cursors disappearing after dpms () 2024-06-25 12:55:54 +02:00
Alexander
7f09646ab8 core: add ability to select previous workspace per monitor ()
Co-authored-by: Крылов Александр <aleksandr.krylov@hyperus.team>
2024-06-22 23:52:42 +02:00
Przegryw321
d6de248b0d window: expose pseudotiled state and add param to dispatcher ()
* Show pseudotiled state of window in hyprctl clients

* Add a window as an optional argument for the pseudo dispatcher

* change formatting
2024-06-19 23:19:18 +02:00
Vaxry
c1e21719a2 core: avoid bumping hard rlimits, restore on fork
ref 
2024-06-19 18:36:40 +02:00
Vaxry
d1340bd1d8 keybinds: ignore missing keysyms if no other methods match
fixes 
2024-06-17 17:53:51 +02:00
memchr
43c75f17eb input: add cursor:warp_on_changeworkspace ()
* input: add cursor:warp_on_changeworkspace

If enabled, warp the cursor to the last focused window on the workspace in the `changeworkspace' dispatcher, except if the cursor is currently on the WLR top layer.

Respect persistent warps.

* warp_on_change_workspace: check if focused layer is a window.
2024-06-16 16:42:32 +02:00
Vaxry
32aca88752 keybinds: add custom event dispatcher
fixes 
2024-06-15 16:20:00 +02:00
Vaxry
8c64a4bad7 core: move to hyprutils for utils ()
* core: move to hyprutils for utils

Nix: add hyprutils dep

* Meson: add hyprutils dep

* flake.lock: update

---------

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
2024-06-11 17:17:45 +02:00
Vaxry
6967a31450 wayland/core: move to new impl ()
* wayland/core/dmabuf: move to new impl

it's the final countdown
2024-06-08 10:07:59 +02:00
memchr
41e1147dfc input: add cursor:persistent_warps to maintain relative position within a window ()
Allows the cursor to return to its last relative position within a window when the window is refocused.

Allows the cursor to retain its relative position within a window when the window is swapped, moved, changed workspace, added to or removed from groups.

controlled with cursor:persistent_warps
2024-06-07 19:52:15 +02:00
memchr
fefa55d406 build: fix non-pch build () 2024-06-05 10:42:44 +02:00
giskard
ebf258788e config: add tag dispacther and window rule () 2024-05-28 23:37:24 +02:00
Can
ce17961aad keybinds: Added new dispatcher (sendshortcut) () 2024-05-24 20:58:26 +02:00
shezdy
25b9446949 internal: save previous workspace before change () 2024-05-23 13:01:12 +02:00
shezdy
155ae3721c keybinds: Add option to disable window direction monitor fallback ()
* add monitor fallback option

* format
2024-05-22 21:51:46 +02:00
Gabriel Ford
d693c44836 keybinds: add keybind combos and add Left and Right mod distinction. () 2024-05-16 11:48:30 +01:00
Vaxry
121d3a7213 wl_seat: move to hyprland impl 2024-05-14 23:02:24 +01:00
Vaxry
fd35b35000 keybinds: fix pass
reverts 

fixes 
2024-05-12 16:01:01 +01:00
Brenno Lemos
33a7b7bb6b core: fix on-empty workspace being called too often () 2024-05-12 00:03:32 +01:00
shezdy
15072831cf keybinds: fix release binds in submaps () 2024-05-12 00:02:26 +01:00
Vaxry
3374229118 core: remove unused includes and fix warn 2024-05-10 03:20:26 +01:00
sub-kek
7cf810b181 keybinds: Fix classic global keybinds(pass dispatcher) () 2024-05-09 22:05:13 +01:00
Vaxry
ed411f53bd cursor: move to a hyprland impl
This moves wlr_cursor to a completely new impl mostly under
CPointerManager

Also adds beginSimple to OpenGL for simple render passes (e.g. cursor)
2024-05-09 13:37:39 +01:00
VPavliashvili
375e77e398 ipc: add togglegroup, moveintogroup and moveoutofgroup events () 2024-05-07 12:00:55 +01:00
Ikalco
57e76f91d9 keybinds: fix xkb keybind name to keysym comparison () 2024-05-07 07:20:06 +01:00
Ikalco
cddeec47a1 keybinds: make the keybind manager check for session lock () 2024-05-05 19:28:14 +01:00
Vaxry
1ed1ce9506 internal: new shared_ptr and weak_ptr implementation ()
moves std::shared_ptrs to a new implementation

Advantages:
- you can dereference a weak_ptr directly. This will obviously segfault on a nullptr deref if it's expired.
   - this is useful to avoid the .lock() hell where we are 100% sure the pointer _should_ be valid. (and if it isn't, it should throw.)
- weak_ptrs are still valid while the SP is being destroyed.
   - reasoning: while an object (e.g. CWindow) is being destroyed, its `weak_ptr self` should be accessible (the sp is still alive, and so is CWindow), but it's not because by stl it's already expired (to prevent resurrection)
   - this impl solves it differently. w_p is expired, but can still be dereferenced and used. Creating `s_p`s is not possible anymore, though.
   - this is useful in destructors and callbacks.
2024-05-05 17:16:00 +01:00
Vaxry
1237732b97 input: Introduce basic hyprland HID classes
Implements an intermediary HID class for mice, keyboards and touch devices, removing the old structs from WLClasses.hpp

Yes, virtual ones are duplicated a bit, but will likely be de-duped once wlr_input_device is not used anymore.
2024-05-03 22:40:27 +01:00
Tom Englund
1c73beaf9b inputmgr: dont double free on hotplug ()
* inputmgr: dont double free on hotplug

since we are also unrefing the state on hotplugging the keyboard set the
state to nullptr so the destructor if case actually catches its been
already freed.

* keybindgmgr: dont double free on layout switching

d5bf153 added keymap unref at the end of updateXKBTranslationState to
not leak it when exiting, only it causes updateXKBTranslationState to
double free when changing layouts. since its already freed. remove the
unneeded extra xkb_keymap_unref.
2024-05-03 18:10:41 +01:00
Tom Englund
d5bf15387a internal: fix a few asan reported leaks on exit of hyprland ()
* notifications: free cairo images on destruction

asan reports a leak on exit if we dont free the image we created in the
draw function. add a destructor and free images on exit.

* compositor: destroy wlroots types on exit

there are a few types not being destroyed on exit and causing a leak on
exit in wlroots reported by asan, add those.

* cursormgr: ensure we destroy cursor mgr on exit

add a destructor and call wlr_xcursor_manager_destroy on the manager on
destruction, leak reported by asan.

* keybindmgr: free state and keymap

add missing keymap_unref on creation, and add a destructor and free the
state on exit. leak reported by asan.

* skeyboard: add destructor and free state

free the state on destruction of keyboard, reported as leak by asan
2024-05-03 14:42:08 +01:00
Vaxry
8bcccf9f0f ime-v2: move to new impl 2024-05-01 16:41:17 +01:00
Vaxry
1f6657f037 keybinds: check for special workspace equality before switching
fixes 
2024-04-30 16:42:31 +01:00
Vaxry
33e0bb1478 wlr-output-power: move to new impl 2024-04-29 01:38:24 +01:00
Vaxry
bca7804bb6 internal: Window storage rework - part 1 ()
* Window storage rework - part 1

* format

* remove useless include

* fix pch

* format

* fix crash in dwindle

* fix vram leak

* prefer .expired() for bool checks
2024-04-27 12:43:12 +01:00
Vaxry
01df3b73d8 shortcuts-inhibitor: move to new impl 2024-04-25 14:32:35 +01:00
Vaxry
608eff600d tokens: add more modes to initial_workspace_tracking
1 is single-shot, 2 is persistent

fixes 
2024-04-24 16:16:52 +01:00
Vaxry
34413d1f36 tokens: fix initial workspace token ignoring special
ref 
2024-04-24 02:06:13 +01:00
Vaxry
29308b94ca windows: add misc:initial_workspace_tracking
By default enabled, will track the initial opened workspace of a window spawned for 2 minutes or until it's moved to a different workspace.

For example: you run a launcher and open an app on workspace 1, but quickly switch to workspace 2. The app will now open on workspace 1 regardless of your switch.
2024-04-23 01:49:23 +01:00
Vaxry
4dc07c4378 keybinds: clear repeat source on mouse inputs
fixes 
2024-04-21 12:50:37 +01:00
Vaxry
4ad739ec63 HookSystem: improve callback safety 2024-04-20 20:16:42 +01:00
Sungyoon Cho
dd39cd7e42 windows: recalculate monitor after updating windows ()
Recalculate monitor after updating windows, so layout render doesn't get
overridden.
2024-04-19 18:46:16 +01:00
Maarten de Vries
e57a2d7ec8 keybindmgr: add optional silent suffix to movewindow. ()
With the `silent` suffix, the focus remains on the current position in
the layout or the current monitor, instead of following the moved
window. When combined with `movewindow mon:X`, this this allows you to
get the same behavior as xmonad's `windowToScreen` command.
2024-04-17 12:04:16 +01:00
go0d1uck
83ab0f2d66 keybindmgr: fix workspace_back_and_forth () 2024-04-14 14:54:00 +01:00
Sungyoon Cho
c35fa9bacc workspace: update windows when selector match could change ()
* workspace: update windows when group updates

* workspace: update windows when floating toggle

* workspace: update windows when stop dragging window by mouse
2024-04-10 17:26:11 +01:00