Commit Graph

2405 Commits

Author SHA1 Message Date
Vaxry cabdf38ce4 internal: minor style fixes 2023-06-20 21:35:54 +02:00
Vaxry 2295bbdd80 xwaylandmanager: fixup style 2023-06-18 18:14:52 +02:00
Shemig 74ca81cc79
Partial revert of Commit 302ec13: (#2539)
Fix crash when screen size is 0x0 (#2523)

Reason: The disable of a monitor with 0x0 size
is causing issuses with some users.

https://github.com/hyprwm/Hyprland/issues/2537

Left the defensive code to resolve the crash.
Will continue to investigate and find a solution for the
dell xps disabled monitor

Co-authored-by: giladsx <gilad@spectalix.com>
2023-06-17 18:49:37 +02:00
vaxerski 5ac625d7bd format: fix hooksystem 2023-06-16 18:45:14 +02:00
Shemig 302ec1372c
Fix crash when screen size is 0x0 (#2523)
(When booting into laptop clam mode in dell XPS)
and also ignore any screen with size 0x0 in the first place

Co-authored-by: giladsx <gilad@spectalix.com>
2023-06-15 22:07:58 +02:00
vaxerski c4dec4f796 internal: damage window on change group 2023-06-14 19:44:51 +02:00
vaxerski 0f1911a8d4 opengl: fix invalid tex references to tex-less shader 2023-06-14 13:47:57 +02:00
vaxerski e43f7fc98d shader: init uniforms to -1 2023-06-14 13:29:12 +02:00
vaxerski fbabb105c3 gamma: use wlr's new gamma manager event 2023-06-14 13:26:47 +02:00
outfoxxed f0e4f6622e
Implement pass binds (#2503)
* Implement pass binds

Pass binds run the associated dispatcher but do not prevent windows
from receiving the bind.

* Fix pass binds not working properly with release binds

* Rename `pass` to `nonConsuming`
2023-06-14 13:08:56 +02:00
JManch 9a88c19f1a
screenshader: fix uniform variable checks (#2513) 2023-06-14 13:03:20 +02:00
vaxerski 7762ac0173 toplevelexport: ignore defunct windows 2023-06-13 20:13:21 +02:00
vaxerski e8c6d0f51e compositor: don't set dim percent on disabled dim 2023-06-13 18:51:49 +02:00
vaxerski 807b52b019 animationmgr: warp on equal start and goal 2023-06-13 18:50:45 +02:00
vaxerski 0e31eaa157 shadow: drop useless damageEntire() 2023-06-13 18:50:45 +02:00
memchr 24ed9b061f
feat: add variable to customize locked group border color (#2507)
added variables:
- general:col.group_border_locked
- general:col.group_border_locked_active
2023-06-13 12:04:54 +02:00
Vaxry 6beb79f27b xwayland: add force_zero_scaling 2023-06-11 21:52:13 +02:00
Vaxry 64ce06a353 xwayland: add nearest neighbor filtering as an opt 2023-06-11 21:33:59 +02:00
end-4 e1edfde539
Allow setting alpha value for ignorezero layer rule (#2477)
* rename ignorezero to ignorealpha

* allow setting ignorealpha value

This commit allows setting a float value (0-1) for the ignorealpha layer rule.
Does not yet have error handling; invalid ignorealpha layer rule will crash Hyprland.

* add brackets i forgot to add

* prevent crash with invalid ignorealpha value

prevents hyprland from immediately crashing with invalid ignorealpha layer rule
does not log

* don't try to set ignoreAlphaValue if alpha value not specified

* add catch to try, reintroduce ignorezero

- added catch after try cuz i was an idiot
- re-add ignorezero as an alternative to ignorealpha to not introduce a breaking change

* add logging for failed ignorealpha layer rule

* fix get ignorealpha's get VALUE

* check npos and use empty()

* rename VALUE cuz no longer const

* format Shader.hpp
2023-06-11 19:30:31 +02:00
Nicola Guerrera 10fd75c833
zoom: multiply by scale only on mouseZoomUseMouse (#2495) 2023-06-10 23:00:41 +02:00
Vaxry 7932e42507 screenshader: add output uniform 2023-06-10 16:10:26 +02:00
Nicola Guerrera 003993337a
calculate zoom_center based on monitor scale (#2482) 2023-06-10 12:28:00 +02:00
memchr bca3068db2
feat: add lockactivegroup dispatcher (#2478)
* feat: add lockactivegroup dispatcher

The `lockactivewindow` dispatcher takes `lock`, `toggle` or `unlock` as arguments. When a group is locked, no window or group can be added to it, nor can it be added to another group, but the `moveintogroup` and `moveoutofgroup` dispatches are not affected.

Implementation details:

the lock is implement via `SGroupData.locked` flag (defaults to false).

The flag is only relevant to the group head, and upon the group head's succession, the flag will be passed down to the new head. Meanwhile, the old head's flag will be set to false.

The flag is set to false when a group is dismissed.

New condition checks have been added to the dwindle and master layout to check if target group is unlocked (and if the source is also a group and unlocked) before adding windows to the target group.

* refactor: `lockactivegroup dispatcher code ordering
2023-06-09 23:44:18 +02:00
Vaxry cf37922d42 input: update surface input on changeworkspace 2023-06-09 12:20:40 +02:00
eriedaberrie d123835ef5
main: fix segfault when -c is given with no other arguments (#2470) 2023-06-09 12:15:18 +02:00
Franz Berger 4afeedbd56
Fix fractional scale updates in some cases (#2447)
* fix fractional scale update in moveWorkspaceToMonitor

* fix fractional scale update in moveToWorkspace

* Revert "fix fractional scale update in moveWorkspaceToMonitor"

This reverts commit 6612197a38.

* Revert "fix fractional scale update in moveToWorkspace"

This reverts commit 75d9795a06.

* move fractional scale code to updateSurfaceOutputs

* remove duplicate check

* remove superfluous setPreferredScale()
2023-06-06 09:48:07 +02:00
Vaxry 10db5a4fdb xwayland: disconnect events on destroy
thanks Kirill Primak
2023-06-05 20:51:47 +02:00
Vaxry 1a4e6e6a4b window: recalc on deco remove 2023-06-05 09:49:21 +02:00
staz e4e6ddb075
Make movetoworkspace register previous workspace (#2436)
* Make movetoworkspace register previous workspace

* style: no braces + format with clang-format
2023-06-05 09:44:13 +02:00
Vaxry 4ef684f615 hyprctl: recalc layout on setprop 2023-06-04 21:35:23 +02:00
Vaxry 2629cfeeab layouts: make aware of borderSize prop 2023-06-04 21:35:23 +02:00
Vaxry d83e5b8409 internal: make borderSize prop overridable 2023-06-04 21:35:23 +02:00
Vaxry c5a7202cd9 noxwl: add missing stubs 2023-06-03 13:01:32 +02:00
Vaxry 147e962370 deps: update wlroots 2023-06-03 12:20:28 +02:00
Cyril Levis d7db7040d4
feat: add ipc set title window event (#2419)
* feat: add ipc set title window event

* chore: add EMIT_HOOK_EVENT and change event name
2023-06-03 11:18:49 +02:00
Vaxry 871ab24c6e internal: properly set monitor props on special windows 2023-06-02 20:14:34 +02:00
Vaxry ce0f248d20 events: remove old comment 2023-06-02 19:50:02 +02:00
Sinkerine ca3791fed8
[hyprctl] Expose the special workspace id and name of the monitor (#2392)
* [hyprctl] Expose the special workspace id of the monitor

So that we know if a special workspace is shown on a monitor

* [hyprctl] Add special workspace name to the output
2023-06-02 13:25:33 +02:00
Vaxry e76bd43f53 rules: add nodim 2023-05-31 21:11:20 +02:00
Vaxry baf81cdc5d input: force focus on movefocus 2023-05-31 20:59:38 +02:00
Vaxry 9f72d508ae groupbars: fix damage calcs 2023-05-31 19:53:58 +02:00
Vaxry fd73a7f795 gradient: fix warn 2023-05-31 15:55:54 +02:00
vaxerski a7cfbdb854 keybinds: fix tryMoveFocusToMonitor with special 2023-05-29 18:11:37 +02:00
vaxerski 1e3571eb5b layout: don't reset to floating size on drag tiled 2023-05-29 18:05:41 +02:00
vaxerski 5484411232 compositor: disallow sending pinned to special 2023-05-29 17:46:12 +02:00
Jan Beich f1ad270ff8
vector: restore cmath include after 438d063ec6 (#2394)
src/helpers/Vector2D.cpp:27:26: error: no member named 'floor' in namespace 'std'
    return Vector2D(std::floor(x), std::floor(y));
                    ~~~~~^
src/helpers/Vector2D.cpp:27:41: error: no member named 'floor' in namespace 'std'
    return Vector2D(std::floor(x), std::floor(y));
                                   ~~~~~^
src/helpers/Vector2D.cpp:37:17: error: no member named 'sqrt' in namespace 'std'
    return std::sqrt(dx * dx + dy * dy);
           ~~~~~^
2023-05-29 15:12:00 +02:00
Jeremy Huang b3a86952cf
focus: fix #1675 window not scrollable after movefocus (#2390) 2023-05-29 09:52:36 +02:00
outfoxxed 409ff027f8
Fix UAF in animation end callback if callback deletes the animation (#2389)
Removes use after free when the end callback deletes the animation as
long as `m_bRemoveEndAfterRan` is false.
2023-05-29 09:51:58 +02:00
vaxerski 438d063ec6 vector: use c++ stdlib math functions instead of cmath 2023-05-28 22:50:13 +02:00
vaxerski 078ba6daa8 groupbars: add text color opt 2023-05-27 17:46:02 +02:00
Jeremy Huang 8afc2f45c7
focus: make cursor follow movewindow (#2374) 2023-05-27 12:16:50 +02:00
vaxerski 5f4659afef xdgshell: check and conform to rigid float sizes on commit 2023-05-26 14:49:03 +02:00
vaxerski 0887e2ee6e window: reveal current from group on toplevel activate 2023-05-26 13:44:59 +02:00
vaxerski 62e3953f5b master: guard monitor in recalc 2023-05-26 13:41:52 +02:00
vaxerski 9c9b74179c pluginapi: add separate window render events 2023-05-26 13:07:45 +02:00
vaxerski a2bb95fc60 touch: fix double offset in local 2023-05-24 22:19:22 +02:00
vaxerski 12227d7b6a input: only configure newly added touch devices 2023-05-24 22:17:33 +02:00
vaxerski a4c120d608 layouts: ignore direction forces on non-map 2023-05-24 19:23:10 +02:00
eriedaberrie 53285a75ad
hyprctl: fix cut-off json outputs (#2352)
* hyprctl: fix cut-off json outputs

* Address comments
2023-05-24 17:46:56 +02:00
vaxerski f877d68f4f launchanim: fix #2291 2023-05-24 15:49:31 +02:00
vaxerski eb1f832fce decos: recalc on add 2023-05-23 14:26:38 +02:00
vaxerski 799add8659 groupbars: fix reserved area on titles 2023-05-23 14:18:26 +02:00
vaxerski 90cb5fb672 groupbars: make gradients toggleable 2023-05-22 22:07:32 +02:00
vaxerski d1ec314a03 groupbars: conserve VRAM by staticizing textures 2023-05-22 22:06:40 +02:00
vaxerski 7bcc01efb7 groupbars: fix minor alignment issues 2023-05-22 21:43:37 +02:00
vaxerski 206ac000b9 groupbars: add title and gradient rendering 2023-05-22 21:40:32 +02:00
vaxerski 1eb6cfd45c groupbar: make exclusive 2023-05-22 20:52:41 +02:00
vaxerski 088b4a68e6 moveActiveToWorkspace: update last window of old ws 2023-05-22 19:44:10 +02:00
vaxerski 086f724951 wlr_ext_workspaces: honor activate from client + format 2023-05-22 19:36:47 +02:00
Russell Greene ad244190e0
1483: fix crash on last display disconnect (#2344) 2023-05-22 12:18:07 +02:00
maqrrr 9f8c5cb63c
Fix broken pipe crash when event listener terminates (#2339) 2023-05-21 14:38:18 +02:00
Vaxry 5627b70981 input: reset cursor hide timer on tablet 2023-05-20 21:15:21 +02:00
Anthony Ruhier d7935356da
input: don't move monitor focus on wp change (#2320) 2023-05-17 13:32:59 +01:00
Anthony Ruhier 9ef7225532
don't swap workspaces if monitors are the same (#2322)
Return swapActiveWorkspaces early if MON1 and MON2 are equals, to avoid
buggy behavior.
2023-05-17 13:31:03 +01:00
outfoxxed 642030f959
Fix not finding function symbols for hooking (#2292)
Fixes no useful feedback about failing subcommand.
Fixes function hooks breaking when running under a path containing
spaces.

Replaced old usages with this function where possible.
Complex shell usages now use `execAndGetShell` which is equal to the
old function.
2023-05-16 23:39:14 +03:00
Eric_Luo b5b9af508a
bug fix (#2314)
fix float check logic

Co-authored-by: hnboy <hnywolf@gmail.ccom>
2023-05-16 17:43:04 +01:00
vaxerski d68f8ea668 internal: make CAnimatedVariable non-move non-copy 2023-05-16 12:49:59 +01:00
vaxerski 5b84b0fb44 animationmgr: allow empty avars 2023-05-15 17:11:51 +01:00
vaxerski 824813fc6a internal: remove check for negative exact vector args 2023-05-15 15:16:06 +01:00
vaxerski 7c207243e4 input: check for matrix availability in touch config 2023-05-14 13:54:55 +01:00
vaxerski b748b0734f input: don't refocus on closed window 2023-05-14 13:47:43 +01:00
vaxerski 896a78aaa0 lock: add allow_session_lock_restore 2023-05-13 12:36:36 +01:00
vaxerski cc01550aff hyprctl: recalc layout on dynamic workspace 2023-05-12 01:16:27 +01:00
vaxerski 413a36a914 workspacerules: overwrite on existing 2023-05-12 01:15:32 +01:00
vaxerski 86ef85efae layershell: don't enter on unmapped ls 2023-05-12 01:07:46 +01:00
vaxerski f2725a374a render: minor fixes to fullscreen rendering 2023-05-10 18:36:13 +01:00
vaxerski 7fde80f38e layers: fix wonky focus on multimon 2023-05-09 17:01:18 +01:00
vaxerski cc4ccfdbfd internal: use i64 for workspaces in outofbounds 2023-05-09 14:08:05 +01:00
Andrei Alexeyev 2f87e4c2f3
renderer,config: add custom DRM modeline support (#2254)
This allows specifying custom display resolutions for the DRM backend.
This is useful for display overclocking, working around broken EDIDs,
etc. To use this feature, specify a modeline instead of a resolution
in the config, for example:

    monitor = DP-1, modeline 1071.101 3840 3848 3880 3920 2160 2263 2271 2277 +hsync -vsync, 0x0, 1

This example is a custom 3840x2160@120Hz mode with tightened timings.
I use it because the standard timings don't work with my monitor and GPU
combination (M28U with RX580).

The syntax is compatible with Sway and Xorg.
2023-05-09 14:01:45 +01:00
vaxerski e7c2ea9724 layershell: focus if changed keyboard mode 2023-05-08 19:12:01 +01:00
scorpion-26 826dc61e5c
Add "next on monitor or empty" workspace parameter (#2198)
* Add "next on monitor or empty" workspace parameter

Implements the following workspace parameter:
r+x/r-x (i.e. r+1): Behaves similar to the "m" parameter, but can also
select empty workspaces and it doesn't wrap around

* Improve code comments

* Implementation V2 for 'r' workspace param

* Rebase to upstream

Should fix CI

* Always set outName

* Include named workspaces

Currently only considers open/active named workspaces
2023-05-08 14:37:59 +01:00
vaxerski a31dceb2c6 includes: remove redundant from screencopy 2023-05-07 00:11:33 +01:00
vaxerski 1ba7a09bf6 includes: use libdrm prefix for include 2023-05-07 00:11:01 +01:00
vaxerski afe8d8dfec monitors: fix some bugs with re-plug 2023-05-06 16:50:15 +01:00
dtop129 7e5ba5e824
Fixed wrong focus changes when moving background workspaces (#2258) 2023-05-06 16:13:26 +01:00
vaxerski 83cd5e2ebd workspaces: minor fixes for multi-special 2023-05-06 16:10:51 +01:00
vaxerski 7f0738bcb3 varlist: allow using s for std::isspace 2023-05-06 01:16:20 +01:00
vaxerski 583b8842e7 configmanager: fix substr offset in default ws rule 2023-05-06 01:10:05 +01:00
Dashie a8541d5f64
Add split preselection (#2240) 2023-05-06 01:02:18 +01:00
vaxerski 4ad03af544 compositor: don't focus pointer in focusWindow 2023-05-06 00:59:25 +01:00