Commit graph

3829 commits

Author SHA1 Message Date
5b6d54cae0 xdg_shell: ignore outdated ack_configure events 2024-06-08 10:57:37 +02:00
Vaxry
6967a31450
wayland/core: move to new impl (#6268)
* wayland/core/dmabuf: move to new impl

it's the final countdown
2024-06-08 10:07:59 +02:00
c31d9ef417 xdg_shell: fix nested xdg_positioner calculations
ref #6240
2024-06-07 20:24:09 +02:00
6b6b02c27a seat: send events to all bound seats for a client
some apps are legitimately braindead and bind wl_seat a bazillion times and expect the events to be sent to all of them

ref #6159
2024-06-07 20:24:06 +02:00
John M. Harris, Jr
40ce17bbbd
gestures: Add gestures:workspace_swipe_min_fingers option (#6342)
When gestures:workspace_swipe_min_fingers is enabled,
gestures:workspace_swipe_fingers is considered to be the minimum
number of fingers required to swipe.

This behavior is more similar to sway and macOS's default behavior.

For example, this allows you to set workspace_swipe_fingers to 3,
but swipe with 4 or more fingers instead of 3.
2024-06-07 19:54:08 +02:00
memchr
41e1147dfc
input: add cursor:persistent_warps to maintain relative position within a window (#6338)
Allows the cursor to return to its last relative position within a window when the window is refocused.

Allows the cursor to retain its relative position within a window when the window is swapped, moved, changed workspace, added to or removed from groups.

controlled with cursor:persistent_warps
2024-06-07 19:52:15 +02:00
9bc00897fc xdg_shell: improve xdg_positioner slide behavior
ref #6240
2024-06-07 19:46:51 +02:00
d6337146bb xdg_shell: improve xdg_positioner resize calculations
ref #6240
2024-06-07 18:42:38 +02:00
John M. Harris, Jr
429cff340d
hookSystem: Make needsDeadCleanup volatile (#6356)
The value of needsDeadCleanup would be clobbered after longjmp,
having an undefined value.
2024-06-07 18:31:27 +02:00
Tom Englund
af5f24929d
core: free more memory on destruction (#6348)
* pointermgr: add destructor to state and free buf

if the pointer has a buffer set it wont be freed upon destruction, make
asan more happy by adding a destructor and wlr_buf_unlock it on exit.

* cursormgr: free the animation timer event source

properly free the animation timer event source on destruction.

* compositor: free the critsig event source on exit

properly free the critical signal event source on exit.

* popup: clang format style

clang format.
2024-06-06 20:27:09 +02:00
giskard
c95845b148
log: log with local timezone (#6331)
* log: log with local timezone

* log: backward compatability for clang 17 with libc++
2024-06-05 18:30:46 +02:00
phonetic112
82099fd1c0
hyprctl: Allow setting name for custom/headless outputs (#6319) 2024-06-05 18:26:38 +02:00
155fe6f165 popup: minor safety improvements 2024-06-05 16:53:49 +02:00
memchr
fefa55d406
build: fix non-pch build (#6337) 2024-06-05 10:42:44 +02:00
Agent00Ming
d0a224a491
seat: discrete round away from zero + high res scrolling (#6317)
* Discrete scrolling round away from zero
e.deltaDiscrete can be multiples of 30 instead of the usual 120 causing
the rounded value to be 0 when too small causing erratic scrolling.

* Send value120 alongside discrete
Fixes sensitivity issues for clients that support value120 axis events
2024-06-03 22:47:02 +02:00
5517cc506b xwayland: don't destroy server client
this potentially leaks, but avoids a UAF

ref #6323
2024-06-03 21:13:38 +02:00
0ac0f32671 toplevelexport: avoid locking software cursors during render
this may trigger a render begin/end and fuck up the pass

fixes #6277
2024-06-03 21:10:31 +02:00
b30c7125d7 window: avoid nullptr deref on monitor in box helpers
fixes #6321
2024-06-03 21:09:18 +02:00
3fd6c1b30e layout: fix centering of new floating windows
ref #6154
2024-06-03 18:46:20 +02:00
Tom Englund
eaecf7db14 core: fix a few asan reported issues and a coredump on exit (#6285)
* xwayland: add destructor to CXWM and free resource

the wl_event_resource was running upon destruction of the compositor
causing a null pointer segfault in onX11Event so ensure the event is
removed upon destruction, also free the memory allocated by
xcb_errors_context_new and finally call xcb_disconnect on the connection
to free the fd and its memory.

* hyprctl: dont leak the fd on destruction

add a destructor and properly free the fd on destruction

* eventloop: add destructor and free event source

properly free the wl_event_source upon destruction.
2024-06-03 18:46:20 +02:00
wouter@wouterbijlsma.nl
e08195d240 Fix initial xdg-decoration toplevel decoration mode negotiation
Clients using zxdg_decoration_manager_v1::get_toplevel_decoration may
expect a receiving a zxdg_toplevel_decoration_v1::configure event to
determine the initial decoration mode, without having to go through a
zxdg_toplevel_decoration_v1::set_mode request. Hyprland was not sending
this event, resulting in unwanted decorations being drawn.

Specifically, clients using libdecor, e.g. applications using recent
GLFW, would draw GTK decorations with artefacts. This change fixes
these.
2024-06-02 23:11:55 +02:00
66acdfe2ad seat: don't send keymap on empty device 2024-06-02 18:38:36 +02:00
shezdy
0ebb43c1a3
renderer: fix xwayland solitary rechecks (#6295) 2024-06-01 20:45:30 +02:00
obivan
df6ebe358b
pointer: Include monitor scaling in HW hotspot calculation (#6283) 2024-05-31 12:38:52 +02:00
a60c7283e6 xwayland: verify new xsurf is valid in prop reads
fixes #6250
2024-05-29 09:34:25 +02:00
giskard
ebf258788e
config: add tag dispacther and window rule (#6211) 2024-05-28 23:37:24 +02:00
Ikalco
73b133d015
hyprctl: Make setcursor better (support XCursor themes, give fail message) (#6097)
* add support for changing to X cursor themes

* use new hyprcursor abi for options

* remove unneeded struct
2024-05-28 23:35:18 +02:00
Connor Wong
722d537a91
windows: make new_window_takes_over_fullscreen use the new window's workspace (#6263)
* fix new_window_takes_over_fullscreen behavior

* missed a few things
2024-05-27 22:45:32 +02:00
AERDU
506d0c06e6
compositor: change monitor focus when no_warps is enabled (#6260)
fixes focus between monitors when moving using directions with no_warps = true
2024-05-27 22:45:14 +02:00
Flafy
546a486bab
hyprctl: add delimiter to hyprctl batch command (#6261)
adds a delimiter of 3 newlines to separate different command outputs
2024-05-27 22:31:35 +02:00
Jan Beich
db5d39a66f meson: add more xcb-* dependencies after addd3e7f1a
ld: error: undefined symbol: xcb_icccm_get_wm_hints_from_reply
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::readProp(CSharedPointer<CXWaylandSurface>, unsigned int, xcb_get_property_reply_t*))

ld: error: undefined symbol: xcb_icccm_get_wm_size_hints_from_reply
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::readProp(CSharedPointer<CXWaylandSurface>, unsigned int, xcb_get_property_reply_t*))

ld: error: undefined symbol: xcb_errors_get_name_for_major_code
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::handleError(xcb_value_error_t*))

ld: error: undefined symbol: xcb_errors_get_name_for_minor_code
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::handleError(xcb_value_error_t*))

ld: error: undefined symbol: xcb_errors_get_name_for_error
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::handleError(xcb_value_error_t*))

ld: error: undefined symbol: xcb_xfixes_id
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::gatherResources())
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::gatherResources())

ld: error: undefined symbol: xcb_composite_id
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::gatherResources())

ld: error: undefined symbol: xcb_res_id
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::gatherResources())
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::gatherResources())

ld: error: undefined symbol: xcb_xfixes_query_version
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::gatherResources())

ld: error: undefined symbol: xcb_xfixes_query_version_reply
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::gatherResources())

ld: error: undefined symbol: xcb_res_query_version
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::gatherResources())

ld: error: undefined symbol: xcb_res_query_version_reply
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::gatherResources())

ld: error: undefined symbol: xcb_render_query_pict_formats
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::getRenderFormat())

ld: error: undefined symbol: xcb_render_query_pict_formats_reply
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::getRenderFormat())

