Commit Graph

417 Commits

Author SHA1 Message Date
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
Vaxry 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
Vaxry 13886a264f internal: add a new monitor auto system 2023-08-14 14:22:10 +02:00
Vaxry 3f7f4207a6 config: add vrr per-display 2023-08-11 17:37:57 +02:00
Vaxry 60b548296d internal: move backtrace to specific func 2023-08-11 17:22:19 +02:00
Vaxry cbb899740c rules: add layer and window xray rules 2023-08-09 22:03:31 +02:00
Vaxry 261c3307f7 internal: cleanup headers in helpers/ 2023-08-07 13:36:14 +02:00
Vaxry a077b7a92e animationmgr: avoid redundant ticks 2023-08-05 23:29:33 +02:00
romanstingler 7d98181ade
xwayland: drop wlr_xwayland_surface.events.set_pid (#2884)
Co-authored-by: Roman Stingler <roman.stingler@waterdrop.com>
2023-08-03 21:40:56 +02:00
vaxerski 6c1f4faff2 animationmgr: avoid looping over all avars in favor of only active ones 2023-07-20 19:26:10 +02:00
vaxerski a3f6a72a51 region: allow ctor from pixman_box32_t 2023-07-20 18:27:28 +02:00
vaxerski 7091d4e597 animationmanager: optimize avar state 2023-07-19 22:40:03 +02:00
Vaxry 89b87158db
internal: Wrap regions (#2750) 2023-07-19 20:09:49 +02:00
vaxerski 2623364dbd no_xwayland: fix redef 2023-07-19 00:33:47 +02:00
vaxerski ce9c5fd722 render: set refresh to 0 for both wl and x11 backends 2023-07-19 00:28:15 +02:00
vaxerski 0ba28a46fd monitor: unplug all callbacks in ~dtor 2023-07-18 15:36:27 +02:00
vaxerski 629e61c7a5 monitor: disconnect bind on disconnect 2023-07-18 15:22:49 +02:00
Daniel Adolfsson 64e7d5345d
Add support for smart splitting (#2676)
* Add support for smart splitting

* clang-format

* smart_split default to 0, and make smart_split behave like preserve_split
2023-07-11 13:37:25 +02:00
vaxerski 515a363ecd render: move lastFrameDamage to CMonitor 2023-07-10 13:21:00 +02:00
vaxerski 42f46aeac5 config: minor path handling fixes 2023-07-10 13:10:34 +02:00
Mykola Perehudov bbedb065e1
eventmanager: drop obsoleted ignore events flag (#2660)
This flag became obsoleted in commit
287e6c4ede
2023-07-06 15:23:11 +02:00
Vaxry 01f85a09a9 xwayland: send zero scaling to xwayland if enabled 2023-06-23 21:42:44 +02:00
vaxerski fbabb105c3 gamma: use wlr's new gamma manager event 2023-06-14 13:26:47 +02:00
Vaxry 6beb79f27b xwayland: add force_zero_scaling 2023-06-11 21:52:13 +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
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
Vaxry 871ab24c6e internal: properly set monitor props on special windows 2023-06-02 20:14:34 +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
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
Anthony Ruhier d7935356da
input: don't move monitor focus on wp change (#2320) 2023-05-17 13:32:59 +01: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 7fde80f38e layers: fix wonky focus on multimon 2023-05-09 17:01:18 +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
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 afe8d8dfec monitors: fix some bugs with re-plug 2023-05-06 16:50:15 +01:00
vaxerski 83cd5e2ebd workspaces: minor fixes for multi-special 2023-05-06 16:10:51 +01:00
vaxerski 8435d6fc12 monitors: toggle special on changeworkspace with special 2023-05-05 15:01:31 +01:00
vaxerski fd3e6a3bfd workspaces: restore monitor on re-plug 2023-05-03 15:15:56 +01:00
vaxerski 45b1e6dc5e keybinds: simulate workspace switch on focusWindow to another ws 2023-05-01 15:39:08 +01:00
vaxerski 6501bceb42 workspace: don't check LS-es in startAnim 2023-04-30 01:13:58 +01:00
vaxerski 3580f845e6 monitor: update fullscreen fade on workspace change 2023-04-30 01:12:20 +01:00
vaxerski 1a1656ddbf Revert "internal: include headers from protocols/"
This reverts commit 550700bed0.

We can't cuz meson
2023-04-27 13:55:13 +01:00
vaxerski 550700bed0 internal: include headers from protocols/ 2023-04-27 13:40:38 +01:00
vaxerski 412d46ff65 monitors: set special monitor ID on open 2023-04-17 22:58:59 +01:00
vaxerski 8b3d8dc792 Format: use %lx for all addresses 2023-04-17 17:35:28 +01:00
vaxerski 7c36a3e167 internal: move workspace special check higher in changeWorkspace 2023-04-17 13:32:35 +01:00
vaxerski b05ff89c76 Render: add cursor_zoom 2023-04-16 14:48:38 +01:00
dann-merlin c86f06caa0
Fix possible usage of clamp with lo > hi in Vector2D (#2049) 2023-04-16 01:27:14 +01:00
vaxerski afc887d941 monitor: recalc layout on switched ws 2023-04-16 01:11:57 +01:00
vaxerski d6c4ae71d0 damage: fix damage on moves / workspace changes 2023-04-15 16:16:33 +01:00
vaxerski 727160f0a4 workspaces: fixup workspaces not activating on workspace switch 2023-04-14 15:28:22 +01:00
vaxerski 8dd0c4fe74 workspaces: deactivate all on monitor switch 2023-04-14 15:08:27 +01:00
vaxerski 287e6c4ede internal: workspace manip handling rework 2023-04-14 15:03:53 +01:00
vaxerski 41c7d896e3 internal: prevent premature destroy in moveworkspace 2023-04-13 21:09:50 +01:00
vaxerski a22e1174ee screencopy: implement dmabuf 2023-04-12 21:40:51 +01:00
Hilmar Wiegand 7b43f9f056
Implement window move (#2018) 2023-04-10 20:07:49 +01:00
vaxerski 41d1fdedf2 output: handle needs_frame 2023-04-07 17:25:56 +01:00
vaxerski cd1b982b2a internal: listen to output.damage events 2023-04-07 16:31:55 +01:00
vaxerski d8645cd148 internal: release buttons on unmap 2023-04-07 12:54:11 +01:00
vaxerski c9f7afbf78 subsurfaces: guard node's surface 2023-04-07 12:36:26 +01:00
vaxerski 24ace03780 internal: migrate to damage_ring 2023-04-07 12:18:40 +01:00
vaxerski 00d199b477 monitors: guard scale in onConnect 2023-04-04 22:54:35 +01:00
Jan Beich 16bc5997bb
Misc FreeBSD fixes (#1926)
* helpers: drop incomplete GNU/kFreeBSD bits

Debian with FreeBSD kernel lacks Wayland-related packages and is not
officially supported since Jessie.

* KeybindManager: check VT ioctl availability instead of hardcoding

* plugins: add missing header for libc++ after 430778293e

src/plugins/PluginAPI.cpp:299:33: error: implicit instantiation of undefined template 'std::basic_istringstream<char>'
    std::istringstream          inStream(SYMBOLS);
                                ^
/usr/include/c++/v1/iosfwd:140:32: note: template is declared here
    class _LIBCPP_TEMPLATE_VIS basic_istringstream;
                               ^

* plugins: prefer llvm-nm with Clang after 430778293e

nm: invalid option -- j
2023-03-31 20:39:04 +01:00
Vaxry a80f8f257f
Feat: Introduce render_ahead_of_time (#1863) 2023-03-24 19:23:16 +00:00
vaxerski b3a70b565e subsurfaces: avoid reading destroyed surfaces 2023-03-24 18:44:42 +00:00
vaxerski a3fda12ba1 window: unassign surface on unmap 2023-03-23 00:39:32 +00:00
vaxerski 0268bb9888 surface: set to nullptr after destroy() 2023-03-23 00:22:49 +00:00
Vaxry 788a8f7c13
internal: wrap wlr surfaces (#1822) 2023-03-20 15:00:58 +00:00
vaxerski 00c2ca4697 config: improve ux on workspace and transform 2023-03-18 16:12:43 +00:00
vaxerski e5870d47c7 LS: add blur and ignorezero rules 2023-03-17 23:16:13 +00:00
vaxerski 4b52c1e68f monitors: remove from monitors on unsafe 2023-03-16 16:33:27 +00:00
vaxerski 162f235972 switches: do not fire on no change in toggle 2023-03-16 16:30:22 +00:00
Vaxry 5dc1a5fec6
input: text-input-v1 support (#1778)
support zwp_text_input_v1

---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
2023-03-14 12:57:50 +00:00
vaxerski e749af7b60 dispatchers: remember named workspaces in prev 2023-03-13 15:19:25 +00:00
opsu 0c8d1ba4a8
Buffer overflow fix (#1707) 2023-03-05 18:16:42 +00:00
Vaxry 1ead6c46f4 Mirrors: minor fixes 2023-03-04 00:48:22 +00:00
vaxerski 64f35c0e31 Bezier: Fix incorrect binary search in bezier approx 2023-03-03 13:33:52 +00:00
vaxerski 62e0c9226e Up the bezier bake count 2023-03-03 13:17:11 +00:00
vaxerski c5aa20f226 fix bezier step approx 2023-03-03 13:08:46 +00:00
Vaxry 8b81f41e52
Plugin System (#1590)
---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
2023-02-27 12:32:38 +00:00
vaxerski f1c9077139 unblock pure wayland compiles 2023-02-21 23:57:08 +00:00
Jan Beich 474ada9267
Unbreak CrashReporter on FreeBSD (#1589) 2023-02-20 14:15:15 +00:00
Vaxry 1b56cc4e99
Added an Event Hook System (#1578)
* added an eventHookSystem

* Add all socket2 events to hooks
2023-02-19 20:54:53 +00:00
vaxerski 38c25bb50d Added a crash reporter 2023-02-19 13:45:56 +00:00
Ching Pei Yang c92e0c05e4
Resize on border (#1347) 2023-02-18 22:35:31 +00:00
Vaxry 4ea4efb871 add prev to getWorkspaceIDFromString 2023-02-09 14:15:42 +00:00
Vaxry 494103b521 add missing xwayland stub 2023-02-03 14:12:28 +00:00
ozwaldorf 32d56fec97
feat: border angle animations (#1469)
Co-authored-by: vaxerski <43317083+vaxerski@users.noreply.github.com>
2023-02-01 21:06:01 +00:00
vaxerski 11234529db Simulate mouse movement on unmap of popups and subsurfaces 2023-01-31 00:26:15 +00:00
Jan Beich f90ff8303b
Unbreak build with libc++ (#1457) 2023-01-31 00:03:23 +00:00
Vaxry ef12120270 fixup LS scaling impl 2023-01-29 15:58:36 +00:00
Jan Beich ff9bcb19fa
Allow to disable X11 backend separately from Xwayland after 5a750b485a (#1445) 2023-01-29 12:43:18 +00:00
vaxerski 8ae1fd0173 added layer rules 2023-01-25 15:34:13 +00:00
vaxerski 84954f376f remove restrictions from setprop for ints 2023-01-24 21:44:54 +00:00
vaxerski cb6e36d804 ignore null ls-es in cleanup 2023-01-23 18:23:44 +00:00
Vaxry cb98242ea7 remove old comment and fixup lsl var name 2023-01-22 17:03:25 +01:00