Commit graph

452 commits

Author SHA1 Message Date
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
13886a264f internal: add a new monitor auto system 2023-08-14 14:22:10 +02:00
UserSv4
8a7ce59ad4
internal: Fix grouped windows not being properly focused on activation (#2925)
* Fix grouped windows not being properly focused on activation

This bug could happen if you:
1. Open two Chromium windows in a single group
2. Open some tabs in both of the windows
3. Using tabs search (Ctrl+Shift+A) try to switch to a tab in the second window from the first one.
When this happens any window focus would be lost (hyprctl activewindow starts to output "Invalid") and also the mouse cursor would become centered relatively to the second window.

* Update Compositor.cpp
2023-08-11 17:27:09 +02:00
MightyPlaza
c4c3b590e5
toplevel: patches group toplevel-activated (#2931)
* patches group toplevel-activated

	modified:   src/Compositor.cpp
	modified:   src/Window.cpp

* remove redundant call

	modified:   src/Compositor.cpp

* fix style
	modified:   src/Compositor.cpp
2023-08-10 20:06:39 +02:00
c748f36939 internal: add lock files and hyprctl instances 2023-08-08 16:16:40 +02:00
vaxerski
2e6693fbb6 compositor: update window rules on workspace move 2023-08-03 21:59:12 +02:00
vaxerski
f5913135c6 input: add support for cursor-shape-v1 2023-07-24 18:50:17 +02:00
Vaxry
8370a7fcc4
internal: Protocol C++ Wraps + XDGOutput impl (#2733)
move to our own xdgoutput impl instead of wlr's
2023-07-18 15:30:28 +02:00
Jan Beich
8c9e2e1ff1
deps: update wlroots (#2734) 2023-07-18 12:13:59 +02:00
Tuur Vanhoutte
d2eb4fee76
Avoid connected monitor reusing unavailable ID (#2731) 2023-07-18 12:12:05 +02:00
MightyPlaza
cacdb424a9
massive-fix (#2725) 2023-07-16 21:00:38 +02:00
vaxerski
459afcc47f idle: fix reverse flag for new idle protocol 2023-07-14 20:02:31 +02:00
vaxerski
f8def68e7e idle: implement new protocol 2023-07-13 18:05:34 +02:00
MightyPlaza
29d017f54b
monitor desc default workspace but working now (#2678)
* fix desc check

* fixes crashes when nulptr
2023-07-11 11:29:19 +02:00
MightyPlaza
d9f7f039e1
monitor desc support (#2670)
* monitor desc

* monitor desc
2023-07-09 23:10:35 +02:00
Tuur Vanhoutte
b99ac063ea
Reuse same ID when reconnecting monitor, otherwise use minimum available ID (#2666)
Fixes #2601
2023-07-09 23:08:40 +02:00
Mykola Perehudov
41358c6fb5
Cleanup compositor deadcode (#2657)
* Remove dead code as it is a part of CCompositor::cleanup

* Unify sd_notify logic with Compositor lifetime
2023-07-06 15:24:49 +02:00
vaxerski
18f9fb5e0f rules: add stayfocused 2023-07-04 12:05:25 +02:00
01f85a09a9 xwayland: send zero scaling to xwayland if enabled 2023-06-23 21:42:44 +02:00
cbe9bf0e69 compositor: move group members properly in moveWindowToWorkspaceSafe 2023-06-21 20:51:18 +02:00
vaxerski
fbabb105c3 gamma: use wlr's new gamma manager event 2023-06-14 13:26:47 +02:00
vaxerski
e8c6d0f51e compositor: don't set dim percent on disabled dim 2023-06-13 18:51:49 +02:00