Commit graph

511 commits

Author SHA1 Message Date
37d2840246 renderer: reject non-clean scales, find nearest clean 2023-12-22 19:54:31 +01:00
bd952dcef2 systemd: add HYPRLAND_NO_SD_NOTIFY
fixes #4217
2023-12-21 22:27:12 +01:00
ef445093f9 internal: convert uname fields to strings before logging
fixes #4188, thanks @jbeich
2023-12-18 23:33:10 +00:00
01e5c59d75 Revert "xwayland: push invisible windows outside layout"
This reverts commit accb3d8d0b.

Bad idea
2023-12-13 17:25:19 +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
dd0714c22a input: add relative_input for tablets
closes #2639
2023-12-09 04:07:28 +00:00
dranull
004bf94a23
keybinds: Keep focus on special when switching workspaces (#4084) 2023-12-07 22:12:08 +00:00
François Conzelmann
4a42344e97
style/ci: apply clang-format and verify it in ci (#4039)
* style: apply clang-format

* ci: add new clang-format job to CI
2023-12-06 22:54:56 +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
9c09f2a847 screencopy: fix shm exports with 10-bit
fixes #4019
2023-12-01 17:20:56 +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
68e57b7ee3 renderer: proper full occlusion checks for back layer 2023-11-26 15:24:24 +00:00
9e2b939024 surface: avoid infinite pointer image resets
fixes #3729, should also #3968
2023-11-26 14:53:22 +00:00
334d0ae31b monitor: fix transform matrix calculations for transformed
fixes #3929
2023-11-24 13:45:10 +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
end-4
646f4bc638
general: add workspace gaps (#3877)
* anims: workspace gap

* anims: ws gaps: on swipe end

* anims: ws gaps: add missing parentheses

* format

* refractor

* Update Swipe.cpp

* format

* fix swipe to right

* ws gaps: move animations:workspace_gap to general:gaps_workspace

* ws gaps: general:gaps_workspace -> general:gaps_workspaces
2023-11-19 12:33:26 +00:00
Dickby
3d89654254
vector: New operator overloads and small fix in Vector2D. (#3891) 2023-11-18 21:37:16 +00:00
483302a2cd env: add HYPRLAND_NO_RT 2023-11-17 23:29:30 +00:00
4868d4dfd3 shadow: avoid fatal mutation of the windowBox for calcs
fixes #3865
2023-11-16 17:31:52 +00:00
ba5bc5871f subsurfaces: damage window on subsurface size change 2023-11-12 23:06:31 +00:00
65efde32c9 internal: make getPlusMinusKeywordResult return optional 2023-11-12 13:40:02 +00:00
69e314207d internal: replace INT_MAX with WORKSPACE_INVALID 2023-11-12 13:34:54 +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
e44d6de555 shadow: alpha treatment improvements 2023-11-11 00:52:40 +00:00
8dd02eb5f3 xdg-shell: update reported size on ack_configure 2023-11-09 22:43:52 +00:00
Brett Alcox
a122271f09
includes: fix box headers (#3771) 2023-11-05 17:32:27 +00:00
d8b7ded18c compositor: find windows in direction on floating 2023-11-05 16:18:41 +00:00
c4e1a9b13b box: use std::round instead of std::floor in ::round()
fixes #3761, possibly also #3511
2023-11-05 14:47:24 +00:00
92e535025e region: include box in the header 2023-11-04 23:12:08 +00:00
931927de29 dwindle: move to CBox for expressing nodes 2023-11-04 21:45:34 +00:00
a3e20d2d5f wlsurface: fix small detection 2023-11-04 17:39:56 +00:00
Vaxry
55b4f84fea
Internal: Hyprland box implementation (#3755)
* box impl

* remove unused operators

* missed applyfromwlr
2023-11-04 17:03:05 +00:00
9d2a5fb417 renderer: improvements to wayland surface small() detection 2023-11-03 19:12:09 +00:00
pastalian
49fdffacea
renderer: fix legacy_renderer build (#3732)
In GLES2, `GL_RGB10_A2` and `GL_UNSIGNED_INT_2_10_10_10_REV` are defined as
`GL_RGB10_A2_EXT` and `GL_UNSIGNED_INT_2_10_10_10_REV_EXT` respectively.
2023-11-03 15:47:20 +00:00
Vaxry
21e9313c10
Core: various unsafe state improvements (#3713)
Fixes #3637
2023-11-01 18:53:36 +00:00
4b592d0819 renderer: properly pass 10-bit formats to opengl 2023-10-30 15:56:16 +00:00
cb6cfde6e8 window: update window reported size on damage events 2023-10-30 14:49:49 +00:00
7a5234a0cc input: better cursor image infrastructure
Improves handling of cursor images/surfaces
Fixes an issue with decos and cursors
Fixes #3471
2023-10-29 18:09:05 +00:00
8991be671f renderer: respect viewporter dest on base surfaces 2023-10-25 22:05:04 +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
7f35f33b4c surface/wayland: conform to small surface requirements
do not stretch small surfaces, instead center them if they fit.
2023-10-20 20:15:57 +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
vaxerski
e4bcd2e2da monitor: ensure vrr on workspace change 2023-10-12 17:26:35 +01:00
Vaxry
06cc42441c
build: guard execinfo.h via build systems (#3547)
* guard execinfo via cmake

* libexecinfo -> execinfo macro name

* meson: add execinfo check

* move check in cmake up

---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
2023-10-11 22:27:53 +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
4531717f3e renderer: considerable fixes to repaint logic 2023-10-04 13:39:40 +01:00
memchr
161fee1d82
internal: include missing header (#3464) 2023-10-01 12:26:10 +01:00
vaxerski
a2a29a60e5 tearing: cleanup vars and avoid rendering before drm is ready 2023-09-30 17:07:50 +01:00
vaxerski
b8f8912db2 renderer: lock software cursors while tearing 2023-09-30 13:12:01 +01:00
vaxerski
86e8ed038f includes: add missing log include to animatedvariable 2023-09-30 02:09:08 +01:00
vaxerski
4daa515700 watchdog: don't hang on exit 2023-09-29 20:05:43 +01:00
vaxerski
a44ab7748f renderer: optimize render pipeline when there is a solitary client 2023-09-29 17:51:07 +01:00
vaxerski
ab11bd2085 watchdog: remove thread on destroy 2023-09-29 17:33:26 +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
d48c11cc3f input: minor constraint fixes
Better adjust to constraints that do not set a hint. Fixes #3436
2023-09-28 20:02:00 +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
Jan Beich
8637bfb1b7
build: Unbreak build without precompiled headers (#3400)
* helpers: add missing header after 2e34548aea

src/helpers/VarList.cpp: In constructor 'CVarList::CVarList(const std::string&, size_t, char, bool)':
src/helpers/VarList.cpp:19:34: error: 'removeBeginEndSpacesTabs' was not declared in this scope
   19 |             m_vArgs.emplace_back(removeBeginEndSpacesTabs(in.substr(pos)));
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~
src/helpers/VarList.cpp:23:30: error: 'removeBeginEndSpacesTabs' was not declared in this scope
   23 |         m_vArgs.emplace_back(removeBeginEndSpacesTabs(std::string_view{s}.data()));
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~

* helpers: add missing C linkage after 0dbd997003

ld.lld: error: undefined symbol: wlr_region_scale(pixman_region32*, pixman_region32 const*, float)
>>> referenced by Region.cpp
>>>               src/Hyprland.p/helpers_Region.cpp.o:(CRegion::scale(float))
>>> did you mean: extern "C" wlr_region_scale
>>> defined in: /usr/lib/libwlroots.so.12032
2023-09-23 13:31:37 +01:00
vaxerski
fb80cbe415 input: properly track mouse focus on drag operations 2023-09-23 01:28:45 +01:00
vaxerski
9f68aa33ea renderer: damage monitor on special workspace change
fixes #3396
2023-09-22 23:36:28 +01:00
memchr
ea5d9584da
refactor: manually resets singletons (#3395) 2023-09-22 11:06:09 +01:00
Mihai Fufezan
1925e64c21
Vector2D: fix typo in include 2023-09-20 22:26:08 +03: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
memchr
c50072b108
varlist: cleanup unintuitive string splitting (#3369)
* refactor(varlist): replace unintuitive string splitting

* refactor(varlist): remove test asserts
2023-09-19 09:44:54 +01:00
Dickby
b0a82c04df
bezier: Remove Todo about N-Point bezier curves. (#3352) 2023-09-17 18:48:11 +01:00
Dickby
a53ec98b82
bezier: Optimize CBezierCurve::getYForPoint (#3321) 2023-09-16 18:32:33 +01:00
memchr
db2b72adee
config: fix relative path resolution (#3308) 2023-09-14 12:07:31 +01:00
2e34548aea varlist: move to a separate header, add join 2023-09-12 16:50:10 +01:00
memchr
df51c45d7f
keybinds: unify changeworkspace dispatcher (#3250)
* refactor: changeworkspace dispatcher

* refactor: remove redundant focusWindow calls

* refactor(changeworkspace): warp cursor to middle of last focused window

* refactor: use rememberPrevWorkspace

* Fix: `CWorkspace::rememberPreWorkspace` condition is illogical
2023-09-11 15:14:43 +01:00
memchr
e96e0dc02d
refactor: utilize 'middle()' method for window/montior center (#3253) 2023-09-11 10:09:34 +01:00
Philip Damianik
6c855dd6e4
internal: Fix wlr output management (#3234) 2023-09-10 13:14:27 +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
398e861b55 internal: fix warnings 2023-09-07 16:43:01 +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
c3a83daa1e monitor: minor adjustments 2023-09-05 22:16:14 +02:00
vaxerski
d9937fcdba input: minor constraint fixes
fixes the confined region, warping issues, etc. Closes #3158
2023-09-04 17:34:19 +02:00
MightyPlaza
6a0e2bbff3
socket2: added "activespecial" IPC event (#3163) 2023-09-04 15:11:51 +02:00
vaxerski
35df4693ea animatedvariable: don't reset timers on duplicate setters
Fixes the annoying jump when a recalc happens while a window is being animated
2023-09-04 13:11:56 +02:00
vaxerski
5126bfab72 monitor: ignore no-op workspace changes 2023-09-03 17:21:55 +02:00
Vaxry
d9292800a2
internal: Unsafe state reworks (#3114) 2023-09-01 22:03:56 +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
MightyPlaza
b10cae3010
decos: groupbar mouse interaction (#3102)
* allow groupbar clicking
	modified:   src/Window.cpp
	modified:   src/Window.hpp
	modified:   src/managers/input/InputManager.cpp
	modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
	modified:   src/render/decorations/CHyprGroupBarDecoration.hpp

* remove setting pos inside insertWindowToGroup()

modified:   src/Window.cpp
modified:   src/layout/DwindleLayout.cpp
modified:   src/layout/MasterLayout.cpp
modified:   src/managers/KeybindManager.cpp

* add group window by index and group size functions
modified:   src/Window.cpp
modified:   src/Window.hpp
modified:   src/managers/input/InputManager.cpp

* allow dragging into groupbar
modified:   src/Window.cpp
modified:   src/layout/DwindleLayout.cpp
modified:   src/layout/MasterLayout.cpp

* allow dragging from groupbar
modified:   src/managers/KeybindManager.cpp

* try groupbar clicking before border resize
modified:   src/managers/input/InputManager.cpp

* block grabbing groupbar on floating (crash)

remove later when crashing is fixed

modified:   src/managers/KeybindManager.cpp

* remove redundant { }
modified:   src/layout/DwindleLayout.cpp
modified:   src/layout/MasterLayout.cpp

* implement getWindowDecorationBox()
modified:   src/Window.cpp
modified:   src/Window.hpp
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/CHyprDropShadowDecoration.cpp
modified:   src/render/decorations/CHyprGroupBarDecoration.cpp
modified:   src/render/decorations/IHyprWindowDecoration.cpp
modified:   src/render/decorations/IHyprWindowDecoration.hpp

* fix crash when moveoutofgroup in floating windows

also removes dragging from floating windows limitation

modified:   src/layout/IHyprLayout.cpp
modified:   src/managers/KeybindManager.cpp

* use CRegion in getWindowDecorationBox()
modified:   src/helpers/Region.cpp
modified:   src/helpers/Region.hpp
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/IHyprWindowDecoration.cpp
modified:   src/render/decorations/IHyprWindowDecoration.hpp

* add groupbar scrolling
modified:   src/config/ConfigManager.cpp
modified:   src/managers/input/InputManager.cpp

* change name to getWindowDecorationRegion()
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/IHyprWindowDecoration.cpp
modified:   src/render/decorations/IHyprWindowDecoration.hpp

* make dragging from group less hacky for floating
modified:   src/managers/KeybindManager.cpp
2023-08-30 17:39:22 +02:00
vaxerski
c98a00678c input: fix xwayland constraint calcs
some minor adjustments, fixes #3028
2023-08-30 17:23:35 +02:00
vaxerski
870471dd96 internal: allow opening empty special workspaces
Fixes point 2 of #2596
2023-08-25 18:05:08 +02:00
end-4
17ea7db23a
gestures: Swipe direction lock (#3052) 2023-08-23 22:40:19 +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
63b2189ce8 xdgshell: damage old popup coords after a reposition
fixes #3038. I updated the shell ver without properly supporting .reposition
2023-08-21 01:15:00 +02:00
vaxerski
7713daa86a compositor: log thrown runtime exceptions 2023-08-20 11:47:06 +02:00
end-4
37a211a2ae
animations: add slidefade and slidefadevert styles for workspaces (#3008)
* add slidefade and slidefadevert animations

* fix swiping for slidefadevert

* rename minPerc to movePerc for slidefade anim styles

* change default slidefade percentage to 100%

* remove useless comments

* findlastof + 1

* debug logging for slidefade/slidefadevert percentage
2023-08-17 22:30:20 +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
13886a264f internal: add a new monitor auto system 2023-08-14 14:22:10 +02:00
3f7f4207a6 config: add vrr per-display 2023-08-11 17:37:57 +02:00
60b548296d internal: move backtrace to specific func 2023-08-11 17:22:19 +02:00
cbb899740c rules: add layer and window xray rules 2023-08-09 22:03:31 +02:00