mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 08:46:00 +01:00
update wlroots dep
This commit is contained in:
parent
0ffaa8d667
commit
df132e5ff3
7 changed files with 17 additions and 9 deletions
|
@ -53,7 +53,7 @@ CCompositor::CCompositor() {
|
||||||
wl_event_loop_add_signal(m_sWLEventLoop, SIGTERM, handleCritSignal, nullptr);
|
wl_event_loop_add_signal(m_sWLEventLoop, SIGTERM, handleCritSignal, nullptr);
|
||||||
//wl_event_loop_add_signal(m_sWLEventLoop, SIGINT, handleCritSignal, nullptr);
|
//wl_event_loop_add_signal(m_sWLEventLoop, SIGINT, handleCritSignal, nullptr);
|
||||||
|
|
||||||
m_sWLRBackend = wlr_backend_autocreate(m_sWLDisplay);
|
m_sWLRBackend = wlr_backend_autocreate(m_sWLDisplay, &m_sWLRSession);
|
||||||
|
|
||||||
if (!m_sWLRBackend) {
|
if (!m_sWLRBackend) {
|
||||||
Debug::log(CRIT, "m_sWLRBackend was NULL!");
|
Debug::log(CRIT, "m_sWLRBackend was NULL!");
|
||||||
|
@ -132,7 +132,7 @@ CCompositor::CCompositor() {
|
||||||
|
|
||||||
m_sWLRIdle = wlr_idle_create(m_sWLDisplay);
|
m_sWLRIdle = wlr_idle_create(m_sWLDisplay);
|
||||||
|
|
||||||
m_sWLRLayerShell = wlr_layer_shell_v1_create(m_sWLDisplay);
|
m_sWLRLayerShell = wlr_layer_shell_v1_create(m_sWLDisplay, 4);
|
||||||
|
|
||||||
m_sWLRServerDecoMgr = wlr_server_decoration_manager_create(m_sWLDisplay);
|
m_sWLRServerDecoMgr = wlr_server_decoration_manager_create(m_sWLDisplay);
|
||||||
m_sWLRXDGDecoMgr = wlr_xdg_decoration_manager_v1_create(m_sWLDisplay);
|
m_sWLRXDGDecoMgr = wlr_xdg_decoration_manager_v1_create(m_sWLDisplay);
|
||||||
|
@ -173,8 +173,6 @@ CCompositor::CCompositor() {
|
||||||
|
|
||||||
m_sWLRPointerGestures = wlr_pointer_gestures_v1_create(m_sWLDisplay);
|
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);
|
m_sWLRTextInputMgr = wlr_text_input_manager_v3_create(m_sWLDisplay);
|
||||||
|
|
||||||
m_sWLRIMEMgr = wlr_input_method_manager_v2_create(m_sWLDisplay);
|
m_sWLRIMEMgr = wlr_input_method_manager_v2_create(m_sWLDisplay);
|
||||||
|
|
|
@ -96,6 +96,7 @@ namespace Events {
|
||||||
// Monitor part 2 the sequel
|
// Monitor part 2 the sequel
|
||||||
DYNLISTENFUNC(monitorFrame);
|
DYNLISTENFUNC(monitorFrame);
|
||||||
DYNLISTENFUNC(monitorDestroy);
|
DYNLISTENFUNC(monitorDestroy);
|
||||||
|
DYNLISTENFUNC(monitorStateRequest);
|
||||||
|
|
||||||
// XWayland
|
// XWayland
|
||||||
LISTENER(readyXWayland);
|
LISTENER(readyXWayland);
|
||||||
|
|
|
@ -354,3 +354,10 @@ void Events::listener_monitorDestroy(void* owner, void* data) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
|
@ -5,8 +5,10 @@
|
||||||
void CMonitor::onConnect(bool noRule) {
|
void CMonitor::onConnect(bool noRule) {
|
||||||
hyprListener_monitorDestroy.removeCallback();
|
hyprListener_monitorDestroy.removeCallback();
|
||||||
hyprListener_monitorFrame.removeCallback();
|
hyprListener_monitorFrame.removeCallback();
|
||||||
|
hyprListener_monitorStateRequest.removeCallback();
|
||||||
hyprListener_monitorFrame.initCallback(&output->events.frame, &Events::listener_monitorFrame, this);
|
hyprListener_monitorFrame.initCallback(&output->events.frame, &Events::listener_monitorFrame, this);
|
||||||
hyprListener_monitorDestroy.initCallback(&output->events.destroy, &Events::listener_monitorDestroy, 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) {
|
if (m_bEnabled) {
|
||||||
wlr_output_enable(output, 1);
|
wlr_output_enable(output, 1);
|
||||||
|
@ -183,7 +185,7 @@ void CMonitor::onDisconnect() {
|
||||||
if (!BACKUPMON) {
|
if (!BACKUPMON) {
|
||||||
Debug::log(WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend.");
|
Debug::log(WARN, "Unplugged last monitor, entering an unsafe state. Good luck my friend.");
|
||||||
|
|
||||||
hyprListener_monitorMode.removeCallback();
|
hyprListener_monitorStateRequest.removeCallback();
|
||||||
hyprListener_monitorDestroy.removeCallback();
|
hyprListener_monitorDestroy.removeCallback();
|
||||||
|
|
||||||
g_pCompositor->m_bUnsafeState = true;
|
g_pCompositor->m_bUnsafeState = true;
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
|
|
||||||
DYNLISTENER(monitorFrame);
|
DYNLISTENER(monitorFrame);
|
||||||
DYNLISTENER(monitorDestroy);
|
DYNLISTENER(monitorDestroy);
|
||||||
DYNLISTENER(monitorMode);
|
DYNLISTENER(monitorStateRequest);
|
||||||
|
|
||||||
// hack: a group = workspaces on a monitor.
|
// hack: a group = workspaces on a monitor.
|
||||||
// I don't really care lol :P
|
// I don't really care lol :P
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#include "../Compositor.hpp"
|
#include "../Compositor.hpp"
|
||||||
|
|
||||||
void addSurfaceGlobalOffset(SSurfaceTreeNode* node, int* lx, int* ly) {
|
void addSurfaceGlobalOffset(SSurfaceTreeNode* node, int* lx, int* ly) {
|
||||||
*lx += node->pSurface->sx;
|
*lx += node->pSurface->current.dx;
|
||||||
*ly += node->pSurface->sy;
|
*ly += node->pSurface->current.dy;
|
||||||
|
|
||||||
if (node->offsetfn) {
|
if (node->offsetfn) {
|
||||||
// This is the root node
|
// This is the root node
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 627a5c511278e67c3c308cdc6a639cbb490f48c3
|
Subproject commit 4ff46e6cf9463e594605928feeb7c55cf323b5e7
|
Loading…
Reference in a new issue