Tom Englund
77cf651825
protocols: avoid crashing in drmlease ( #7290 )
...
instead of potentially causing wonky behaviour from destructing in the
constructor add the unique_ptr reset to doLater and dont use the not
done constructed protolog in the constructor, call Debug::log directly.
see issue #7240
2024-08-12 19:49:52 +01:00
Tom Englund
4b4971c06f
internal: introduce new types to avoid unsigned int rollover and signed int overflow ( #7216 )
...
* framebuffer: avoid gluint overflow
GLuint was being initialized to -1 and rolling over to unsigned int max,
its defined behaviour but very unnecessery. add a bool and use it for
checking if allocated or not.
* opengl: avoid gluint rollover
-1 rolls over to unsigned int max, use 0xFF instead.
* core: big uint64_t to int type conversion
there were a few uint64_t to int implicit conversions overflowing int
and causing UB, make all monitor/workspaces/windows use the new
typedefs. also fix the various related 64 to 32 implicit conversions
going around found with -Wshorten-64-to-32
2024-08-08 21:01:50 +02:00
ea72831541
wayland/compositor: introduce client commit events
2024-08-07 17:04:49 +02:00
99e9cb5107
drm-syncobj: fixup fd leak with timelines
2024-08-07 16:08:50 +02:00
outfoxxed
b2717cf7fd
xdg-shell: make xdg-positioner flip target greatest available space ( #7209 )
...
When both flip directions use more space than is available, pick the
direction that has more space available instead of just the opposite
of what was initially requested.
2024-08-07 13:26:09 +02:00
b0a70f63e3
wayland/compositor: drop pending buffer ref if synchronous
...
fixes https://github.com/hyprwm/hyprpicker/issues/85
2024-08-06 17:08:22 +02:00
Vaxry
640d161851
renderer: Explicit sync fixes ( #7151 )
...
Enables explicit sync by default for most platforms
`misc:no_direct_scanout` -> `render:direct_scanout`
2024-08-06 15:52:19 +02:00
ae50f8614d
wayland/surface: fixup self-owning surface roles
...
fixes #7133
2024-08-03 17:58:06 +02:00
ab0a3268e0
xdg-shell: fixup unassigned wl surfaces to xdg surfaces
...
fixes #7133
2024-08-01 15:43:19 +02:00
5edfa627b4
layershell: don't throw misaligned error on exclusive edge 0
...
ref #7108
2024-08-01 11:46:04 +02:00
Tom Englund
5b7057c479
pointer: fix buffer crash ( #7131 )
...
current buffer->buffer can turn out to be null actually check for its
existence or use the lastbuffer when calling updateCursorShm()
2024-08-01 11:42:22 +02:00
Vaxry
37e1411e8d
core/surface/buffer: Buffer lock/release fixes ( #7110 )
2024-07-31 21:47:26 +02:00
MightyPlaza
e989a0bcff
internal: refactor fullscreen states ( #7104 )
...
* refactor fullscreen
modified: src/Compositor.cpp
modified: src/Compositor.hpp
modified: src/config/ConfigManager.cpp
modified: src/config/ConfigManager.hpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/LayerSurface.cpp
modified: src/desktop/Window.cpp
modified: src/desktop/Window.hpp
modified: src/desktop/Workspace.cpp
modified: src/desktop/Workspace.hpp
modified: src/events/Windows.cpp
modified: src/helpers/Monitor.cpp
modified: src/layout/DwindleLayout.cpp
modified: src/layout/DwindleLayout.hpp
modified: src/layout/IHyprLayout.cpp
modified: src/layout/IHyprLayout.hpp
modified: src/layout/MasterLayout.cpp
modified: src/layout/MasterLayout.hpp
modified: src/managers/KeybindManager.cpp
modified: src/managers/KeybindManager.hpp
modified: src/managers/input/IdleInhibitor.cpp
modified: src/managers/input/InputManager.cpp
modified: src/managers/input/Swipe.cpp
modified: src/protocols/ForeignToplevelWlr.cpp
modified: src/render/Renderer.cpp
modified: src/render/decorations/CHyprGroupBarDecoration.cpp
* clean up
modified: src/config/ConfigManager.cpp
modified: src/debug/HyprCtl.cpp
modified: src/desktop/Window.hpp
modified: src/desktop/Workspace.cpp
modified: src/events/Windows.cpp
modified: src/managers/KeybindManager.cpp
modified: src/managers/input/Swipe.cpp
* fix mapWindow fullscreen
modified: src/events/Windows.cpp
* fix typo
modified: src/desktop/Workspace.cpp
* add fullscreenstate
modified: src/config/ConfigManager.cpp
modified: src/events/Windows.cpp
* change syncFullscreen to lower
modified: src/config/ConfigManager.hpp
* initialize fs state
modified: src/desktop/Window.hpp
2024-07-31 19:55:52 +02:00
Ikalco
3b9b5346b8
protocols: Move globalshortcuts impl ( #7102 )
...
* move global shortcuts to hyprwayland-scanner
* remove wayland-scanner from deps
* fix the thing
2024-07-30 23:33:56 +02:00
e673220340
core/surface: fixup a few pointer handling edge cases
2024-07-29 19:29:08 +02:00
Tom Englund
9c38b0fdbe
core: add a destructor to CHyprOpenglImpl and avoid wl_container_of undefined behaviour ( #7101 )
...
* protocols: avoid undefined behaviour in C macro
to safely use wl_container_of with a class the class has to be no
virtual functions, no inheritance, and uniform access control (e.g all
public)
work around this by putting this into a destroywrapper struct.
* opengl: clean memory on destruction
add a destructor and free the allocated memory and close the fd
2024-07-29 19:29:08 +02:00
Ikalco
60b663e276
protocols: move text-input-v1 to hyprwayland-scanner ( #7096 )
...
* move text-input-v1 to hyprwayland-scanner
* vro
2024-07-29 18:14:19 +02:00
23a8f06594
virtualptr: allow binding to output
2024-07-29 16:27:09 +02:00
outfoxxed
33e513d489
xdg-shell: fix xdg-positioner y-flip ( #7094 )
2024-07-29 09:48:27 +01:00
a9d87bd666
surface: emit unmap before unmapping and releasing the buffers
2024-07-28 23:56:35 +02:00
7df9b01d48
core: emit unmap event after unmap in surface destroy
2024-07-28 23:47:17 +02:00
73d09953e8
core/surface: drop map/unmap events in member funcs
...
causes loops
2024-07-28 23:41:41 +02:00
outfoxxed
bc86afea7e
xdg-shell: completely rewrite xdg-positioner ( #7067 )
...
This implementation actually works.
2024-07-27 21:43:01 +01:00
0243271544
layer-shell: properly map and unmap surface and propagate unmap events
2024-07-27 18:08:22 +02:00
729b47d46d
input: refocus last window on keyboard unfocusable surfaces
...
fixes #4460
2024-07-27 17:49:35 +02:00
daed75219f
wayland/compositor: fixup double buffer releases
...
fixes #7043
2024-07-27 17:04:03 +02:00
Ikalco
ec672b1ab9
protocols: move screencopy and toplevel export to hyprwayland-scanner ( #7065 )
...
* move screencopy and toplevel export to hyprwayland-scanner
* oops
2024-07-27 16:02:02 +01:00
a0d15a0b7b
wayland/compositor: release buffers on unmap
...
XWayland does not use the regular commit(null) method to unmap, which results in buffers never being released.
release the buffers if present and un-released in the unmap() handler
ref #6584
2024-07-25 14:12:08 +02:00
Ikalco
3e543d2ce8
core: Properly shutdown wl display ( #7018 )
...
* correctly destroy wayland globals
* properly shutdown and cleanup hyprland
* appease the nitpick gods and some comments
2024-07-24 19:07:36 +02:00
fe19754887
shortcutsInhibit: fix crash
2024-07-24 16:26:44 +02:00
MightyPlaza
72bce7efd5
keybinds: add bindp and noshortcutsinhibit ( #7017 )
2024-07-24 14:10:36 +02:00
Ikalco
a5f58a3126
layer-shell: validate exclusiveEdge and don't set it as top by default ( #7006 )
...
* validate exclusiveEdge and don't set it as top by default
* make sure exclusive edge anchor is within bounds
2024-07-23 20:03:15 +02:00
Sam Lakerveld
3c758db95c
renderer/layer-shell: use explicitly set exclusiveEdge ( #6984 )
2024-07-22 23:36:58 +02:00
Ikalco
e8374e0792
debug: get rid of useless 1s in logs ( #6969 )
...
* get rid of 1s in logs lol
* replace WLR with AQ in logs
2024-07-22 18:06:11 +02:00
87db950189
wl_seat: avoid sending events to objects without caps
...
ref #6835
2024-07-22 16:57:35 +02:00
5bae7f150b
wayland/output: avoid sending events to dead outputs
...
ref #6835
2024-07-22 16:56:51 +02:00
1797319a07
renderer: untransform textures matching display transform
...
fixes #6754
This will break if the client uses a transform that is not equal to the display, reverting to old behavior. Combining transforms is left as a todo for the future.
2024-07-22 13:01:55 +02:00
341fb4497f
wayland/compositor: fixup buffer damage tracking for wl_shm buffers
...
remove qt hack, fixup conditions
fixes #6844
2024-07-21 22:05:53 +02:00
3b6bcd6ddc
presentation-feedback: fix invalid values sent after aq merge
2024-07-21 19:25:07 +02:00
Vaxry
016da234d0
Core: Move to aquamarine ( #6608 )
...
Moves Hyprland from wlroots to aquamarine for the backend.
---------
Signed-off-by: Vaxry <vaxry@vaxry.net>
Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Co-authored-by: Jan Beich <jbeich@FreeBSD.org>
Co-authored-by: vaxerski <vaxerski@users.noreply.github.com>
Co-authored-by: UjinT34 <41110182+UjinT34@users.noreply.github.com>
Co-authored-by: Tom Englund <tomenglund26@gmail.com>
Co-authored-by: Ikalco <73481042+ikalco@users.noreply.github.com>
Co-authored-by: diniamo <diniamo53@gmail.com>
2024-07-21 13:09:54 +02:00
phonetic112
f642fb97df
core: Fix crash on opening chromium ( #6932 )
2024-07-20 10:11:32 +02:00
David De Sousa
a770a88e09
toplevelexport: fix flipped r/b channels when sharing windows ( #6861 )
...
fixes #6823
2024-07-13 12:53:53 +02:00
Tim Waterhouse
1f64668953
ext-foreign-toplevel: Send done after title and class ( #6857 )
...
According to the spec (https://wayland.app/protocols/ext-foreign-toplevel-list-v1#ext_foreign_toplevel_handle_v1:event:title ), clients should wait for the done signal before applying updates
2024-07-13 12:53:23 +02:00
13bc7e1e14
style: fix clang-format
2024-07-13 12:36:35 +02:00
Maximilian Seidler
9ff83f4aa9
sessionLock: fix the check for locking a locked session ( #6843 )
2024-07-11 16:40:43 +02:00
Agent00Ming
e894d5e964
tablet: Send .frame() on .proximity_out() ( #6761 )
...
Co-authored-by: Agent_00Ming <agent00ming9366@gmail.com>
2024-07-03 21:40:18 +02:00
はれなよ
718afe271e
seat: don't send keyboard data without a keyboard cap ( #6697 )
...
* Fix #6279 : prevent sending keymap or repeat info events by keyboards without keyboard capability
* Remove brackets
2024-06-29 20:05:07 +02:00
d16c6aa1db
pointer-constraint: set lifetime correctly
...
ref #6679
2024-06-29 00:18:24 +02:00
cff0123ce6
wl-compositor: don't send enter to defunct output globals
2024-06-24 23:29:26 +02:00
8a68199a0c
foreign-toplevel-wlr: fix out-of-range for missing monitor resources
...
fixes #6635
2024-06-23 19:49:53 +02:00