e2f8595d75
Changes: https://github.com/hyprwm/Hyprland/releases/tag/v0.20.0beta Reported by: GitHub (watch releases)
136 lines
5.5 KiB
Text
136 lines
5.5 KiB
Text
Revert to wlroots 0.16 API as 0.17 is a moving target, so hard to
|
|
use as system package with more than one consumer.
|
|
|
|
https://github.com/hyprwm/Hyprland/commit/df132e5ff339
|
|
https://github.com/hyprwm/Hyprland/commit/c012e3d66b21
|
|
https://github.com/hyprwm/Hyprland/commit/d6b3bfc48e22
|
|
|
|
--- src/Compositor.cpp.orig 2022-12-06 13:15:18 UTC
|
|
+++ src/Compositor.cpp
|
|
@@ -53,7 +53,7 @@ CCompositor::CCompositor() {
|
|
wl_event_loop_add_signal(m_sWLEventLoop, SIGTERM, handleCritSignal, nullptr);
|
|
//wl_event_loop_add_signal(m_sWLEventLoop, SIGINT, handleCritSignal, nullptr);
|
|
|
|
- m_sWLRBackend = wlr_backend_autocreate(m_sWLDisplay, &m_sWLRSession);
|
|
+ m_sWLRBackend = wlr_backend_autocreate(m_sWLDisplay);
|
|
|
|
if (!m_sWLRBackend) {
|
|
Debug::log(CRIT, "m_sWLRBackend was NULL!");
|
|
@@ -76,10 +76,11 @@ CCompositor::CCompositor() {
|
|
wlr_renderer_init_wl_shm(m_sWLRRenderer, m_sWLDisplay);
|
|
|
|
if (wlr_renderer_get_dmabuf_texture_formats(m_sWLRRenderer)) {
|
|
- if (wlr_renderer_get_drm_fd(m_sWLRRenderer) >= 0)
|
|
+ if (wlr_renderer_get_drm_fd(m_sWLRRenderer) >= 0) {
|
|
wlr_drm_create(m_sWLDisplay, m_sWLRRenderer);
|
|
+ }
|
|
|
|
- m_sWLRLinuxDMABuf = wlr_linux_dmabuf_v1_create_with_renderer(m_sWLDisplay, 4, m_sWLRRenderer);
|
|
+ m_sWLRLinuxDMABuf = wlr_linux_dmabuf_v1_create(m_sWLDisplay, m_sWLRRenderer);
|
|
}
|
|
|
|
m_sWLRAllocator = wlr_allocator_autocreate(m_sWLRBackend, m_sWLRRenderer);
|
|
@@ -131,7 +132,7 @@ CCompositor::CCompositor() {
|
|
|
|
m_sWLRIdle = wlr_idle_create(m_sWLDisplay);
|
|
|
|
- m_sWLRLayerShell = wlr_layer_shell_v1_create(m_sWLDisplay, 4);
|
|
+ m_sWLRLayerShell = wlr_layer_shell_v1_create(m_sWLDisplay);
|
|
|
|
m_sWLRServerDecoMgr = wlr_server_decoration_manager_create(m_sWLDisplay);
|
|
m_sWLRXDGDecoMgr = wlr_xdg_decoration_manager_v1_create(m_sWLDisplay);
|
|
@@ -171,6 +172,8 @@ CCompositor::CCompositor() {
|
|
wlr_xdg_foreign_v2_create(m_sWLDisplay, m_sWLRForeignRegistry);
|
|
|
|
m_sWLRPointerGestures = wlr_pointer_gestures_v1_create(m_sWLDisplay);
|
|
+
|
|
+ m_sWLRSession = wlr_backend_get_session(m_sWLRBackend);
|
|
|
|
m_sWLRTextInputMgr = wlr_text_input_manager_v3_create(m_sWLDisplay);
|
|
|
|
--- src/events/Events.hpp.orig 2022-12-06 13:15:18 UTC
|
|
+++ src/events/Events.hpp
|
|
@@ -96,7 +96,6 @@ namespace Events {
|
|
// Monitor part 2 the sequel
|
|
DYNLISTENFUNC(monitorFrame);
|
|
DYNLISTENFUNC(monitorDestroy);
|
|
- DYNLISTENFUNC(monitorStateRequest);
|
|
|
|
// XWayland
|
|
LISTENER(readyXWayland);
|
|
--- src/events/Monitors.cpp.orig 2023-01-05 22:30:24 UTC
|
|
+++ src/events/Monitors.cpp
|
|
@@ -265,10 +265,11 @@ void Events::listener_monitorFrame(void* owner, void*
|
|
damageBlinkCleanup = 0;
|
|
}
|
|
|
|
- if (wlr_renderer_begin(g_pCompositor->m_sWLRRenderer, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y)) {
|
|
- wlr_output_render_software_cursors(PMONITOR->output, NULL);
|
|
- wlr_renderer_end(g_pCompositor->m_sWLRRenderer);
|
|
- }
|
|
+ wlr_renderer_begin(g_pCompositor->m_sWLRRenderer, PMONITOR->vecPixelSize.x, PMONITOR->vecPixelSize.y);
|
|
+
|
|
+ wlr_output_render_software_cursors(PMONITOR->output, NULL);
|
|
+
|
|
+ wlr_renderer_end(g_pCompositor->m_sWLRRenderer);
|
|
}
|
|
|
|
g_pHyprOpenGL->end();
|
|
@@ -339,11 +340,4 @@ void Events::listener_monitorDestroy(void* owner, void
|
|
|
|
std::erase_if(g_pCompositor->m_vRealMonitors, [&](std::shared_ptr<CMonitor>& el) { return el.get() == pMonitor; });
|
|
}
|
|
-}
|
|
-
|
|
-void Events::listener_monitorStateRequest(void* owner, void* data) {
|
|
- const auto PMONITOR = (CMonitor*)owner;
|
|
- const auto E = (wlr_output_event_request_state*)data;
|
|
-
|
|
- wlr_output_commit_state(PMONITOR->output, E->state);
|
|
}
|
|
--- src/helpers/Monitor.cpp.orig 2022-12-06 13:15:18 UTC
|
|
+++ src/helpers/Monitor.cpp
|
|
@@ -5,10 +5,8 @@ void CMonitor::onConnect(bool noRule) {
|
|
void CMonitor::onConnect(bool noRule) {
|
|
hyprListener_monitorDestroy.removeCallback();
|
|
hyprListener_monitorFrame.removeCallback();
|
|
- hyprListener_monitorStateRequest.removeCallback();
|
|
hyprListener_monitorFrame.initCallback(&output->events.frame, &Events::listener_monitorFrame, this);
|
|
hyprListener_monitorDestroy.initCallback(&output->events.destroy, &Events::listener_monitorDestroy, this);
|
|
- hyprListener_monitorStateRequest.initCallback(&output->events.request_state, &Events::listener_monitorStateRequest, this);
|
|
|
|
if (m_bEnabled) {
|
|
wlr_output_enable(output, 1);
|
|
@@ -185,7 +183,7 @@ void CMonitor::onDisconnect() {
|
|
if (!BACKUPMON) {
|
|
Debug::log(WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend.");
|
|
|
|
- hyprListener_monitorStateRequest.removeCallback();
|
|
+ hyprListener_monitorMode.removeCallback();
|
|
hyprListener_monitorDestroy.removeCallback();
|
|
|
|
g_pCompositor->m_bUnsafeState = true;
|
|
--- src/helpers/Monitor.hpp.orig 2022-12-06 13:15:18 UTC
|
|
+++ src/helpers/Monitor.hpp
|
|
@@ -56,7 +56,7 @@ class CMonitor { (public)
|
|
|
|
DYNLISTENER(monitorFrame);
|
|
DYNLISTENER(monitorDestroy);
|
|
- DYNLISTENER(monitorStateRequest);
|
|
+ DYNLISTENER(monitorMode);
|
|
|
|
// hack: a group = workspaces on a monitor.
|
|
// I don't really care lol :P
|
|
--- src/helpers/SubsurfaceTree.cpp.orig 2022-12-06 13:15:18 UTC
|
|
+++ src/helpers/SubsurfaceTree.cpp
|
|
@@ -3,8 +3,8 @@ void addSurfaceGlobalOffset(SSurfaceTreeNode* node, in
|
|
#include "../Compositor.hpp"
|
|
|
|
void addSurfaceGlobalOffset(SSurfaceTreeNode* node, int* lx, int* ly) {
|
|
- *lx += node->pSurface->current.dx;
|
|
- *ly += node->pSurface->current.dy;
|
|
+ *lx += node->pSurface->sx;
|
|
+ *ly += node->pSurface->sy;
|
|
|
|
if (node->offsetfn) {
|
|
// This is the root node
|