Commit graph

700 commits

Author SHA1 Message Date
8e2a62e53b events: apply monitor state on sessionActive
ref #4839
2024-03-06 18:14:59 +00:00
12985fa0d8 surface: fix damage tearing feedback
fixes #4935
2024-03-05 00:21:37 +00:00
063708df26 config: improve config value infrastructure 2024-03-03 18:41:38 +00:00
689fced8b9 windowrules: fix center
fixes #4934
2024-03-03 00:22:40 +00:00
JManch
508262b7db
events: update render data after workspace window rule (#4931) 2024-03-02 22:15:07 +00:00
Vaxry
d72ea5f2a7
input: Rewritten pointer constraints (#4889)
* rewritten constraints

* send pointer enter on activate if not pointer focus

* minor cleanup

* simulate movement on commit

* don't ignore oneshot prop

* various fixes

* dont send motion on confined

* update pos hint on region change
2024-03-02 21:04:55 +00:00
d2289d8327 xdg: minor improvements to initial size reporting
fixes #4918
2024-03-02 18:53:17 +00:00
52db216608 events: don't switch to active workspace on workspace rule 2024-03-02 15:20:40 +00:00
GartoxFR
b2c3440477
animations: Refactor AnimatedVariable (#4911)
* animation: Refactor AnimatedVariable

This commit decomposes the AnimatedVariable class into a base class
with the common attribute to all variable types and a templated derived
type containing strongly typed info on the type being animated.

Access to the typed version is perfomed using the visitor pattern. A
utility is provided to build a visitor on the fly using lambdas.

Adding a new type to be animated should just be a matter of adding the
typed in the list defined by the ANIMABLE_TYPES macro

The size of the commit is justified by the API change in the
AnimatedVariable class. No more vec(), fl() or col() method but a unified
value() method.

* animation: Remove visitor pattern

* animation: Fix coding style

* animation: Fix coding style
2024-03-02 00:35:17 +00:00
f115ba94d2 xwayland: set scaledBy for unmanaged windows in map 2024-03-01 23:04:34 +00:00
1698d336f2 core: fix crashes on access of deleted wlr_ surface
ref fixes #4893
2024-02-29 17:23:44 +00:00
2e111c8cf9 xdg: rewrite entire popup implementation 2024-02-29 14:26:02 +00:00
Vaxry
b1c0f1cc01
subsurface: Rewrite the subsurface tree (#4877) 2024-02-29 00:03:28 +00:00
1e7eb3a5a5 xdg: check for floating conditions before sending tiled size hint
ref #4871
2024-02-28 23:14:50 +00:00
29cdd7de1f layers: minor fixes for new animations 2024-02-28 15:59:45 +00:00
4bc669f933 layers: add fully featured animations
Adds configs and layerrules to handle them

alas fixes #981

I have cooked
2024-02-28 15:00:40 +00:00
f4f3aa2e50 layout: add size prediction for initial xdg commits
fixes #4022
2024-02-28 11:45:43 +00:00
e3373669e5 wayland: implement keyboard_shortcuts_inhibit_v1
fixes #4568
2024-02-27 23:15:24 +00:00
Tom Benham
54a8329936
layout: Fixed ghost window when opened while fullscreen on a different workspace (#4822)
* Fixed ghost window when opened while fullscreen on a different workspace

* Format

---------

Co-authored-by: Tom Benham <tom.benham@quadrille.fr>
2024-02-25 14:09:41 +00:00
d9757b61bf xdg: manually schedule initial configures
chasing wlroots

fixes #4801
2024-02-22 17:33:23 +00:00
13d9854897 xdgpopup: fix UAF because of an invalid listener connection
destroy should be connected to popup::destroy, not popup::surface::destroy...

ref #4751
2024-02-20 18:14:36 +00:00
Vaxry
13f6f0b923
Migrate the config to hyprlang (#4656)
* Migrate to hyprlang

* pop up errors

* fix swapped args

* Meson & Nix: build with hyprlang

* CI: add hyprlang to setup action

* add infra for plugin stuff

* fix hyprctl getoption

* fix hyprctl getoption with json

* format

* fix post parse logic

* fix autogen config

* oops missed exec-once

* fmt

* fix ws rules

* require 0.3.0 for hyprlang

* nix: flaek

* minor type fixes

* fix cfg usages in swipe

* use cvarlist for ws rules

* fix throw in addPluginConfigVar

* Nix: update hyprlang

* minor fixes

* fix disableLogs

* mention hyprlang docs

* bump hyprlang dep in cmake

* Meson: bump min hyprlang version

Nix: update hyprlang

* minor fix

* Nix: update meson patch

---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
2024-02-18 15:00:34 +00:00
683a4b07c5 rules: ignore static tile/float rules in dynamic gets
fixes #4736
2024-02-18 00:13:43 +00:00
294e51a857 input: refocus on completed drags 2024-02-17 16:02:17 +00:00
cdcc5aba06 xwayland: ignore OR activate requests if surface doesn't want focus 2024-02-17 02:47:07 +00:00
8d68d6bfa5 windowrules: nuke no*request 2024-02-14 22:27:53 +00:00
7f52db806c windowrules: add suppressevent
deprecates nofullscreenrequest nomaximizerequest
2024-02-14 22:19:49 +00:00
305b1419c8 renderer: accept custom state requests for fake outputs 2024-02-14 22:05:41 +00:00
Epilepsy Gatherings
2a3429d4cf
internal: add forcenofocus prop (#4672)
* add forcenofocus

* change nofocus to overridable var
2024-02-13 18:07:19 +00:00
ded174d6e5 misc: remove unused var 2024-02-05 23:39:19 +00:00
cfd68af5b6 tearing-control: handle unmapped surfaces for hints
fixes #4570
2024-02-01 00:55:29 +00:00
c51b3fb06f events: ignore sending mouse enter to focused if a constraint is active
fixes #4186
2024-01-30 16:24:41 +00:00
b7840c6461 xwayland: remove delta from pos sets in configureX11
ref #4536
2024-01-28 20:13:44 +00:00
Epilepsy Gatherings
0e5f14d8d2
xwayland: remove reportedsize set in unmanagedSetGeometry (#4539) 2024-01-28 19:22:02 +00:00
bfcc2adbda monitor: wrap usage of wlr_output_state
for better control and convenience in usage.

fixes #4546
2024-01-28 01:57:13 +00:00
7b3d039388 deps: update wlroots
drops requirement for WLR_DRM_NO_ATOMIC provided kernel >= 6.8
2024-01-27 13:58:28 +00:00
17339e0ae9 input: track exclusive LSes
ref #4465
2024-01-19 16:45:34 +01:00
6b92144f15 surface: avoid spam of window surfaces with scale and transform events
fixes #4408
2024-01-11 14:07:28 +01:00
71166ef40b subsurfaceTree: update surface tree protocol feedback on map 2024-01-09 18:14:08 +01:00
33444e1e5e deps: update wlroots 2024-01-01 16:47:54 +01:00
cc0516a9ae windowrules: minor fixes to onworkspace
fixes #4227
2023-12-23 15:49:42 +01:00
460a326c90 Revert "xdgshell: set predicted tiled windows to monitor res size pre-map"
This reverts commit 763d5fa05f.

Some issues and fixes #4185
2023-12-18 14:45:20 +00:00
403fd7d9f6 xwayland: move commit handler connect to associate
fixes #4179
2023-12-18 00:15:30 +00:00
763d5fa05f xdgshell: set predicted tiled windows to monitor res size pre-map
Should improve #4022 although not exactly fix. Fixing would require more witchcraft
2023-12-17 20:09:34 +00:00
9fd928e114 internal: nuke CWindow::m_bMappedX11
it's useless. m_bIsMapped is the same.
2023-12-17 20:00:18 +00:00
8c9f38e405 events: improve wl_surface::commit event tracking 2023-12-17 19:58:01 +00:00
c0d9dcc586 xwayland: set reported and pending size/pos on geometry sets 2023-12-17 14:53:59 +00:00
395ab3ba37 xdg: use better min/max size checks for floating resizes 2023-12-15 15:38:20 +00:00
ba2af6f86d focus: prefer sendMotionEventsToFocused for ensuring cursor image 2023-12-12 14:58:43 +00:00
8f38487884 xwayland: don't change workspace on configure for invisible windows
fixes #3578
2023-12-12 01:15:17 +00:00
Vaxry
9f5b9053c6
internal: Remake borders as window decorations (#4104) 2023-12-10 16:28:12 +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
d2c3b23ace deps: update wlroots 2023-11-30 01:18:55 +00:00
75e5799310 layer-shell: simulate mouse movement on unmap 2023-11-26 14:54:34 +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
49597688e9 windowrules: make idleinhibit dynamic 2023-11-14 15:46:57 +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
bea828ea45 decoration-positioner: improve extent handling 2023-11-11 15:18:17 +00:00
427153e86a xwayland: add half of delta to configure request sizes 2023-11-10 23:49:35 +00:00
b8a615ffb8 xdg-shell: improve ack-configure handling
fixes #3807
2023-11-10 00:13:22 +00:00
8dd02eb5f3 xdg-shell: update reported size on ack_configure 2023-11-09 22:43:52 +00:00
9404972732 events: set reported size on floating map
fixes #3767
2023-11-05 14:12:55 +00:00
Vaxry
55b4f84fea
Internal: Hyprland box implementation (#3755)
* box impl

* remove unused operators

* missed applyfromwlr
2023-11-04 17:03:05 +00:00
54e51b7acf events: better adjust to unreported sizes for xwayland apps
fixes #3745
2023-11-04 13:09:33 +00:00
200cccdd3b events: set reported size on the end of mapping
fixes #3743
2023-11-03 22:47:12 +00:00
ba9e7814b0 input: simulate movement only if mouse is over in open/close window
fixes #3726
2023-11-02 21:36:16 +00:00
Dashie
062f749450
xdg: send unconstrain events after a popup reposition (#3716)
* fix: Use unconstrain_from_box after reposition request

* chore: Remove unused include

* chore: remove variable specifier
2023-11-01 20:31:52 +00:00
a4db48b46b input: simulate mouse movement to fix focus on open/close window
fixes #3679
2023-11-01 19:50:32 +00:00
Vaxry
21e9313c10
Core: various unsafe state improvements (#3713)
Fixes #3637
2023-11-01 18:53:36 +00:00
4a4e13f8ac events: ignore takes_over_fullscreen for floating windows
fixes #3622. Floating windows should not respect the config option, they should be shown on top. That option is meant for tiled only
2023-10-27 12:45:17 +01:00
df00727310 deps: update wlroots 2023-10-25 00:27:16 +01:00
98059b52d7 layershell: support ON_DEMAND keyboard mode
fixes #2264
2023-10-22 23:32:55 +01:00
59f27e7f57 compositor: send preferred scale and transform events to surfaces
fixes #3635
2023-10-22 16:58:06 +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
eriedaberrie
421f5fb221
events: make new windows taking over fullscreen keep the existing mode (#3588) 2023-10-17 11:41:27 +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
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
322c5cc4b9 layout: add new_window_takes_over_fullscreen mode 2
fixes #3486
2023-10-04 15:00:24 +01:00
vaxerski
230356012b renderer: extract solitary check into frame handler 2023-10-04 13:48:44 +01:00
vaxerski
4531717f3e renderer: considerable fixes to repaint logic 2023-10-04 13:39:40 +01:00
vaxerski
b814ba98a7 misc: add misc:new_window_takes_over_fullscreen
referenced in #3474
2023-10-02 16:27:32 +01:00
vaxerski
50fecf084d events: set new window alpha to 0 if it's tiled behind fullscreen
fixes #3474
2023-10-02 16:22:39 +01:00
vaxerski
5ffb1032e1 events: don't focus new window if spawned behind fullscreen
fixes #3473
2023-10-02 14:09:23 +01:00
vaxerski
a2a29a60e5 tearing: cleanup vars and avoid rendering before drm is ready 2023-09-30 17:07:50 +01:00
vaxerski
a44ab7748f renderer: optimize render pipeline when there is a solitary client 2023-09-29 17:51:07 +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
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
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
vaxerski
2f01a18989 window: recalculate layout on swallow in map
fixes #2848
2023-09-16 18:40:57 +01:00
MightyPlaza
824290c791
windowrules: fix workspace exec rule with special (#3316)
modified:   src/events/Windows.cpp
2023-09-15 12:05:21 +01:00
be19773aaa windowrules: fix workspace rule separation
fixes #3265
2023-09-12 16:50:10 +01:00
alaricljs
9192b20b96
windowrules: add on-screen constraint to wrv2 'move' (#3247)
* add on-screen constraint to wrv2 'move'

* review changes

* std::clamp

* more parens

---------

Co-authored-by: Leeman <lstrout@enlj.com>
2023-09-12 09:56:20 +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
vaxerski
f4e99a36a9 input: don't warp region constraints 2023-09-10 12:49:53 +01:00