Commit 9b72eb79 authored by Pekka Paalanen's avatar Pekka Paalanen Committed by Daniel Stone

xwm: convert WM_DEBUG into a weston-debug scope

Instead of a compile time choice, offer the XWM debugging messages
through the weston-debug protocol and tool on demand. Users will not
need to recompile weston to get XWM debugging, and it won't flood the
weston log.

The debug scope needs to be initialized in launcher.c for it be
available from start, before the first X11 client tries to connect and
initializes XWM.
Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <>

pass the wm_debug scope to weston_debug_scope_printf API to append
the scopename to the timestr
Signed-off-by: default avatarManiraj Devadoss <>
Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <>
Reviewed-by: Daniel Stone's avatarDaniel Stone <>
parent b3b00655
......@@ -229,6 +229,8 @@ weston_xserver_destroy(struct wl_listener *l, void *data)
if (wxs->loop)
......@@ -391,5 +393,10 @@ weston_module_init(struct weston_compositor *compositor)
wxs->destroy_listener.notify = weston_xserver_destroy;
wl_signal_add(&compositor->destroy_signal, &wxs->destroy_listener);
wxs->wm_debug = weston_compositor_add_debug_scope(wxs->compositor,
"XWM's window management X11 events\n",
return 0;
This diff is collapsed.
......@@ -33,6 +33,7 @@
#include "compositor.h"
#include "compositor/weston.h"
#include "xwayland-api.h"
#include "weston-debug.h"
#define SEND_EVENT_MASK (0x80)
#define EVENT_TYPE(event) ((event)->response_type & ~SEND_EVENT_MASK)
......@@ -52,6 +53,8 @@ struct weston_xserver {
struct wl_listener destroy_listener;
weston_xwayland_spawn_xserver_func_t spawn_func;
void *user_data;
struct weston_debug_scope *wm_debug;
struct weston_wm {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment