Commit graph

28 commits

Author SHA1 Message Date
ItsDrike c38652c26f
Make sure the new group window has group bar
The previous commit (120a9c33d1) reworked
the behavior for inserting windows into groups, however in this rework,
the code for adding a group bar window decoration was also removed,
assuming that the CWindow::insertWindowToGroup would do that
automatically. Apparently this is not the case, and we still need to do
it manually.

This therefore just brings the code for adding the group bar back,
fixing this issue.
2023-07-23 14:21:37 +02:00
ItsDrike 120a9c33d1
Don't focus a window when inserting to group
The changes the behavior of groupCreate function when adding each of the
dwindle child node windows into a group, to no longer also focus them,
only to later refocus back on the original group's head/visible window.

This was impossible before, as the CWindow::insertWindowToGroup function
automatically made the inserted window the group's head/current window,
however since that's no longer the case - see the previous commit:
c1c883a237 it is now possible to remove
this janky behavior for a much cleaner one, where the window is simply
moved into a group and marked as hidden immediately.
2023-07-22 23:11:07 +02:00
ItsDrike c1c883a237
Replicate the new moveIntoGroup behavior
Hyprland has updated some of the core functions related to groupping
windows in PR: https://github.com/hyprwm/Hyprland/pull/2630

Specifically, the CWindow::insertWindowIntoGroup was updated to no
longer automatically make the newly inserted window the group's head,
allowing to insert windows without the group auto-focusing them.

With that, the CKeybindManager::moveIntoGroup (dispatcher) function was
then updated to adhere to the change in insertWindowIntoGroup and to
make the inserted widow the group's head from there.

It's probably possible to utilize the insertWindowIntoGroup without
making the inserted window the group's head in a more clever way,
however for now, this commit just changes our logic in groupCreate
function to fully replicate the moveIntoGroup for each dwindle child
node window.

This means we're still doing what we were doing before, that is to
insert a window, make it the group head, repeat for each dwindle child
and at the end make the original group head the head again.

The reason this fix doesn't simply skip making each of the nodes a group
head is that without it, the layout doesn't seem to properly recognize
that the window should no longer be shown, and while this probably can
be addressed by replicating some of the CWindow::setGroupCurrent
function's behavior, for now, that's a task for later.
2023-07-22 22:34:11 +02:00
ItsDrike 6bc69d03d6
Define WLR_USE_UNSTABLE in Makefile, not directly in main.cpp 2023-06-07 00:32:58 +02:00
ItsDrike 0759df0727
Update installation instructions after move to pkg-config
In 6218a99a3a the Makefile was updated to
use the new `pkg-config` method for including Hyprland soucres, however
this commit didn't update the README instructions, which did change a
bit.

The most notable change is that exporting `HYPRLAND_HEADERS` is no
longer necessary, and the updated required Hyprland commit for the
plugin.

This commit also updates the hyprload instructions.
2023-06-07 00:14:36 +02:00
ItsDrike 171f9dd094
Add comment explaining .PHONY 2023-06-07 00:03:08 +02:00
ItsDrike 575c35c00e
Update top comment 2023-06-07 00:02:44 +02:00
ItsDrike e727aed197
Add INSTALL_LOCATION variable 2023-06-07 00:00:04 +02:00
ItsDrike e35c1a136d
Add COMPILE_FLAGS variable, avoiding repetition in clangd 2023-06-06 23:56:01 +02:00
ItsDrike 6218a99a3a
Move to pkg-config
Hyprland has recently changed the way plugins recognize the hyprland
headers, moving from directly including the paths with -I option to
automatically generating the cflags with `pkg-config --cflags hyprland`.

This change means that compilation attempts using the direct include
option will start to fail with newer versions of hyprland, which now
uses /usr/local/include for it's headers after `make pluginenv`.

This commit migrates the original system to respect this change,
modifying Makefile, and with it, the include paths for hyprland headers,
which are now prefixed with hyprland/.
2023-06-06 23:48:28 +02:00
ItsDrike a826dfbebc
Fix formatting 2023-04-04 00:15:37 +02:00
ItsDrike c62024d74d
Rename addChildNodesToDequeRecursive -> collectChildNodes 2023-04-04 00:15:26 +02:00
ItsDrike 93d3948bfb
Remove unnecessary parents deque from addChildNodesToDequeRecursive 2023-04-04 00:14:44 +02:00
ItsDrike 16f67af969
Only refocus original win after childs were added 2023-04-04 00:12:41 +02:00
ItsDrike bea3f75c19
Restructure the project, making groupCreate and groupDissolve funcs 2023-04-04 00:11:20 +02:00
ItsDrike 6afe3cb756
Include wlroots subproject from hyprland sources during compilation 2023-04-03 17:27:02 +02:00
ItsDrike a9eedb1d72
Add missing return statements on ignores 2023-04-03 17:23:08 +02:00
ItsDrike 9e665e359c
Find correct function based on demangled signature 2023-04-01 00:16:08 +02:00
ItsDrike 312eeaeb34
Fix using wrong getNodeFromWindow function with findFunctionsByName 2023-03-31 23:57:34 +02:00
ItsDrike 5c56bd64ed
Mention minimum hyprland version requirement 2023-03-31 23:10:58 +02:00
ItsDrike 477097523e
Reference the PR that removed autogroupping 2023-03-31 23:05:11 +02:00
ItsDrike 03e6e33a98
Add license 2023-03-31 22:56:49 +02:00
ItsDrike 6caef995d1
Move to using findFunctionsByName instead of compiler dependant getFunctionAddressFromSignature 2023-03-31 22:44:33 +02:00
ItsDrike 7eca164413
Add initial support for children groupping 2023-03-31 22:32:25 +02:00
ItsDrike 2788905750
Add custom wrapper overriding togglegroup dispatcher 2023-03-31 21:32:28 +02:00
ItsDrike 1ae38874f2
Update clang-format 2023-03-31 15:48:55 +02:00
ItsDrike 6f367d865e
Remove unnecessary template code 2023-03-31 14:57:46 +02:00
ItsDrike 2d883200bc
Initial commit 2023-03-31 14:56:32 +02:00