Commit graph

162 commits

Author SHA1 Message Date
cca227a53e tablet: use inputMgr unified naming scheme
ref #8301
2024-11-09 02:34:04 +00:00
726d697821 popup: minor cleanups
don't iterate over unmapped popups in breadthfirst, don't refocus if it wasnt in focus

ref #8293
2024-11-09 02:26:24 +00:00
f43d4a8638 layershell: minor cleanups and improvements to focus
ref #8293
2024-11-09 02:25:34 +00:00
97a309b784 layershell: check if workspace is valid in onMap
ref #8296
2024-11-06 14:02:44 +00:00
MightyPlaza
12c1bb936d
internal: check size limit in layouts (#8298)
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp
modified:   src/events/Windows.cpp
modified:   src/helpers/MiscFunctions.cpp
modified:   src/helpers/MiscFunctions.hpp
modified:   src/layout/DwindleLayout.cpp
modified:   src/layout/IHyprLayout.cpp
modified:   src/layout/MasterLayout.cpp
modified:   src/macros.hpp
2024-10-30 18:58:36 +00:00
Tom Englund
c7315617eb
internal: few more marginal optimisations from profiling (#8271)
* deco: reduce local temporars and function calls

profiling shows this is a high used function, reduce the amount of
function calls and local temporar copies and also check if we even need
to add extents at all in the loop.

* popup: optimize bfhelper in popups

pass nodes as const reference and reserve the size of the children node
vector help reduce the reallocations.

* procotol: make compositor bfhelper use const ref

use const ref for nodes and reserve second nodes vector size to reduce
amount of reallocation needed.
2024-10-28 18:02:52 +00:00
Aqa-Ib
d49a1334a8
swallow: check if swallow_regex doesn't exist (#8265)
Avoid to run CWindow::getSwallower() when `swallow_regex` doesn't exist in the user's config file.
2024-10-28 16:52:14 +00:00
Vaxry
5d4b54b012
core: move internal structures to monitor pointers (#8266) 2024-10-27 18:45:38 +00:00
Tom Englund
f9b52203f5
internal: optimize cursor move a bit (#8264)
* window: inline and const getWindowMainSurfaceBox

getWindowMainSurfaceBox gets called a lot of times from deep down from
mousemoveunified, profiling mousemoveunified it spends quite a lot of
cpu time in here, let the compiler optimize the call to
getWindowMainSurfaceBox by inlining and making it const. reducing the
overhead.

* inputmgr: return early and use std::any_of

return early in mousemoveunified to reduce the amount of unnecessery
calls to various pointers when not needed, also make isconstrained use
std::any_of instead of for loop to use the STL optimized paths with
hopes and dreams marginally faster.

* decoration: return early, reduce temporar copy

return earlier and reduce the temp copies by using one .lock instead of
two
2024-10-27 17:51:26 +00:00
Aqa-Ib
a3d3b4fd64
groups: fix swallowing (#8223)
* fix swallowing for groups

* remove unnecessary check

* clang-format

* clarify comment

* make variables consistent

* make aditional variables consistent
2024-10-27 01:44:55 +01:00
Vaxry
f044e4c951
internal: Move CMonitor to SP (#8178)
* move monitors to sp

* XD
2024-10-19 23:03:29 +01:00
b57086aa43 window: properly break cycles in X11TransientFor
ref #8045
2024-10-16 22:23:15 +01:00
MightyPlaza
a364df4c9e
internal: use clampWindowSize to unify min/maxsize handling (#8014)
modified:   src/desktop/Window.cpp
modified:   src/desktop/Window.hpp
modified:   src/events/Windows.cpp
2024-10-07 19:52:49 +01:00
Vaxry
595eb89f6e renderer: Fix resize artifacts (stretching, bumps) (#7499) 2024-10-05 01:01:21 +01:00
f79497087b internal: nuke wlsignal and related
old semi-wrappers for wl_signal, they are no longer used
2024-09-24 00:47:34 +01:00
AlvinaNancy
e87758529e
internal: Fix change group current fullscreen state query (#7802) 2024-09-15 18:25:06 +01:00
darkwater
04421063af
config: add order rule for layers (#7697) 2024-09-09 10:10:08 +01:00
outfoxxed
0500213086
input: try to refocus a focusable window when seat grabs are reset (#7669) 2024-09-07 01:06:55 +01:00
Sungyoon Cho
0fad7a0bb0
workspacerules: fix on-created-empty window focus (#7657) 2024-09-06 00:54:01 +01:00
Parola Marco
4a42c5ed20
config: Add a variable to prevent groups from merging after being dragged (#7650)
* config: Add a variable to prevent groups from merging after being dragged

* Fixed code style for [f777f028]
2024-09-05 17:29:33 +01:00
Vaxry
c5fd577181
config: Add a window rule to render while unfocused (#7582) 2024-08-30 17:37:52 +02:00
25e72949a1 window/xwayland: minor property cleanup
fixes #6921
2024-08-30 14:12:23 +02:00
b9b8e6220f renderer: fade out windows on silent moves 2024-08-28 21:54:49 +02:00
9642311ac2 window: don't focus on activate if window isn't mapped yet
ref #7089
2024-08-28 20:33:38 +02:00
Tom Englund
72c7818ae6
misc: constify the remaining for loops (#7534)
now we roll loops at blazing constified speed.
2024-08-26 20:24:30 +02:00
Tom Englund
8d6c18076f
core: make most for loops use const references (#7527)
why not let the compiler optimise things for us at hyprspeeds when we
can.
2024-08-26 17:25:39 +02:00
Adithya Ajith
ca85455a8e
misc: Rename all instances of "emtpy" to "empty" (#7522) 2024-08-26 12:25:52 +02:00
e45e606fbd layersurface: don't unref from monitor until dtor
reee
2024-08-24 15:22:10 +02:00
Sungyoon Cho
688fe5c147
windowrules: add fullscreenstate field (#7466)
* windowrules: add fullscreenstate field

* fix typo
2024-08-23 20:42:14 +01:00
Tom Englund
df4f222482
layersurface: remove layer on destroy from monitor (#7457)
remove destroyed layer weakptrs on destroy, we can hit multiple
null ptr derefs in renderering on mirroring and unmirroring displays
otherwise.
2024-08-23 14:06:52 +01:00
Tom Englund
cae937c51b
layersurface: dont rollover on size_t (#7451)
unneded rollover on size_t if force equals -1
2024-08-21 22:05:03 +01:00
883463f9dd animations: add workspace in/out configs 2024-08-21 14:38:07 +02: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
Jan Beich
9f5a57ff45
core: Add missing header for libc++ after e989a0bcff (#7158)
src/Compositor.cpp:2295:74: error: no member named 'bit_floor' in namespace 'std'
 2295 |     const eFullscreenMode CURRENT_EFFECTIVE_MODE = (eFullscreenMode)std::bit_floor((uint8_t)PWINDOW->m_sFullscreenState.internal);
      |                                                                     ~~~~~^
src/Compositor.cpp:2296:74: error: no member named 'bit_floor' in namespace 'std'
 2296 |     const eFullscreenMode EFFECTIVE_MODE         = (eFullscreenMode)std::bit_floor((uint8_t)state.internal);
      |                                                                     ~~~~~^
src/desktop/Window.cpp:1242:34: error: no member named 'bit_floor' in namespace 'std'
 1242 |     return (eFullscreenMode)std::bit_floor((uint8_t)m_sFullscreenState.internal) == MODE;
      |                             ~~~~~^
2024-08-03 13:02:10 +01:00
09bb5658b7 window/ls: reset core signals after destroy
fixes #7137
2024-08-02 00:31:44 +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
Virt
6e6c61b9e8
layer-shell: avoid crashes on unmap (#7092) 2024-07-29 09:47:25 +01:00
256db08aed layersurface: null check for surface validity before unmap() 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
6edfdd63a1 surface: avoid crashes on fading out layers 2024-07-27 22:15:36 +02:00
MightyPlaza
ad711ef421
input: unify removing currentlyDraggedWindow (#7071)
modified:   src/desktop/Window.cpp
modified:   src/events/Windows.cpp
modified:   src/layout/IHyprLayout.cpp
modified:   src/managers/KeybindManager.cpp
modified:   src/managers/KeybindManager.hpp
modified:   src/managers/input/InputManager.cpp
2024-07-27 17:46:19 +01:00
0243271544 layer-shell: properly map and unmap surface and propagate unmap events 2024-07-27 18:08:22 +02:00
963816b9a6 layersurface: fixup focus issues in onUnmap
fixes #6929
2024-07-27 15:04:03 +02:00
MightyPlaza
72bce7efd5
keybinds: add bindp and noshortcutsinhibit (#7017) 2024-07-24 14:10:36 +02:00
077494ee85 surface: fix zero_scaling xwayland damage 2024-07-23 19:56:47 +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
5979ceb56b surface: fixup logical damage size calculations
fixes #6618
2024-07-22 12:38:05 +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
Tim Waterhouse
45c4898423
socket2: Add windowtitlev2 event which includes the window address (#6856)
Fixes #5393
2024-07-13 16:21:32 +02:00