Skip to content

Instantly share code, notes, and snippets.

@jlindgren90
jlindgren90 / xdg-configure-debug.diff
Created October 21, 2023 20:21
xdg.c configure debug
diff --git a/src/xdg.c b/src/xdg.c
index 7864da4..9b823fe 100644
--- a/src/xdg.c
+++ b/src/xdg.c
@@ -91,6 +91,14 @@ handle_commit(struct wl_listener *listener, void *data)
struct wlr_box size;
wlr_xdg_surface_get_geometry(xdg_surface, &size);
+ wlr_log(WLR_ERROR, "view %p (%s) current=%dx%d pending=%dx%d commit=%dx%d",
+ view, view_get_string_prop(view, "title"),
@jlindgren90
jlindgren90 / Xorg.0.log
Created January 2, 2021 23:20
Xorg.0.log (with xorg.conf) 2021-01-02
[ 8.236] (WW) Failed to open protocol names file lib/xorg/protocol.txt
[ 8.237]
X.Org X Server 1.20.10
X Protocol Version 11, Revision 0
[ 8.237] Build Operating System: Linux Arch Linux
[ 8.237] Current Operating System: Linux dark-knight 5.10.3-arch1-1 #1 SMP PREEMPT Sun, 27 Dec 2020 10:50:46 +0000 x86_64
[ 8.237] Kernel command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=/dev/sda6 rw quiet acpi_osi=! acpi_osi="Windows 2009"
[ 8.237] Build Date: 14 December 2020 12:10:29PM
[ 8.237]
[ 8.237] Current version of pixman: 0.40.0
@jlindgren90
jlindgren90 / Xorg.0.log
Last active January 2, 2021 23:16
Xorg.0.log (no xorg.conf) 2021-01-02
[ 8.321] (WW) Failed to open protocol names file lib/xorg/protocol.txt
[ 8.322]
X.Org X Server 1.20.10
X Protocol Version 11, Revision 0
[ 8.322] Build Operating System: Linux Arch Linux
[ 8.322] Current Operating System: Linux dark-knight 5.10.3-arch1-1 #1 SMP PREEMPT Sun, 27 Dec 2020 10:50:46 +0000 x86_64
[ 8.322] Kernel command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=/dev/sda6 rw quiet acpi_osi=! acpi_osi="Windows 2009"
[ 8.322] Build Date: 14 December 2020 12:10:29PM
[ 8.322]
[ 8.322] Current version of pixman: 0.40.0
// Utility functions
// =================
// absolute value
template<class T>
constexpr T abs (T x)
{ return x < 0 ? -x : x; }
// raise an integer to the given power
template<class T>