commit 3d085575dd5dbfa8bba513f6e1eb9a3553b34c9b
parent 13cc2373efc335f0d27911628464905d501b8948
Author: deurzen <m.deurzen@tum.de>
Date: Tue, 21 Sep 2021 03:43:56 +0200
moves from Xrandr to Xinerama
Diffstat:
3 files changed, 3 insertions(+), 17 deletions(-)
diff --git a/config.mk b/config.mk
@@ -2,7 +2,7 @@ PROJECT = kranewm
BAR = kranebar
CLIENT = kranec
-DEPENDENCIES = x11 xrandr xinerama xres libprocps spdlog
+DEPENDENCIES = x11 xinerama xres libprocps spdlog
OBJDIR = obj
SRCDIR = src
diff --git a/src/winsys/xdata/xconnection.cc b/src/winsys/xdata/xconnection.cc
@@ -16,7 +16,6 @@ extern "C" {
#include <X11/Xproto.h>
#include <X11/Xutil.h>
#include <X11/extensions/XRes.h>
-#include <X11/extensions/Xrandr.h>
#include <X11/extensions/Xinerama.h>
#include <X11/keysym.h>
#include <X11/keysymdef.h>
@@ -103,7 +102,7 @@ XConnection::XConnection(const std::string_view wm_name)
for (auto&& [id,name] : NETWM_ATOM_NAMES)
m_netwm_atoms[id] = get_atom(name);
- for (std::size_t i = 0; i < 256; ++i)
+ for (std::size_t i = 0; i < LASTEvent; ++i)
m_event_dispatcher[i] = &XConnection::on_unimplemented;
m_event_dispatcher[ButtonPress] = &XConnection::on_button_press;
@@ -122,12 +121,6 @@ XConnection::XConnection(const std::string_view wm_name)
m_event_dispatcher[MotionNotify] = &XConnection::on_motion_notify;
m_event_dispatcher[PropertyNotify] = &XConnection::on_property_notify;
m_event_dispatcher[UnmapNotify] = &XConnection::on_unmap_notify;
-
- int event_base, _error_base;
- if (XRRQueryExtension(mp_dpy, &event_base, &_error_base)) {
- m_event_dispatcher[event_base + RRScreenChangeNotify]
- = &XConnection::on_screen_change;
- }
}
XConnection::~XConnection()
@@ -1362,12 +1355,6 @@ XConnection::init_for_wm(std::vector<std::string> const& desktop_names)
map_window(m_check_window);
stack_window_below(m_check_window, std::nullopt);
- XRRSelectInput(
- mp_dpy,
- m_check_window,
- RRScreenChangeNotifyMask
- );
-
XSetWindowAttributes wa;
wa.cursor = XCreateFontCursor(mp_dpy, XC_left_ptr);
XChangeWindowAttributes(mp_dpy, m_root, CWCursor, &wa);
@@ -3538,7 +3525,6 @@ XConnection::on_unmap_notify()
winsys::Event
XConnection::on_screen_change()
{
- XRRUpdateConfiguration(&m_current_event);
return winsys::ScreenChangeEvent {};
}
diff --git a/src/winsys/xdata/xconnection.hh b/src/winsys/xdata/xconnection.hh
@@ -310,7 +310,7 @@ private:
void check_otherwm();
// event dispatching logic
- winsys::Event (XConnection::*m_event_dispatcher[256])();
+ winsys::Event (XConnection::*m_event_dispatcher[LASTEvent])();
winsys::Event on_button_press();
winsys::Event on_button_release();