Commit graph

573 commits

Author SHA1 Message Date
17339e0ae9 input: track exclusive LSes
ref #4465
2024-01-19 16:45:34 +01:00
5eeec8860e core: improve cleanup logic 2024-01-19 16:20:30 +01:00
virchau13
3c964a9fdc
keybinds: Add dispatcher for xmonad/qtile-style workspace switching (#4439)
* feat: implement xmonad/qtile-style workspace switching

Implements the focusWorkspaceOnCurrentMonitor dispatcher and function,
which implements XMonad/Qtile-style workspace switching.

When called, focusWorkspaceOnCurrentMonitor will:
1. Send the requested workspace to the current monitor,
2. If the workspace was previously active on a different monitor,
   replace it with the workspace that was previously active on the
   current monitor,
3. Focus the workspace on the current monitor.

* fix: address PR comments
2024-01-15 16:30:46 +01:00
Isaac Myhal
b6516bad02
config: Add border gradients to windowrulev2 (#4335)
* Add border gradients to windowrulev2

* windowrule border gradient: Use CVarList to parse

* windowrule border gradient: No {} around short ifs
2024-01-14 18:27:32 +01:00
Zach DeCook
c4da4b026d
layershell: Fix greedy mouse grab from keyboard_interactive layer (#4401)
* Layer: Don't allow a keyboard-layer to steal focus from other layers

* Input: Don't change keyboard focus on click if focus is locked
2024-01-12 15:43:16 +01:00
6b92144f15 surface: avoid spam of window surfaces with scale and transform events
fixes #4408
2024-01-11 14:07:28 +01:00
252aaaecfa input: add special_fallthrough
fixes #4323
2024-01-09 13:17:55 +01:00
7904188de9 input: allow focusSurface when locked if surfase is sessionLock 2024-01-07 14:04:32 +01:00
Epilepsy Gatherings
666ee61c13
input: leave special on focus (#4358) 2024-01-07 12:06:33 +01:00
813af393f1 layout: update rules before applying fullscreen nodes in layouts 2024-01-02 14:21:36 +01:00
MightyPlaza
2ad2e1d5f5
groupbar: add enabling groupbar and setting priority (#4299) 2023-12-30 15:18:53 +01:00
f9c13b614c xdg-shell: fix sending of suspended state
fixes #4287
2023-12-29 00:26:23 +01:00
André Silva
bfb4d66c81
compositor: spawn environment setup with keybind manager (#3722) 2023-12-26 18:16:59 +01:00
dranull
34b0ce66b3
dwindle: Use window->middle() when cursor is on reserved area (#4253) 2023-12-26 17:24:31 +01:00
5aab4a96e3 dispatchers: add tiled/floating to cyclenext 2023-12-24 15:08:48 +01:00
ff75f991a5 compositor: don't block focus if there is no keyboard 2023-12-24 13:20:31 +01:00
d5811283d2 xdgshell: bump to 6, send suspended states 2023-12-23 22:30:56 +01:00
bd952dcef2 systemd: add HYPRLAND_NO_SD_NOTIFY
fixes #4217
2023-12-21 22:27:12 +01:00
Ahmed Yasser
79f3888b4b
signal: fix invalid pointer access (#4207) 2023-12-20 23:54:52 +01:00
4eb42fab7b windowrules: add onworkspace
cool
2023-12-20 23:52:18 +01:00
Husam Harazi
3771c49a94
filesystem: Set the sticky bit on /tmp/hypr (#4199)
To prevent unprivileged users from deleting other users' files.
2023-12-20 11:56:15 +00:00
9fd928e114 internal: nuke CWindow::m_bMappedX11
it's useless. m_bIsMapped is the same.
2023-12-17 20:00:18 +00:00
e1ed8e11ca internal: import qt env to dbus 2023-12-15 20:59:13 +00:00
01e5c59d75 Revert "xwayland: push invisible windows outside layout"
This reverts commit accb3d8d0b.

Bad idea
2023-12-13 17:25:19 +00:00
ba2af6f86d focus: prefer sendMotionEventsToFocused for ensuring cursor image 2023-12-12 14:58:43 +00:00
accb3d8d0b xwayland: push invisible windows outside layout
fixes some xwl focus issues with special especially.
2023-12-12 01:14:36 +00:00
François Conzelmann
e53134ca90
internal: fix interactions with fakefullscreen (#4113)
- In a maximized window, unstuck fakefullscreen from on state
- In a fakefullscreen window, going in and out of fullscreen state
  keep the fakefullscreen state rendered
2023-12-11 16:51:10 +00:00
11d1c50420 windowrules: add focus param 2023-12-08 16:02:16 +00:00
03c6f4506a internal: various improvements to avoid crashes on exit 2023-12-06 14:46:29 +00:00
5d100bdcbb opengl: clear layer fade fbs in ~dtor 2023-12-04 02:08:34 +00:00
45d3fbb8d8 opengl: free window framebuffers in ~dtor
ref #4036
2023-12-04 01:44:16 +00:00
dranull
59cb0e20de
input: Handle fullscreen windows in vectorToWindowIdeal (#4021) 2023-12-03 12:53:12 +00:00
François Conzelmann
1fc1e4e9cb
monitor: remove comma from monitor description (#3996)
this allows for monitor specific rules to work on monitor with comma on
their description

fixes #2457
2023-11-30 01:48:10 +00:00
d2c3b23ace deps: update wlroots 2023-11-30 01:18:55 +00:00
Junxuan Liao
929c44e361
input: pass mouse input to IME popups (#3922) 2023-11-25 14:27:57 +00:00
Vaxry
2ebfd0c745
renderer: Move to a full Hyprland GL rendering pipeline (#3920)
Also updates wlroots
2023-11-24 10:54:21 +00:00
MightyPlaza
add23a9ba2
group: fix dragging into floating groups (#3719)
* allow dragging into floating groups

modified:   src/Compositor.cpp
modified:   src/Compositor.hpp
modified:   src/layout/IHyprLayout.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

* floating-only
modified:   src/layout/IHyprLayout.cpp
2023-11-19 12:29:01 +00:00
Vaxry
8b57a1973e
internal: Allow floating windows on special (#3872)
* allow floating on special

* fix mistake

* fix clipbox
2023-11-18 17:00:24 +00:00
84bc0a73f6 compositor: drop unused vectorToWindow func 2023-11-17 15:30:04 +00:00
Alessio Molinari
1bfd4a2bff
output-layout: fix wlroots display handling (#3718) 2023-11-12 13:14:05 +00:00
Vaxry
9be6fbf5ea
decorations: Decoration Positioner (#3800) 2023-11-11 14:37:17 +00:00
600a128f83 compositor: allow windowfromregex tiled param 2023-11-05 16:22:43 +00:00
55825c301e compositor: allow windowfromregex floating param
fixes #3766
2023-11-05 16:21:47 +00:00
d8b7ded18c compositor: find windows in direction on floating 2023-11-05 16:18:41 +00:00
74cf2281dd binds: add movefocus_cycles_fullscreen
fixes #3738
2023-11-04 21:03:08 +00:00
Vaxry
55b4f84fea
Internal: Hyprland box implementation (#3755)
* box impl

* remove unused operators

* missed applyfromwlr
2023-11-04 17:03:05 +00:00
88b47dfa83 xdg: use std::ceil for sending scale to surfaces
fixes #3724
2023-11-02 23:29:47 +00:00
Vaxry
21e9313c10
Core: various unsafe state improvements (#3713)
Fixes #3637
2023-11-01 18:53:36 +00:00
ab5497a0c9 input: properly track xdg surfaces' geometry in vectorToSurfaceLocal
fixes #3703
2023-10-30 19:36:45 +00:00
732b058489 input: send motion events on focusWindow if follows_mouse is 0 2023-10-26 22:17:49 +01:00
6650e4ba85 compositor: remove old comment 2023-10-25 18:32:04 +01:00
df00727310 deps: update wlroots 2023-10-25 00:27:16 +01:00
015664eb4c compositor: do not process fullscreen events in unsafe 2023-10-23 00:53:33 +01:00
Brenno Lemos
b135bd6cd4
workspacerules: Add new optional "default command" for auto-launching apps on new workspaces (#3559) 2023-10-22 23:11:03 +01:00
59f27e7f57 compositor: send preferred scale and transform events to surfaces
fixes #3635
2023-10-22 16:58:06 +01:00
thejch
bb9d0aed5b
compositor: Fix a lack of a check for workspace equality on same monitors in getInDirection (#3625)
* prevent movefocus and movewindow from going into main workspace when in special workspace

* compare workspace IDs instead

* change comparison and make code more readable
2023-10-20 10:53:37 +01:00
Philip Damianik
442209942f
cleanup: Replace find() with C++20 starts_with(), ends_with() and contains() (#3572)
* Replace find() with C++20 starts_with() and ends_with()

* Replace find() with C++20 contains()
2023-10-15 19:07:23 +01:00
MightyPlaza
d537815d43
groups: create group and groupbar config sections (#3522)
* config: create group section

modified:   src/Compositor.cpp
modified:   src/config/ConfigManager.cpp
modified:   src/layout/DwindleLayout.cpp
modified:   src/layout/MasterLayout.cpp
modified:   src/managers/KeybindManager.cpp
modified:   src/managers/input/InputManager.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

* separate group border and groupbar colors

modified:   src/Compositor.cpp
modified:   src/config/ConfigManager.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp

* add new line
modified:   config/ConfigManager.cpp
2023-10-10 17:42:45 +01:00
Roberto Previdi
df0c8e0f7a
workspacerules: Add a persistent workspace rule (#3530)
* add persistent flag to workspace rules

* get rid of unused ws->indestructible flag
2023-10-09 20:28:22 +01:00
vaxerski
4b3efc73c5 events: fixup empty events not being sent on unmap
Ref #3506 https://github.com/hyprwm/Hyprland/issues/3506#issuecomment-1749508111
2023-10-06 01:11:47 +01:00
vaxerski
a05076a7ee log: log wlr errors regardless of env 2023-09-30 13:12:04 +01:00
vaxerski
a44ab7748f renderer: optimize render pipeline when there is a solitary client 2023-09-29 17:51:07 +01:00
vaxerski
27cd7ef0c9 watchdog: initialize after config 2023-09-29 17:04:20 +01:00
vaxerski
9cc614d096 internal: add a watchdog
a watchdog will abort processing a signal if a timeout specified via debug:watchdog_timeout is reached.
2023-09-29 16:38:13 +01:00
Vaxry
88b63a00b6
renderer: Tearing implementation (#3441) 2023-09-28 21:48:33 +01:00
vaxerski
1f4eab176e layout: don't discard fullscreen on new tiling 2023-09-28 17:49:40 +01:00
Vaxry
46d66f4bcc
internal: Further unsafe state improvements (#3404)
Instead of allowing Hyprland to sit in a state where there are no monitors, which various parts of the code don't like, we create a fake headless output on all monitor disconnect, and then remove it when a monitor appears
2023-09-24 18:04:38 +01:00
vaxerski
fb80cbe415 input: properly track mouse focus on drag operations 2023-09-23 01:28:45 +01:00
memchr
ea5d9584da
refactor: manually resets singletons (#3395) 2023-09-22 11:06:09 +01:00
memchr
1357b66091
windowrules: add rule group to map windows grouped (#3279)
* windows: add rule group to map windows grouped

* group rule: use `invade` to force open a window in a locked group
2023-09-22 00:42:00 +01:00
alaricljs
e4ddfcfa0c
keybinds: implement pushactivetobottom dispacher (#3217)
Co-authored-by: Leeman <lstrout@enlj.com>
2023-09-21 22:18:26 +01:00
Vaxry
0dbd997003
input: Various constraint handling fixes (#3381)
Fixes #3204
2023-09-20 16:47:05 +01:00
memchr
3785defaf1
logging: implement std::formatter for some types (#3380) 2023-09-20 16:25:03 +01:00
memchr
6594b50e57
logging/format: use std::format_string to catch formatting string errors at compile time (#3377)
* fix(log): use constexpr format string

* deprecate getFormat
2023-09-20 08:26:20 +01:00
Dickby
d8d0cd75c2
internal: Make part of CCompositor::focusWindow a bit easier to read. (#3356) 2023-09-19 11:37:30 +01:00
outfoxxed
b0d5e4008b
layout: Allow the layout to control how windows are raised in groups (#3275)
* Allow the layout to control how windows are raised in groups

Previously windows could only be focused if they weren't hidden or
were part of a group. This shifts the logic for picking the window out
of a group to the layout allowing for alternate group implementations
to function normally.

* Fix doc comment consistency

* Fix tabs in comments
2023-09-12 22:37:08 +01:00
memchr
bc41d7ec85
fix: inconsistent behaviour where last workspace was not saved (#3261) 2023-09-11 23:39:24 +01:00
alaricljs
81661b49aa
windowrules: add % to resizeparams (#3246)
Co-authored-by: Leeman <lstrout@enlj.com>
2023-09-10 23:26:14 +01:00
memchr
6648274735
fix: focusWindow on hidden workspace triggers another focusWindow. (#3216)
This commit address an issue where focusing a window on a hidden
workspace inadvertently triggered a second `focusWindow` call due to
simulated mouse movement. This behaviour led to the incorrect focus on
the window under the cursor instead of target window of method
`focusWindow()`, disrupting `focusurgentorlast` and `focuscurrentorlast`
dispatchers. Introduced a flag to the `CMonitor::changeWorkspace()`
method to prevent simulated mouse movements. This flag is set to false
by default. Changed the `focusWindow()` method accordingly to set this
flag to true when the target window is in a hidden workspace.
2023-09-08 19:17:04 +02:00
Philip Damianik
8c83852704
internal: Remove all .c_str() calls when using std::vformat (#3198)
Signed-off-by: pdamianik <39028343+pdamianik@users.noreply.github.com>
2023-09-06 21:45:37 +02:00
Vaxry
61a71c65ac
internal: Formatter rework (#3186) 2023-09-06 12:51:36 +02:00
vaxerski
2d100bf57e socket2: add renameWorkspace event 2023-09-05 15:55:24 +02:00
vaxerski
bb0933437f wlr-ext-workspace: remove protocol impl
Various reasons: 1st, memory issues. 2nd, MR got closed (see https://gitlab.freedesktop.org/wlroots/wlr-protocols/-/merge_requests/35) 3rd, not needed anymore (waybar has its own hyprland/workspaces module)
2023-09-01 17:10:03 +02:00
vaxerski
b4f123d1f2 compositor: remove wlr_scene refs
super old leftovers
2023-08-30 17:22:55 +02:00
Vaxry
4a41d013a2
internal: Fix XDP multi-portal issues (#3077)
* add a hyprland portals conf

* remove portal checks

* typo

* Nix: remove portal patch

---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
2023-08-26 17:12:21 +02:00
vaxerski
870471dd96 internal: allow opening empty special workspaces
Fixes point 2 of #2596
2023-08-25 18:05:08 +02:00
vaxerski
3a1f30519b compositor: fix offset in auto arrangeMonitors
Fixes #3043, I am an idiot
2023-08-25 13:11:32 +02:00
vaxerski
ba31518ed8 compositor: fix log types 2023-08-22 16:44:33 +02:00
memchr
9ad4a96d18
renderer: update alpha of layers only if active ws (#2994)
update `alpha` of ZWLR_LAYER_SHELL_V1_LAYER_TOP only when Workspaces is active on the monitor.
2023-08-21 20:55:57 +02:00
memchr
cb59763d32
fix: improved focus behaviour on workspace switching for follow_mouse!=1 (#3041)
* fix: improved focus behaviour on workspace switching for follow_mouse!=1

When the 'input:follow_mouse' is not set to 1 and the target workspace
for switching does not currently have the previously focused window,
Hyprland will prioritize focusing on the top-left-most window.

* fix: #2451 call simulateMouseMovement.

* unify logic

* multimon fix

---------

Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
2023-08-21 20:54:02 +02:00
vaxerski
9977a8bfd4 compositor: log more in arrangeMonitors 2023-08-21 19:52:34 +02:00
Vaxry
37128bfd43
internal: Wayland Protocol impl improvements (#2944) 2023-08-21 19:36:09 +02:00
vaxerski
b79dfcceb4 compositor: fix missed raw throws 2023-08-20 13:58:46 +02:00
vaxerski
7713daa86a compositor: log thrown runtime exceptions 2023-08-20 11:47:06 +02:00
vaxerski
ebc5fed9b2 compositor: minor cleanup 2023-08-19 19:24:48 +02:00
7e8a212027 internal: allow negative monitor offsets 2023-08-16 18:16:39 +02:00
91e28bbe9d xwayland: use a completely separate coordinate system
Use a completely separate coordinate system for XWayland. This fixes all issues with force_zero_scaling overlaps.

Fixes #2916
2023-08-15 19:15:37 +02:00
7c4daee29a compositor: fix skipping iterators in arrangeMonitors 2023-08-14 19:27:33 +02:00
b9a783229b compositor: don't apply offsets in renderer 2023-08-14 18:41:52 +02:00
2110dc1f03 compositor: fix auto positioning offset calcs 2023-08-14 17:31:36 +02:00