ld: error: undefined symbol: xcb_render_query_pict_formats_formats_iterator
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::getRenderFormat())

ld: error: undefined symbol: xcb_render_pictforminfo_next
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::getRenderFormat())

ld: error: undefined symbol: xcb_errors_context_new
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::CXWM())

ld: error: undefined symbol: xcb_composite_redirect_subwindows
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::CXWM())

ld: error: undefined symbol: xcb_xfixes_select_selection_input
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::initSelection())

ld: error: undefined symbol: xcb_render_create_picture
>>> referenced by XWM.cpp
>>>               src/Hyprland.p/xwayland_XWM.cpp.o:(CXWM::setCursor(unsigned char*, unsigned int, Vector2D const&, Vector2D const&))

ld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
2024-05-27 12:24:37 +03:00
Gabriel Ford
553232a3e4
hyprctl: Add Config Flag to hyprctl systeminfo (#6160) 2024-05-25 22:46:07 +02:00
Vaxry
addd3e7f1a
xwayland: move to hyprland impl (#6086) 2024-05-25 22:43:51 +02:00
90f262aada pointer: remove dividing hotspot by scale
fixes #6117
2024-05-25 20:43:38 +02:00
Can
ce17961aad
keybinds: Added new dispatcher (sendshortcut) (#6174) 2024-05-24 20:58:26 +02:00
6d67b84469 monitor: avoid UB on undefined auto dir
ref #6217
2024-05-24 20:56:53 +02:00
thejch
0d6eae0523
pointer: add back nvidia hardware cursor quirks (#6220) 2024-05-24 20:50:22 +02:00
52684b7d90 window: fix invalid env buffer size in getEnv 2024-05-24 20:40:15 +02:00
Tom Englund
4e42107d25
pointermgr: ensure compositor exist on destroy (#6216)
on exit of hyprland the CMonitor destroy signal comes after the
compositor has been destructed, causing a heap use after free. add if
check to ensure compositor exist and isnt shutting down when its
triggered.
2024-05-23 21:19:14 +02:00
Alessio Molinari
eea0a6a704
internal: Replace monitor rule when disabling head. (#6136)
Closes #5978
2024-05-23 21:15:31 +02:00
System64
255272ea18
debug: Add ARM GPU info (#6212)
Added a simple way to get basic info about the GPU on ARM based systems
2024-05-23 18:04:39 +02:00
Ming-Chuan
df80fbf706
tablet: fix mapping when mapped region is specified (#6206)
When `region_size` is set in the config (non-empty
`boundBox`), cursor is mapped to wrong coordinate because
`CBox::translate` mutates `TAB->boundBox`, making all subsequent coordinate
calculations wrong.

This also fixes the edge case where user sets `region_position` but
not `region_size`.
2024-05-23 13:52:32 +02:00
shezdy
25b9446949
internal: save previous workspace before change (#6202) 2024-05-23 13:01:12 +02:00
62401d5b3f screencopy: use a simple renderer for frame passing 2024-05-23 00:42:16 +02:00
3775776a07 window: guard monitor in bounding box calculations
fixes #6190
2024-05-22 22:37:16 +02:00
shezdy
155ae3721c
keybinds: Add option to disable window direction monitor fallback (#6182)
* add monitor fallback option

* format
2024-05-22 21:51:46 +02:00
giskard
93fea89043
renderer: render fonts with pango, add global font_family config option (#6138) 2024-05-22 10:09:36 +02:00
baef55da1d xdg-shell: fixup positioner behavior with slide and resize
if sliding and resizing, include the slide in the resize to avoid off-screen surfaces.

fixes #6150
2024-05-21 14:50:33 +02:00
f8857e6072 input: find surface pos correctly when mouse drag is active
fixes #6144
2024-05-18 21:20:01 +01:00
Gabriel Ford
c21a5a9340
layout: Fix shrinking pseudotile windows. (#6143) 2024-05-18 19:28:48 +01:00
2ead1fd221 virtual-keyboard: emit event before finishing keyboard
ref #6123
2024-05-17 20:07:33 +01:00
49485ba36a pointer: damage in software mode on cursor image changes
fixes #6126
2024-05-17 20:04:17 +01:00
fe23d2b639 window: verify suppress flags in onUpdateState
ref #6108
2024-05-17 19:54:05 +01:00
9518cec833 popup: clip input region to surface size
fixes #6125
2024-05-17 19:43:56 +01:00
23cd4c7998 seat: update keymap/repeat info on keymap events from keebs
fixes #6114
2024-05-17 19:28:33 +01:00
Tuur Vanhoutte
0cb8fbe18e
error: Add option to change position of HyprError bar (#3241) (#6111) 2024-05-17 19:06:51 +01:00
f21b6fe576 tablet: avoid null deref on an empty cursor set
fixes#6116
2024-05-17 14:51:06 +01:00
abbe71d26d pointer: don't update hw cursors on disabled displays 2024-05-16 19:34:36 +01:00
Agent00Ming
3ac0e7ead1
seat: Send discrete event when axis source is scroll wheel (#6103)
modified:   src/managers/SeatManager.cpp
	modified:   src/managers/input/InputManager.cpp

Co-authored-by: Agent_00Ming <agent00ming9366@gmail.com>
2024-05-16 13:30:55 +01:00
Gabriel Ford
d693c44836
keybinds: add keybind combos and add Left and Right mod distinction. (#5966) 2024-05-16 11:48:30 +01:00
zakk4223
ca0833c9ed
decoration: Stacked group tabs (#5886)
* Stacked group tabs

* Fix index when creating groupbar title textures

* Changes for stacked dnd

* formatting

* Don't remove internal horizontal padding when calculating stacked bar
width
2024-05-16 11:38:10 +01:00
de9798fcf9 configmgr: shadow exec rules when window is unmapped
fixes #6091
2024-05-16 00:55:55 +01:00
7e8c0b7f30 seat: send axis_stop events after axis events
fixes #6090
2024-05-15 23:13:51 +01:00
9eec4cb670 sysd: add missing header
ref #6094
2024-05-15 23:01:50 +01:00
JManch
a8522db683
keybinds: fix empty on monitor for new workspaces (#6089) 2024-05-15 21:03:51 +01:00
b9c58b6e75 seat: send enter/leave events to all bound wl_seats for a client
fixes #6069

Will not send anything beyond enter/leave. If you depend on multiple seats sending you motion, button, etc, events, fix your app.
2024-05-15 19:33:42 +01:00
3381e2b55b datadevice: guard surface in dnd for null
fixes #6076
2024-05-15 16:26:02 +01:00
7fbe05a250 inputmgr: send pointer motion on ffm != 1
fixes #6077
2024-05-15 16:22:45 +01:00
Sungyoon Cho
31890026ea
wl_seat: send frame event after pointer leave (#6074) 2024-05-15 12:17:56 +01:00
94c20a1863 primary-selection: move to hyprland impl 2024-05-14 23:13:35 +01:00
eed1361f39 wlr-data-device: move to hyprland impl 2024-05-14 23:13:35 +01:00
7eeee2c94e wl-data-device: move to hyprland impl 2024-05-14 23:13:35 +01:00
fc72df8e58 seatmgr: Add a grab class 2024-05-14 23:13:33 +01:00
0cfdde3d1a xdg-shell: move to new impl 2024-05-14 23:02:24 +01:00
121d3a7213 wl_seat: move to hyprland impl 2024-05-14 23:02:24 +01:00
4cdddcfe46 cursor: minor fixes for unhiding surfaces
the surface equality check is done in CPointerManager, the one in renderer can be wrong

fixes #5975
2024-05-14 16:45:12 +01:00
Sungyoon Cho
d0a4a0e0d8
input: fix modifier and leds (#6062) 2024-05-14 16:14:43 +01:00
Daniil
1584679004
xwayland: Remove delta for real position with xwayland zero scaling (#6057) 2024-05-14 13:33:20 +01:00
ba69652193 window: set sane default pseudo size 2024-05-13 22:21:06 +01:00
Paul
064bdb06f1
hyprctl: Add locked cmd to requests (#6042)
Co-authored-by: Leftas <info@leftas.dev>
2024-05-13 14:57:06 +01:00
fd35b35000 keybinds: fix pass
reverts #5967

fixes #6022
2024-05-12 16:01:01 +01:00
Brenno Lemos
33a7b7bb6b
core: fix on-empty workspace being called too often (#6026) 2024-05-12 00:03:32 +01:00
shezdy
15072831cf
keybinds: fix release binds in submaps (#6025) 2024-05-12 00:02:26 +01:00
8562d38477 screencopy: don't spam sw cursor locks 2024-05-11 22:10:42 +01:00
494b9415a1 layersurface: avoid restack on identical layers
ref #6014
2024-05-11 18:31:50 +01:00
b6a7fb9e91 layersurface: fix invalid use of std::move
fixes #6014
2024-05-11 14:43:44 +01:00
Sungyoon Cho
3529fbc6d4
compositor: fix getMonitorFromVector getting wrong monitor (#6010) 2024-05-11 10:35:20 +01:00
19186de118 renderer: avoid locking during rendering
it can trigger pointermgr to render which fucks up our pass

fixes #5998
2024-05-10 23:38:46 +01:00
38911d6df4 box: fix noNegativeSize 2024-05-10 12:59:01 +01:00
underengineering
37a84c5223
socket2: fix events being reordered (#5955)
* socket2: fix events being reordered

* remove WL_EVENT_READABLE

* initialize eventSource in SClient

* add more logs

oopsie

* replace unordered_map with vector

* fix reordering when socket becomes writable before queue is flushed

* ignore EAGAIN when accepting connection

* use g_pEventManager
2024-05-10 12:32:50 +01:00
MightyPlaza
c19903eaf8
windowrules add focusonactivate (#5976)
modified:   src/config/ConfigManager.cpp
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp
2024-05-10 12:27:54 +01:00
2549f0cc97 layersurface: reset popuphead after unmap
fixes #5980
2024-05-10 12:03:38 +01:00
3374229118 core: remove unused includes and fix warn 2024-05-10 03:20:26 +01:00
2ba6bb69c4 popups: fix breadthfirst and at
fixes #5977
2024-05-10 02:38:56 +01:00
db30ff63e6 popups: avoid infinite recursion in bf 2024-05-10 02:38:56 +01:00
a7e23d2f1e presentation-time: move to new impl 2024-05-10 02:38:54 +01:00
1753059b07 pointermgr: reset entered outputs when resetting surface
fixes #5970
2024-05-09 23:08:40 +01:00
b0861b6709 config: move various cursor-related vars to cursor: 2024-05-09 22:25:20 +01:00
sub-kek
7cf810b181
keybinds: Fix classic global keybinds(pass dispatcher) (#5967) 2024-05-09 22:05:13 +01:00
4f26ae70fd core: drop unused protocol impls
xdg_foreign is not used by hyprland

wlr_export_dmabuf is old, broken and unused as well
2024-05-09 22:02:19 +01:00