Commit graph

1131 commits

Author SHA1 Message Date
thejch
906e498144
dispatchers: open special ws on active monitor instead of mouse monitor (#5330) 2024-03-30 16:58:18 +00:00
3d1bf1405e keybinds: add binds:disable_keybind_grabbing
fixes #5273
2024-03-29 18:57:16 +00:00
2571875453 format: fix format 2024-03-28 02:28:22 +00:00
Sungyoon Cho
ae52b7f468
textinput: fix ime when opening multiple windows (#5281) 2024-03-26 15:16:09 +00:00
ae17e900e7 layer-shell: render popups above everything 2024-03-25 16:20:30 +00:00
dmayle
6b28bf563e
keybinds: Fix exit trigger by moving it to monitor.frame (#5240) 2024-03-25 01:46:59 +00:00
89543e8e3c cursormgr: don't set x theme in changeTheme 2024-03-24 20:48:56 +00:00
294ff8609f cursormgr: log theme loading failures 2024-03-24 19:39:56 +00:00
1e82d5a04d ime: fix build without pch 2024-03-24 17:19:35 +00:00
5cc4bf699c IME: Refactor and fixup popups 2024-03-24 16:08:25 +00:00
acf15e5579 text-input: reset lock counter on surface destroy
fixes #5231
2024-03-24 15:00:00 +00:00
86dc46ffea animationmgr: use realpos and size for border damage
fixes #5239
2024-03-24 03:09:46 +00:00
09e1128da2 cursormgr: initialize size to 0
Because the ctor expects that. Ref #5237
2024-03-24 02:21:36 +00:00
thejch
c7fbea3368
animations: Fix animation issue in focusworkspaceoncurrentmonitor (#5202)
* dont render when workspace offset

* add guard

* can remove useless code now if workspace offset is not taken into account

* clang-format

* when special workspace is moved, set anim to move

* add offset back

* make it a configurable option because some folks apparently can't align their monitors correctly and may not want this feature😔

* remove config option
2024-03-23 22:14:50 +00:00
Sungyoon Cho
2d5fda4810
input: fix crash with text-input-v1 (#5234) 2024-03-23 21:12:27 +00:00
Khalid
059e85ae69
input: Add options to set tablet's active area (#5199)
* Add options to set tablet's active area

* Set tablet's active area in `setTabletConfigs`

* Fix formatting for new variables in ConfigManager

* Report tablet's physical size with hyprctl
2024-03-23 20:31:03 +00:00
9f2ed02f35 IME/TI: Fixes and refactoring
Fixes #5189
2024-03-22 23:08:52 +00:00
8c88689faf IME: guard unfocused TIs in leave 2024-03-22 18:58:28 +00:00
d2b42e29c6 IME: fix crashes with destroyed text-inputs
ref #5189
2024-03-22 18:45:28 +00:00
Horror Proton
bfc95e992d
swipe: fix nullptr in onSwipeUpdate (#5191) 2024-03-20 18:13:31 +00:00
Khalid
9ddf1b105e
tablet: Add left_handed option for tablets (#5178)
* Add left_handed option for tablets

* Update left_handed tablet option's fallback string
2024-03-20 04:00:43 +00:00
8593c45be3 refactor: move window.hpp to desktop/ 2024-03-20 01:44:51 +00:00
05cd6d3df1 config/workspace: added workspace selectors 2024-03-19 20:56:20 +00:00
joshua
5c1097cbc1
IME: Improve handling of text-input and ime-relay (#5147)
* input: Handling multiple surfaces for the text-input-v1 protocol implementation and imporve InputMethodRelay logic

fixes #2708

* clang-format

* minor style nits

---------

Co-authored-by: Vaxry <vaxry@vaxry.net>
2024-03-19 15:54:33 +00:00
7a31c954e5 tablet: minor focus fixes
ref #3004
2024-03-19 02:45:11 +00:00
4b74123649 socket2: add pin event
fixes #4778
2024-03-18 18:11:20 +00:00
c34ad12183 cursormgr: scale hotspot with buffer 2024-03-17 19:00:21 +00:00
Zach DeCook
3c21f5e07b
swipe: Touchscreen workspace swipe (#4489)
* Workspace Swipe: Refactor update and end functions

* Touch: Implement workspace swipe better

ignoring additional fingers and new touches

allow gaps-right and gaps-left to be different
2024-03-17 15:43:59 +00:00
djvs
3ed3b34c4a
keybinds: add Dispatchers for "force float" and "force tiling" (non-toggle) (#5137)
---------

Co-authored-by: djvs <djvs@users.noreply.github.com>
2024-03-17 15:41:43 +00:00
thejch
c942ce6dce
renderer: add better multi monitor animations (#5126) 2024-03-16 14:49:34 +00:00
drendog
72d78eff95
sessionlock: refocus after destroy focused surface (#5117)
* fix: refocus after destroy focused surface

* refactor: minor refactor on refocus loop condition

* refactor: minor refactor on condition

* style: format code
2024-03-15 18:44:17 +00:00
Maximilian Seidler
a958884b52
lock: fix red screen issues with multiple monitors (#5100)
* lock: use uint64_t for iMonitorID

* lock: move activateLock to onNewSessionLock

* lock: add red screen fade

* lock: damage when fading the red screen and delay for screencopy

* lock: remove redundant scheduleFrameForMonitor
2024-03-15 16:17:13 +00:00
thejch
7ea555da7f
master: Fix master layout window focus and scroll (#5074)
* fix master switch window scrolling

* fix some more dispatchers and remove some duplicate code

* refactor and remove duplicate code

* fix focusmonitor: https://github.com/hyprwm/Hyprland/issues/5006#issuecomment-1986977255

* change check
2024-03-13 02:09:20 +00:00
Ikko Eltociear Ashimine
f1ec0ba467
keybinds: Fix typo (#5081)
minor fix
2024-03-12 15:26:42 +00:00
a065b481f3 cursormgr: use XCURSOR_THEME for x themes 2024-03-11 20:33:26 +00:00
Lucas Reis
0fc9d45e4b
core: Fix typo and check grandchild PID in spawn() (#5070) 2024-03-11 19:31:39 +00:00
739c5bc98c cursormgr: fix invalid access to hyprcursor in xwayland init
fixes #5048
2024-03-09 21:54:33 +00:00
26cd1bf949 input: fix minor default cursor reset conditions 2024-03-09 18:12:55 +00:00
18a35b1406 cursormgr: fix memory leak with cursor buffers 2024-03-09 18:04:33 +00:00
7e41e5146d cursormgr: add fallbacks for unknown cursors 2024-03-09 18:00:37 +00:00
Vaxry
c3882bb832
internal: Support libhyprcursor (#5009)
woo

---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
2024-03-09 16:52:59 +00:00
3f58e77e75 deps: update wlroots 2024-03-09 16:35:35 +00:00
300d77edd9 keybinds: track submap at press for keypresses
fixes #5037
2024-03-09 16:08:07 +00:00
024d4ddc74 input: scale local coords in constraints
fixes #5029
2024-03-08 22:51:28 +00:00
Grant Ammons
0ee69058c4
config: Add input:scroll_factor configuration (#4980)
* Allow for input:scroll_factor configuration

This PR will allow for a `scroll_factor` configuration within an `input`
block.  The purpose is to control the scroll factor of external mice.

Closes #2574.

* clang-format
2024-03-05 19:18:53 +00:00
thejch
9c48c322d4
keybinds: Allow fullscreen/maximize in special workspace (#4921)
* allow fullscreen/maximize in special workspace

* remove duplicate code

* hide top layer

* fix special fullscreen deco

* edit

* fix fade top layer when toggle special

* remove double render
2024-03-04 23:29:45 +00:00
7a76ab01d1 input: send motion to confined cursors 2024-03-04 23:07:16 +00:00
Tom Benham
07c7235b72
keybinds: Better handling of workspace_back_and_forth (#4952)
* Removed redundant boolean condition

* Better handling of workspace_back_and_forth when using focusworkspaceoncurrentmonitor dispatcher

* Fixed config acquisition

---------

Co-authored-by: Tom Benham <tom.benham@quadrille.fr>
2024-03-04 17:05:20 +00:00
063708df26 config: improve config value infrastructure 2024-03-03 18:41:38 +00:00
Epilepsy Gatherings
acf0b536a6
xwayland: disable initial focus for xwayland dialogs (#4936) 2024-03-03 00:18:53 +00:00
Tobias Zimmermann
964f1a438d
keybinds: Add the 'catchall' keyword that matches all keys (#4930)
* Add the 'catchall' keyword that matches all keys

This keyword can be used to define arbitrary keybinds. The only special
behavior that it exhibits is that it matches every key, including
modifier keys. Any flags still apply normally.

This commit also fixes an issue that keys bound via the code:KEYCODE
format were not unbound correctly.

* Disallow catchall keybinds outside of submaps

A catchall keybind outside a submap would prevent essentially all key
events from going through to applications and would be difficult to
remove again.
2024-03-03 00:17:02 +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
8811f4b69a drag: check min size for reisze drags
fixes #4920
2024-03-02 15:25:32 +00:00
7ce781e87c keybinds: better follow xkb translation state
fixes #4908
2024-03-02 01:46:55 +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
Brett Alcox
6e3a494d1d
core: add additional headers for Popup.cpp and InputMethodRelay.hpp (#4909) 2024-03-01 20:07:36 +00:00
1698d336f2 core: fix crashes on access of deleted wlr_ surface
ref fixes #4893
2024-02-29 17:23:44 +00:00
4bff762d97 xwaylandmgr: don't read xwayland surface from unmapped xwayland 2024-02-29 01:21:23 +00:00
1e7eb3a5a5 xdg: check for floating conditions before sending tiled size hint
ref #4871
2024-02-28 23:14:50 +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
JManch
c198d744b7
keybinds: unconstrain mouse on focusmonitor and cyclenext (#4863) 2024-02-28 00:52:45 +00:00
Tobias Zimmermann
489ac40abd
config: Add option to resolve keybinds by sym instead of code (#4851)
This commit adds the new configuration option 'resolve_binds_by_sym'
which can be set globally or per-device. It is off by default, which
preserves the current behavior.

This setting only affects the behavior of keybinds that are defined via
key symbols, not those defined via keycode. Binds defined by symbols
currently activate if the keycode pressed would generate the specified
symbol on the first layout specified in the input section.
If enabled, keys pressed on the relevant device will instead match
keybinds by the symbols they produce with their current layout.

Closes #1881.
2024-02-27 23:21:22 +00:00
e3373669e5 wayland: implement keyboard_shortcuts_inhibit_v1
fixes #4568
2024-02-27 23:15:24 +00:00
Philip Damianik
60f81b8a23
input: Map touch devices and tablets bound to an output (#3544)
* Map bound touch devices and tablets to an output

* Add "[[Auto]]" default option for auto detecting outputs for touch inputs

* Bind new monitors to configured touch and tablet devices

* Use Monitor::matchesStaticSelector in CConfigManager::getMonitorRuleFor

* Use Monitor::matchesStaticSelector in CCompositor::getMonitorFromString
2024-02-27 22:11:59 +00:00
ffd7217243 IME: don't set modifiers on grab destroy 2024-02-27 12:23:45 +00:00
f7a3453487 socket2: move to the wayland event loop 2024-02-26 17:20:51 +00:00
Bernd Müller
1742605eb8
keybinds: fix movewindoworgroup onto empy workspace on next monitor (#4486)
* fix: movewindoworgroup when no window or group is in desired direction, e.g. move window onto empty workspace on next monitor

* fix: movewindoworgroup when no window or group is in desired direction, e.g. move window onto empty workspace on next monitor

* reset flake.nix

* add: changes mentioned in review of #4486
2024-02-26 14:05:24 +00:00
9815402074 keybinds: focus floating on top of fs 2024-02-26 00:15:59 +00:00
shezdy
a14f6b570f
keybinds: fix focuswindow for fullscreen (#4840)
* focuswindow fix

* fix format

---------

Co-authored-by: ddmetz <77217897+ddmetz@users.noreply.github.com>
2024-02-26 00:05:20 +00:00
7fbe016c15 animationmgr: expand layer box for damage 2024-02-22 15:34:18 +00:00
cd73dda16e sessionLock: send preferred fractional scale 2024-02-20 16:13:01 +00:00
rszyma
69a4f08dbe
keybinds: fix keys without keysyms triggering random binds (#4739) 2024-02-19 00:02:03 +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
Federico Maria Morrone
5261a8df81
keybinds: Add an option to pass a window argument to moveoutofgroup (#4724)
* keybinds: allow passing window to moveoutofgroup

* keybinds: cleaner handling of certain args
2024-02-17 22:44:22 +00:00
epicgamer256705
289d952a6e
dispatchers: add Fullscreen without sending fullscreen to application (#4720)
* Add extra option to fullscreen

* Remove useless branch

fixes #1817

---------

Co-authored-by: matteo bob <matteo4375@gmail.com>
2024-02-17 16:21:06 +00:00
294e51a857 input: refocus on completed drags 2024-02-17 16:02:17 +00:00
e5ac970d6e input: fix follow_focus 2024-02-15 01:51:01 +00:00
770956b092 input: don't schedule frame on cursor move on hw cursors
spams unnecessary frames. Maybe we should ignore empty damage frame requests too?

ref #3747 #3490
2024-02-15 01:26:48 +00:00
3cca36e773 input: avoid rampant refocuses on popups 2024-02-15 01:24:40 +00:00
b7ab15dc80 input: log cursor image requests 2024-02-15 00:59:04 +00:00
Niklas Haas
d5950f7719
dwindle: add swapsplit dispatcher (#4702)
This is distinct from `swapwindow` in that it allows swapping the entire
tree node with its neighbour.

Fixes: https://github.com/hyprwm/Hyprland/issues/4701
2024-02-14 17:58:28 +00:00
890307532c input: avoid reassigns of unchanged surfaces in processMouseRequest 2024-02-12 20:02:00 +00:00
e4bb5fa4af input: focus monitor on mouse down
fixes #4649
2024-02-10 17:39:53 +00:00
658f718fa3 input: partially revert #4514
issues with refocus in #4649
2024-02-10 17:05:38 +00:00
Sefa Eyeoglu
334a0f03ee
keybinds: Fix focus not moving along when moving workspace (#4660)
---------

Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
2024-02-09 23:47:00 +00:00
Epilepsy Gatherings
8a6e428d32
keybinds: focusWorkspaceOnCurrentMonitor: use focused monitor instead (#4625) 2024-02-05 22:36:22 +00:00
1fd82e37a7 xwaylandmgr: proper clamping for setWindowSize
closes #4622 fixes #4621
2024-02-05 20:56:20 +00:00
f9202f791e xwaylandmgr: clamp size in setWindowSize
fixes #4586
2024-02-05 14:08:08 +00:00
939696f97e hyprctl: move to a class and unify commands 2024-02-05 01:56:49 +00:00
MightyPlaza
cbadf3e3f3
input: focus window on mouse down on decoration (#4514)
Also unifies vectorToWindow funcs
2024-02-04 15:40:20 +00:00
4644de2269 keybinds: fix ignoremods with release 2024-02-02 01:09:57 +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
Zach DeCook
df17991b1c
input: Allow disabling touchscreen input (#4517)
* enable/disable touch device

* ConfigManager: update documentation of 'enabled'
2024-01-24 00:15:01 +00:00
b86ed02d8a keybinds: avoid duplicated held keys, only use last, remove all
ref #4471
2024-01-19 19:09:32 +01:00
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
307dd8f511 input: partially revert #4401
ref #4465
2024-01-17 14:43:38 +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
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