x11: Introduce and use 'x11' debug topic

This replaces all current `meta_verbose (...)` in x11/ with `meta_topic
(META_DEBUG_X11, ...)`.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4005>
This commit is contained in:
Jonas Ådahl 2024-09-05 10:58:22 +02:00 committed by Marge Bot
parent 86a16c3cfd
commit 7e9c6489ca
11 changed files with 310 additions and 227 deletions

View File

@ -71,6 +71,7 @@ static const GDebugKey meta_debug_keys[] = {
{ "eis", META_DEBUG_EIS }, { "eis", META_DEBUG_EIS },
{ "kms-deadline", META_DEBUG_KMS_DEADLINE }, { "kms-deadline", META_DEBUG_KMS_DEADLINE },
{ "session-management", META_DEBUG_SESSION_MANAGEMENT }, { "session-management", META_DEBUG_SESSION_MANAGEMENT },
{ "x11", META_DEBUG_X11 },
}; };
static gint verbose_topics = 0; static gint verbose_topics = 0;
@ -332,6 +333,8 @@ meta_topic_to_string (MetaDebugTopic topic)
return "KMS_DEADLINE"; return "KMS_DEADLINE";
case META_DEBUG_SESSION_MANAGEMENT: case META_DEBUG_SESSION_MANAGEMENT:
return "SESSION_MANAGEMENT"; return "SESSION_MANAGEMENT";
case META_DEBUG_X11:
return "X11";
} }
return "WM"; return "WM";

View File

@ -52,6 +52,7 @@
* @META_DEBUG_EIS: eis state * @META_DEBUG_EIS: eis state
* @META_DEBUG_KMS_DEADLINE: KMS deadline timers * @META_DEBUG_KMS_DEADLINE: KMS deadline timers
* @META_DEBUG_SESSION_MANAGEMENT: session management * @META_DEBUG_SESSION_MANAGEMENT: session management
* @META_DEBUG_X11: X11 window management
*/ */
typedef enum typedef enum
{ {
@ -87,6 +88,7 @@ typedef enum
META_DEBUG_EIS = 1 << 28, META_DEBUG_EIS = 1 << 28,
META_DEBUG_KMS_DEADLINE = 1 << 29, META_DEBUG_KMS_DEADLINE = 1 << 29,
META_DEBUG_SESSION_MANAGEMENT = 1 << 30, META_DEBUG_SESSION_MANAGEMENT = 1 << 30,
META_DEBUG_X11 = 1 << 31,
} MetaDebugTopic; } MetaDebugTopic;
META_EXPORT META_EXPORT

View File

@ -1112,8 +1112,10 @@ process_selection_request (MetaX11Display *x11_display,
event->xselectionrequest.selection); event->xselectionrequest.selection);
mtk_x11_error_trap_pop (x11_display->xdisplay); mtk_x11_error_trap_pop (x11_display->xdisplay);
meta_verbose ("Selection request with selection %s window 0x%lx not a WM_Sn selection we recognize", meta_topic (META_DEBUG_X11,
str ? str : "(bad atom)", event->xselectionrequest.owner); "Selection request with selection %s window 0x%lx "
"not a WM_Sn selection we recognize",
str ? str : "(bad atom)", event->xselectionrequest.owner);
meta_XFree (str); meta_XFree (str);
@ -1192,7 +1194,7 @@ process_selection_request (MetaX11Display *x11_display,
event->xselectionrequest.requestor, event->xselectionrequest.requestor,
False, 0L, (XEvent*)&reply); False, 0L, (XEvent*)&reply);
meta_verbose ("Handled selection request"); meta_topic (META_DEBUG_X11, "Handled selection request");
} }
static void static void
@ -1222,16 +1224,18 @@ process_selection_clear (MetaX11Display *x11_display,
event->xselectionclear.selection); event->xselectionclear.selection);
mtk_x11_error_trap_pop (x11_display->xdisplay); mtk_x11_error_trap_pop (x11_display->xdisplay);
meta_verbose ("Selection clear with selection %s window 0x%lx not a WM_Sn selection we recognize", meta_topic (META_DEBUG_X11,
str ? str : "(bad atom)", event->xselectionclear.window); "Selection clear with selection %s window 0x%lx "
"not a WM_Sn selection we recognize",
str ? str : "(bad atom)", event->xselectionclear.window);
meta_XFree (str); meta_XFree (str);
return FALSE; return FALSE;
} }
meta_verbose ("Got selection clear for on display %s", meta_topic (META_DEBUG_X11, "Got selection clear for on display %s",
x11_display->name); x11_display->name);
/* We can't close a Display in an event handler. */ /* We can't close a Display in an event handler. */
if (!x11_display->display_close_idle) if (!x11_display->display_close_idle)
@ -1511,16 +1515,19 @@ handle_other_xevent (MetaX11Display *x11_display,
} }
else else
{ {
meta_verbose ("MapRequest on %s mapped = %d minimized = %d", meta_topic (META_DEBUG_X11,
window->desc, window->mapped, window->minimized); "MapRequest on %s mapped = %d minimized = %d",
window->desc, window->mapped, window->minimized);
if (window->minimized && !frame_was_receiver) if (window->minimized && !frame_was_receiver)
{ {
meta_window_unminimize (window); meta_window_unminimize (window);
if (window->workspace != workspace_manager->active_workspace) if (window->workspace != workspace_manager->active_workspace)
{ {
meta_verbose ("Changing workspace due to MapRequest mapped = %d minimized = %d", meta_topic (META_DEBUG_X11,
window->mapped, window->minimized); "Changing workspace due to MapRequest "
"mapped = %d minimized = %d",
window->mapped, window->minimized);
meta_window_change_workspace (window, meta_window_change_workspace (window,
workspace_manager->active_workspace); workspace_manager->active_workspace);
} }
@ -1571,8 +1578,10 @@ handle_other_xevent (MetaX11Display *x11_display,
xwc.height = event->xconfigurerequest.height; xwc.height = event->xconfigurerequest.height;
xwc.border_width = event->xconfigurerequest.border_width; xwc.border_width = event->xconfigurerequest.border_width;
meta_verbose ("Configuring withdrawn window to %d,%d %dx%d border %d (some values may not be in mask)", meta_topic (META_DEBUG_X11,
xwc.x, xwc.y, xwc.width, xwc.height, xwc.border_width); "Configuring withdrawn window to %d,%d %dx%d border %d "
"(some values may not be in mask)",
xwc.x, xwc.y, xwc.width, xwc.height, xwc.border_width);
mtk_x11_error_trap_push (x11_display->xdisplay); mtk_x11_error_trap_push (x11_display->xdisplay);
XConfigureWindow (x11_display->xdisplay, event->xconfigurerequest.window, XConfigureWindow (x11_display->xdisplay, event->xconfigurerequest.window,
xwcm, &xwc); xwcm, &xwc);
@ -1664,9 +1673,10 @@ handle_other_xevent (MetaX11Display *x11_display,
space = event->xclient.data.l[0]; space = event->xclient.data.l[0];
time = event->xclient.data.l[1]; time = event->xclient.data.l[1];
meta_verbose ("Request to change current workspace to %d with " meta_topic (META_DEBUG_X11,
"specified timestamp of %u", "Request to change current workspace to %d with "
space, time); "specified timestamp of %u",
space, time);
workspace = meta_workspace_manager_get_workspace_by_index (workspace_manager, space); workspace = meta_workspace_manager_get_workspace_by_index (workspace_manager, space);
@ -1680,7 +1690,7 @@ handle_other_xevent (MetaX11Display *x11_display,
} }
else else
{ {
meta_verbose ("Don't know about workspace %d", space); meta_topic (META_DEBUG_X11, "Don't know about workspace %d", space);
} }
} }
else if (event->xclient.message_type == else if (event->xclient.message_type ==
@ -1690,8 +1700,8 @@ handle_other_xevent (MetaX11Display *x11_display,
num_spaces = event->xclient.data.l[0]; num_spaces = event->xclient.data.l[0];
meta_verbose ("Request to set number of workspaces to %d", meta_topic (META_DEBUG_X11, "Request to set number of workspaces to %d",
num_spaces); num_spaces);
meta_prefs_set_num_workspaces (num_spaces); meta_prefs_set_num_workspaces (num_spaces);
} }
@ -1704,8 +1714,8 @@ handle_other_xevent (MetaX11Display *x11_display,
showing_desktop = event->xclient.data.l[0] != 0; showing_desktop = event->xclient.data.l[0] != 0;
/* FIXME: Braindead protocol doesn't have a timestamp */ /* FIXME: Braindead protocol doesn't have a timestamp */
timestamp = meta_x11_display_get_current_time_roundtrip (x11_display); timestamp = meta_x11_display_get_current_time_roundtrip (x11_display);
meta_verbose ("Request to %s desktop", meta_topic (META_DEBUG_X11, "Request to %s desktop",
showing_desktop ? "show" : "hide"); showing_desktop ? "show" : "hide");
if (showing_desktop) if (showing_desktop)
meta_workspace_manager_show_desktop (workspace_manager, timestamp); meta_workspace_manager_show_desktop (workspace_manager, timestamp);
@ -1718,7 +1728,7 @@ handle_other_xevent (MetaX11Display *x11_display,
else if (event->xclient.message_type == else if (event->xclient.message_type ==
x11_display->atom_WM_PROTOCOLS) x11_display->atom_WM_PROTOCOLS)
{ {
meta_verbose ("Received WM_PROTOCOLS message"); meta_topic (META_DEBUG_X11, "Received WM_PROTOCOLS message");
if ((Atom)event->xclient.data.l[0] == x11_display->atom__NET_WM_PING) if ((Atom)event->xclient.data.l[0] == x11_display->atom__NET_WM_PING)
{ {
@ -1732,7 +1742,8 @@ handle_other_xevent (MetaX11Display *x11_display,
if (event->xclient.message_type == if (event->xclient.message_type ==
x11_display->atom__NET_REQUEST_FRAME_EXTENTS) x11_display->atom__NET_REQUEST_FRAME_EXTENTS)
{ {
meta_verbose ("Received _NET_REQUEST_FRAME_EXTENTS message"); meta_topic (META_DEBUG_X11,
"Received _NET_REQUEST_FRAME_EXTENTS message");
process_request_frame_extents (x11_display, event); process_request_frame_extents (x11_display, event);
} }
} }

View File

@ -140,8 +140,9 @@ reload_wm_client_machine (MetaGroup *group,
if (value->type != META_PROP_VALUE_INVALID) if (value->type != META_PROP_VALUE_INVALID)
group->wm_client_machine = g_strdup (value->v.str); group->wm_client_machine = g_strdup (value->v.str);
meta_verbose ("Group has client machine \"%s\"", meta_topic (META_DEBUG_X11,
group->wm_client_machine ? group->wm_client_machine : "unset"); "Group has client machine \"%s\"",
group->wm_client_machine ? group->wm_client_machine : "unset");
} }
static void static void
@ -163,8 +164,9 @@ reload_net_startup_id (MetaGroup *group,
if (value->type != META_PROP_VALUE_INVALID) if (value->type != META_PROP_VALUE_INVALID)
group->startup_id = g_strdup (value->v.str); group->startup_id = g_strdup (value->v.str);
meta_verbose ("Group has startup id \"%s\"", meta_topic (META_DEBUG_X11,
group->startup_id ? group->startup_id : "unset"); "Group has startup id \"%s\"",
group->startup_id ? group->startup_id : "unset");
} }
#define N_HOOKS 3 #define N_HOOKS 3

View File

@ -76,9 +76,10 @@ meta_sync_counter_set_counter (MetaSyncCounter *sync_counter,
if (sync_counter->sync_request_counter != None) if (sync_counter->sync_request_counter != None)
{ {
meta_verbose ("Window has _NET_WM_SYNC_REQUEST_COUNTER 0x%lx (extended=%s)", meta_topic (META_DEBUG_X11,
sync_counter->sync_request_counter, "Window has _NET_WM_SYNC_REQUEST_COUNTER 0x%lx (extended=%s)",
sync_counter->extended_sync_request_counter ? "true" : "false"); sync_counter->sync_request_counter,
sync_counter->extended_sync_request_counter ? "true" : "false");
} }
if (sync_counter->extended_sync_request_counter) if (sync_counter->extended_sync_request_counter)

View File

@ -479,10 +479,11 @@ query_xsync_extension (MetaX11Display *x11_display)
XSyncSetPriority (x11_display->xdisplay, None, 10); XSyncSetPriority (x11_display->xdisplay, None, 10);
} }
meta_verbose ("Attempted to init Xsync, found version %d.%d error base %d event base %d", meta_topic (META_DEBUG_X11,
major, minor, "Attempted to init Xsync, found version %d.%d error base %d event base %d",
x11_display->xsync_error_base, major, minor,
x11_display->xsync_event_base); x11_display->xsync_error_base,
x11_display->xsync_event_base);
} }
static void static void
@ -503,9 +504,10 @@ query_xshape_extension (MetaX11Display *x11_display)
else else
x11_display->have_shape = TRUE; x11_display->have_shape = TRUE;
meta_verbose ("Attempted to init Shape, found error base %d event base %d", meta_topic (META_DEBUG_X11,
x11_display->shape_error_base, "Attempted to init Shape, found error base %d event base %d",
x11_display->shape_event_base); x11_display->shape_error_base,
x11_display->shape_event_base);
} }
static void static void
@ -540,12 +542,13 @@ query_xcomposite_extension (MetaX11Display *x11_display)
} }
} }
meta_verbose ("Attempted to init Composite, found error base %d event base %d " meta_topic (META_DEBUG_X11,
"extn ver %d %d", "Attempted to init Composite, found error base %d event base %d "
x11_display->composite_error_base, "extn ver %d %d",
x11_display->composite_event_base, x11_display->composite_error_base,
x11_display->composite_major_version, x11_display->composite_event_base,
x11_display->composite_minor_version); x11_display->composite_major_version,
x11_display->composite_minor_version);
} }
static void static void
@ -566,9 +569,10 @@ query_xdamage_extension (MetaX11Display *x11_display)
else else
x11_display->have_damage = TRUE; x11_display->have_damage = TRUE;
meta_verbose ("Attempted to init Damage, found error base %d event base %d", meta_topic (META_DEBUG_X11,
x11_display->damage_error_base, "Attempted to init Damage, found error base %d event base %d",
x11_display->damage_event_base); x11_display->damage_error_base,
x11_display->damage_event_base);
} }
static void static void
@ -593,9 +597,10 @@ query_xfixes_extension (MetaX11Display *x11_display)
meta_fatal ("Mutter requires XFixes 5.0"); meta_fatal ("Mutter requires XFixes 5.0");
} }
meta_verbose ("Attempted to init XFixes, found error base %d event base %d", meta_topic (META_DEBUG_X11,
x11_display->xfixes_error_base, "Attempted to init XFixes, found error base %d event base %d",
x11_display->xfixes_event_base); x11_display->xfixes_error_base,
x11_display->xfixes_event_base);
} }
static void static void
@ -703,7 +708,8 @@ set_desktop_geometry_hint (MetaX11Display *x11_display)
data[0] = monitor_width; data[0] = monitor_width;
data[1] = monitor_height; data[1] = monitor_height;
meta_verbose ("Setting _NET_DESKTOP_GEOMETRY to %lu, %lu", data[0], data[1]); meta_topic (META_DEBUG_X11,
"Setting _NET_DESKTOP_GEOMETRY to %lu, %lu", data[0], data[1]);
mtk_x11_error_trap_push (x11_display->xdisplay); mtk_x11_error_trap_push (x11_display->xdisplay);
XChangeProperty (x11_display->xdisplay, XChangeProperty (x11_display->xdisplay,
@ -728,7 +734,7 @@ set_desktop_viewport_hint (MetaX11Display *x11_display)
data[0] = 0; data[0] = 0;
data[1] = 0; data[1] = 0;
meta_verbose ("Setting _NET_DESKTOP_VIEWPORT to 0, 0"); meta_topic (META_DEBUG_X11, "Setting _NET_DESKTOP_VIEWPORT to 0, 0");
mtk_x11_error_trap_push (x11_display->xdisplay); mtk_x11_error_trap_push (x11_display->xdisplay);
XChangeProperty (x11_display->xdisplay, XChangeProperty (x11_display->xdisplay,
@ -891,7 +897,7 @@ take_manager_selection (MetaX11Display *x11_display,
/* We sort of block infinitely here which is probably lame. */ /* We sort of block infinitely here which is probably lame. */
meta_verbose ("Waiting for old window manager to exit"); meta_topic (META_DEBUG_X11, "Waiting for old window manager to exit");
do do
XWindowEvent (x11_display->xdisplay, current_owner, StructureNotifyMask, &event); XWindowEvent (x11_display->xdisplay, current_owner, StructureNotifyMask, &event);
while (event.type != DestroyNotify); while (event.type != DestroyNotify);
@ -992,7 +998,7 @@ set_active_workspace_hint (MetaWorkspaceManager *workspace_manager,
data[0] = meta_workspace_index (workspace_manager->active_workspace); data[0] = meta_workspace_index (workspace_manager->active_workspace);
meta_verbose ("Setting _NET_CURRENT_DESKTOP to %lu", data[0]); meta_topic (META_DEBUG_X11, "Setting _NET_CURRENT_DESKTOP to %lu", data[0]);
mtk_x11_error_trap_push (x11_display->xdisplay); mtk_x11_error_trap_push (x11_display->xdisplay);
XChangeProperty (x11_display->xdisplay, XChangeProperty (x11_display->xdisplay,
@ -1016,7 +1022,8 @@ set_number_of_spaces_hint (MetaWorkspaceManager *workspace_manager,
data[0] = meta_workspace_manager_get_n_workspaces (workspace_manager); data[0] = meta_workspace_manager_get_n_workspaces (workspace_manager);
meta_verbose ("Setting _NET_NUMBER_OF_DESKTOPS to %lu", data[0]); meta_topic (META_DEBUG_X11,
"Setting _NET_NUMBER_OF_DESKTOPS to %lu", data[0]);
mtk_x11_error_trap_push (x11_display->xdisplay); mtk_x11_error_trap_push (x11_display->xdisplay);
XChangeProperty (x11_display->xdisplay, XChangeProperty (x11_display->xdisplay,
@ -1221,7 +1228,7 @@ open_x_display (MetaDisplay *display,
return NULL; return NULL;
} }
meta_verbose ("Opening display '%s'", xdisplay_name); meta_topic (META_DEBUG_X11, "Opening display '%s'", xdisplay_name);
xdisplay = XOpenDisplay (xdisplay_name); xdisplay = XOpenDisplay (xdisplay_name);
@ -1501,7 +1508,7 @@ meta_x11_display_new (MetaDisplay *display,
x11_display->default_xvisual = DefaultVisualOfScreen (xscreen); x11_display->default_xvisual = DefaultVisualOfScreen (xscreen);
x11_display->default_depth = DefaultDepthOfScreen (xscreen); x11_display->default_depth = DefaultDepthOfScreen (xscreen);
meta_verbose ("Creating %d atoms", (int) G_N_ELEMENTS (atom_names)); meta_topic (META_DEBUG_X11, "Creating %d atoms", (int) G_N_ELEMENTS (atom_names));
XInternAtoms (xdisplay, (char **)atom_names, G_N_ELEMENTS (atom_names), XInternAtoms (xdisplay, (char **)atom_names, G_N_ELEMENTS (atom_names),
False, atoms); False, atoms);
@ -1758,8 +1765,8 @@ meta_x11_display_restore_active_workspace (MetaX11Display *x11_display)
x11_display->atom__NET_CURRENT_DESKTOP, x11_display->atom__NET_CURRENT_DESKTOP,
&current_workspace_index)) &current_workspace_index))
{ {
meta_verbose ("Read existing _NET_CURRENT_DESKTOP = %d", meta_topic (META_DEBUG_X11, "Read existing _NET_CURRENT_DESKTOP = %d",
(int) current_workspace_index); (int) current_workspace_index);
/* Switch to the _NET_CURRENT_DESKTOP workspace */ /* Switch to the _NET_CURRENT_DESKTOP workspace */
current_workspace = meta_workspace_manager_get_workspace_by_index (display->workspace_manager, current_workspace = meta_workspace_manager_get_workspace_by_index (display->workspace_manager,
@ -1770,7 +1777,7 @@ meta_x11_display_restore_active_workspace (MetaX11Display *x11_display)
} }
else else
{ {
meta_verbose ("No _NET_CURRENT_DESKTOP present"); meta_topic (META_DEBUG_X11, "No _NET_CURRENT_DESKTOP present");
} }
set_active_workspace_hint (display->workspace_manager, x11_display); set_active_workspace_hint (display->workspace_manager, x11_display);
@ -2518,7 +2525,8 @@ meta_x11_display_update_workspace_names (MetaX11Display *x11_display)
x11_display->atom__NET_DESKTOP_NAMES, x11_display->atom__NET_DESKTOP_NAMES,
&names, &n_names)) &names, &n_names))
{ {
meta_verbose ("Failed to get workspace names from root window"); meta_topic (META_DEBUG_X11,
"Failed to get workspace names from root window");
return; return;
} }

View File

@ -98,21 +98,23 @@ meta_window_x11_set_frame_xwindow (MetaWindow *window,
meta_sync_counter_init (&frame->sync_counter, window, frame->xwindow); meta_sync_counter_init (&frame->sync_counter, window, frame->xwindow);
meta_verbose ("Frame geometry %d,%d %dx%d", meta_topic (META_DEBUG_X11, "Frame geometry %d,%d %dx%d",
frame->rect.x, frame->rect.y, frame->rect.x, frame->rect.y,
frame->rect.width, frame->rect.height); frame->rect.width, frame->rect.height);
meta_verbose ("Setting frame 0x%lx for window %s, " meta_topic (META_DEBUG_X11,
"frame geometry %d,%d %dx%d", "Setting frame 0x%lx for window %s, "
xframe, window->desc, "frame geometry %d,%d %dx%d",
frame->rect.x, frame->rect.y, xframe, window->desc,
frame->rect.width, frame->rect.height); frame->rect.x, frame->rect.y,
frame->rect.width, frame->rect.height);
meta_stack_tracker_record_add (window->display->stack_tracker, meta_stack_tracker_record_add (window->display->stack_tracker,
frame->xwindow, frame->xwindow,
create_serial); create_serial);
meta_verbose ("Frame for %s is 0x%lx", frame->window->desc, frame->xwindow); meta_topic (META_DEBUG_X11,
"Frame for %s is 0x%lx", frame->window->desc, frame->xwindow);
mtk_x11_error_trap_push (x11_display->xdisplay); mtk_x11_error_trap_push (x11_display->xdisplay);
@ -222,7 +224,7 @@ meta_window_destroy_frame (MetaWindow *window)
x11_display = window->display->x11_display; x11_display = window->display->x11_display;
meta_verbose ("Unframing window %s", window->desc); meta_topic (META_DEBUG_X11, "Unframing window %s", window->desc);
frame = g_steal_pointer (&priv->frame); frame = g_steal_pointer (&priv->frame);

View File

@ -374,7 +374,7 @@ meta_x11_keybindings_grab_window_buttons (MetaKeyBindingManager *keys,
* Grab Alt + button3 for popping up window menu. * Grab Alt + button3 for popping up window menu.
* Grab Alt + Shift + button1 for snap-moving window. * Grab Alt + Shift + button1 for snap-moving window.
*/ */
meta_verbose ("Grabbing window buttons for %s", window->desc); meta_topic (META_DEBUG_X11, "Grabbing window buttons for %s", window->desc);
/* FIXME If we ignored errors here instead of spewing, we could /* FIXME If we ignored errors here instead of spewing, we could
* put one big error trap around the loop and avoid a bunch of * put one big error trap around the loop and avoid a bunch of
@ -415,14 +415,19 @@ meta_x11_keybindings_grab_focus_window_button (MetaKeyBindingManager *keys,
MetaWindow *window) MetaWindow *window)
{ {
/* Grab button 1 for activating unfocused windows */ /* Grab button 1 for activating unfocused windows */
meta_verbose ("Grabbing unfocused window buttons for %s", window->desc);
if (window->have_focus_click_grab) if (window->have_focus_click_grab)
{ {
meta_verbose (" (well, not grabbing since we already have the grab)"); meta_topic (META_DEBUG_X11,
"Not grabbing unfocused window buttons for %s "
"since we already have the grab",
window->desc);
return; return;
} }
meta_topic (META_DEBUG_X11,
"Grabbing unfocused window buttons for %s", window->desc);
/* FIXME If we ignored errors here instead of spewing, we could /* FIXME If we ignored errors here instead of spewing, we could
* put one big error trap around the loop and avoid a bunch of * put one big error trap around the loop and avoid a bunch of
* XSync() * XSync()
@ -436,7 +441,8 @@ void
meta_x11_keybindings_ungrab_focus_window_button (MetaKeyBindingManager *keys, meta_x11_keybindings_ungrab_focus_window_button (MetaKeyBindingManager *keys,
MetaWindow *window) MetaWindow *window)
{ {
meta_verbose ("Ungrabbing unfocused window buttons for %s", window->desc); meta_topic (META_DEBUG_X11,
"Ungrabbing unfocused window buttons for %s", window->desc);
if (!window->have_focus_click_grab) if (!window->have_focus_click_grab)
return; return;

View File

@ -219,8 +219,9 @@ reload_wm_client_machine (MetaWindow *window,
if (value->type != META_PROP_VALUE_INVALID) if (value->type != META_PROP_VALUE_INVALID)
priv->wm_client_machine = g_strdup (value->v.str); priv->wm_client_machine = g_strdup (value->v.str);
meta_verbose ("Window has client machine \"%s\"", meta_topic (META_DEBUG_X11,
priv->wm_client_machine ? priv->wm_client_machine : "unset"); "Window has client machine \"%s\"",
priv->wm_client_machine ? priv->wm_client_machine : "unset");
if (priv->wm_client_machine == NULL) if (priv->wm_client_machine == NULL)
{ {
@ -298,8 +299,9 @@ reload_icon_geometry (MetaWindow *window,
{ {
if (value->v.cardinal_list.n_cardinals != 4) if (value->v.cardinal_list.n_cardinals != 4)
{ {
meta_verbose ("_NET_WM_ICON_GEOMETRY on %s has %d values instead of 4", meta_topic (META_DEBUG_X11,
window->desc, value->v.cardinal_list.n_cardinals); "_NET_WM_ICON_GEOMETRY on %s has %d values instead of 4",
window->desc, value->v.cardinal_list.n_cardinals);
} }
else else
{ {
@ -373,8 +375,9 @@ reload_gtk_frame_extents (MetaWindow *window,
{ {
if (value->v.cardinal_list.n_cardinals != 4) if (value->v.cardinal_list.n_cardinals != 4)
{ {
meta_verbose ("_GTK_FRAME_EXTENTS on %s has %d values instead of 4", meta_topic (META_DEBUG_X11,
window->desc, value->v.cardinal_list.n_cardinals); "_GTK_FRAME_EXTENTS on %s has %d values instead of 4",
window->desc, value->v.cardinal_list.n_cardinals);
} }
else else
{ {
@ -609,8 +612,9 @@ reload_net_wm_name (MetaWindow *window,
set_window_title (window, value->v.str); set_window_title (window, value->v.str);
priv->using_net_wm_name = TRUE; priv->using_net_wm_name = TRUE;
meta_verbose ("Using _NET_WM_NAME for new title of %s: \"%s\"", meta_topic (META_DEBUG_X11,
window->desc, window->title); "Using _NET_WM_NAME for new title of %s: \"%s\"",
window->desc, window->title);
} }
else else
{ {
@ -631,8 +635,9 @@ reload_wm_name (MetaWindow *window,
if (priv->using_net_wm_name) if (priv->using_net_wm_name)
{ {
meta_verbose ("Ignoring WM_NAME \"%s\" as _NET_WM_NAME is set", meta_topic (META_DEBUG_X11,
value->v.str); "Ignoring WM_NAME \"%s\" as _NET_WM_NAME is set",
value->v.str);
return; return;
} }
@ -640,8 +645,9 @@ reload_wm_name (MetaWindow *window,
{ {
set_window_title (window, value->v.str); set_window_title (window, value->v.str);
meta_verbose ("Using WM_NAME for new title of %s: \"%s\"", meta_topic (META_DEBUG_X11,
window->desc, window->title); "Using WM_NAME for new title of %s: \"%s\"",
window->desc, window->title);
} }
else else
{ {
@ -685,7 +691,8 @@ reload_opaque_region (MetaWindow *window,
if (nitems % 4 != 0) if (nitems % 4 != 0)
{ {
meta_verbose ("_NET_WM_OPAQUE_REGION does not have a list of 4-tuples."); meta_topic (META_DEBUG_X11,
"_NET_WM_OPAQUE_REGION does not have a list of 4-tuples.");
goto out; goto out;
} }
@ -779,19 +786,15 @@ reload_net_wm_state (MetaWindow *window,
MetaX11Display *x11_display = window->display->x11_display; MetaX11Display *x11_display = window->display->x11_display;
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window); MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
MetaWindowX11Private *priv = meta_window_x11_get_private (window_x11); MetaWindowX11Private *priv = meta_window_x11_get_private (window_x11);
int i; int i;
/* We know this is only an initial window creation, if (!initial)
* clients don't change the property. {
*/ meta_topic (META_DEBUG_X11,
"Ignoring _NET_WM_STATE: we should be the one who set "
if (!initial) {
/* no, they DON'T change the property */
meta_verbose ("Ignoring _NET_WM_STATE: we should be the one who set "
"the property in the first place"); "the property in the first place");
return; return;
} }
window->maximized_horizontally = FALSE; window->maximized_horizontally = FALSE;
window->maximized_vertically = FALSE; window->maximized_vertically = FALSE;
@ -838,8 +841,9 @@ reload_net_wm_state (MetaWindow *window,
++i; ++i;
} }
meta_verbose ("Reloaded _NET_WM_STATE for %s", meta_topic (META_DEBUG_X11,
window->desc); "Reloaded _NET_WM_STATE for %s",
window->desc);
meta_window_x11_recalc_window_type (window); meta_window_x11_recalc_window_type (window);
meta_window_recalc_features (window); meta_window_recalc_features (window);
@ -863,7 +867,7 @@ reload_mwm_hints (MetaWindow *window,
if (value->type == META_PROP_VALUE_INVALID) if (value->type == META_PROP_VALUE_INVALID)
{ {
meta_verbose ("Window %s has no MWM hints", window->desc); meta_topic (META_DEBUG_X11, "Window %s has no MWM hints", window->desc);
meta_window_recalc_features (window); meta_window_recalc_features (window);
return; return;
} }
@ -872,13 +876,13 @@ reload_mwm_hints (MetaWindow *window,
/* We support those MWM hints deemed non-stupid */ /* We support those MWM hints deemed non-stupid */
meta_verbose ("Window %s has MWM hints", meta_topic (META_DEBUG_X11, "Window %s has MWM hints",
window->desc); window->desc);
if (hints->flags & MWM_HINTS_DECORATIONS) if (hints->flags & MWM_HINTS_DECORATIONS)
{ {
meta_verbose ("Window %s sets MWM_HINTS_DECORATIONS 0x%x", meta_topic (META_DEBUG_X11, "Window %s sets MWM_HINTS_DECORATIONS 0x%x",
window->desc, hints->decorations); window->desc, hints->decorations);
if (hints->decorations == 0) if (hints->decorations == 0)
window->mwm_decorated = FALSE; window->mwm_decorated = FALSE;
@ -887,14 +891,16 @@ reload_mwm_hints (MetaWindow *window,
window->mwm_border_only = TRUE; window->mwm_border_only = TRUE;
} }
else else
meta_verbose ("Decorations flag unset"); {
meta_topic (META_DEBUG_X11, "Decorations flag unset");
}
if (hints->flags & MWM_HINTS_FUNCTIONS) if (hints->flags & MWM_HINTS_FUNCTIONS)
{ {
gboolean toggle_value; gboolean toggle_value;
meta_verbose ("Window %s sets MWM_HINTS_FUNCTIONS 0x%x", meta_topic (META_DEBUG_X11, "Window %s sets MWM_HINTS_FUNCTIONS 0x%x",
window->desc, hints->functions); window->desc, hints->functions);
/* If _ALL is specified, then other flags indicate what to turn off; /* If _ALL is specified, then other flags indicate what to turn off;
* if ALL is not specified, flags are what to turn on. * if ALL is not specified, flags are what to turn on.
@ -905,8 +911,8 @@ reload_mwm_hints (MetaWindow *window,
{ {
toggle_value = TRUE; toggle_value = TRUE;
meta_verbose ("Window %s disables all funcs then reenables some", meta_topic (META_DEBUG_X11, "Window %s disables all funcs then reenables some",
window->desc); window->desc);
window->mwm_has_close_func = FALSE; window->mwm_has_close_func = FALSE;
window->mwm_has_minimize_func = FALSE; window->mwm_has_minimize_func = FALSE;
window->mwm_has_maximize_func = FALSE; window->mwm_has_maximize_func = FALSE;
@ -915,45 +921,45 @@ reload_mwm_hints (MetaWindow *window,
} }
else else
{ {
meta_verbose ("Window %s enables all funcs then disables some", meta_topic (META_DEBUG_X11, "Window %s enables all funcs then disables some",
window->desc); window->desc);
toggle_value = FALSE; toggle_value = FALSE;
} }
if ((hints->functions & MWM_FUNC_CLOSE) != 0) if ((hints->functions & MWM_FUNC_CLOSE) != 0)
{ {
meta_verbose ("Window %s toggles close via MWM hints", meta_topic (META_DEBUG_X11, "Window %s toggles close via MWM hints",
window->desc); window->desc);
window->mwm_has_close_func = toggle_value; window->mwm_has_close_func = toggle_value;
} }
if ((hints->functions & MWM_FUNC_MINIMIZE) != 0) if ((hints->functions & MWM_FUNC_MINIMIZE) != 0)
{ {
meta_verbose ("Window %s toggles minimize via MWM hints", meta_topic (META_DEBUG_X11, "Window %s toggles minimize via MWM hints",
window->desc); window->desc);
window->mwm_has_minimize_func = toggle_value; window->mwm_has_minimize_func = toggle_value;
} }
if ((hints->functions & MWM_FUNC_MAXIMIZE) != 0) if ((hints->functions & MWM_FUNC_MAXIMIZE) != 0)
{ {
meta_verbose ("Window %s toggles maximize via MWM hints", meta_topic (META_DEBUG_X11, "Window %s toggles maximize via MWM hints",
window->desc); window->desc);
window->mwm_has_maximize_func = toggle_value; window->mwm_has_maximize_func = toggle_value;
} }
if ((hints->functions & MWM_FUNC_MOVE) != 0) if ((hints->functions & MWM_FUNC_MOVE) != 0)
{ {
meta_verbose ("Window %s toggles move via MWM hints", meta_topic (META_DEBUG_X11, "Window %s toggles move via MWM hints",
window->desc); window->desc);
window->mwm_has_move_func = toggle_value; window->mwm_has_move_func = toggle_value;
} }
if ((hints->functions & MWM_FUNC_RESIZE) != 0) if ((hints->functions & MWM_FUNC_RESIZE) != 0)
{ {
meta_verbose ("Window %s toggles resize via MWM hints", meta_topic (META_DEBUG_X11, "Window %s toggles resize via MWM hints",
window->desc); window->desc);
window->mwm_has_resize_func = toggle_value; window->mwm_has_resize_func = toggle_value;
} }
} }
else else
{ {
meta_verbose ("Functions flag unset"); meta_topic (META_DEBUG_X11, "Functions flag unset");
} }
meta_window_recalc_features (window); meta_window_recalc_features (window);
@ -996,10 +1002,10 @@ reload_wm_class (MetaWindow *window,
meta_window_set_wm_class (window, NULL, NULL); meta_window_set_wm_class (window, NULL, NULL);
} }
meta_verbose ("Window %s class: '%s' name: '%s'", meta_topic (META_DEBUG_X11, "Window %s class: '%s' name: '%s'",
window->desc, window->desc,
window->res_class ? window->res_class : "none", window->res_class ? window->res_class : "none",
window->res_name ? window->res_name : "none"); window->res_name ? window->res_name : "none");
} }
static void static void
@ -1052,9 +1058,10 @@ reload_net_startup_id (MetaWindow *window,
} }
} }
meta_verbose ("New _NET_STARTUP_ID \"%s\" for %s", meta_topic (META_DEBUG_X11,
window->startup_id ? window->startup_id : "unset", "New _NET_STARTUP_ID \"%s\" for %s",
window->desc); window->startup_id ? window->startup_id : "unset",
window->desc);
} }
static void static void
@ -1355,9 +1362,10 @@ reload_wm_protocols (MetaWindow *window,
++i; ++i;
} }
meta_verbose ("New _NET_STARTUP_ID \"%s\" for %s", meta_topic (META_DEBUG_X11,
window->startup_id ? window->startup_id : "unset", "New _NET_STARTUP_ID \"%s\" for %s",
window->desc); window->startup_id ? window->startup_id : "unset",
window->desc);
} }
static void static void
@ -1402,17 +1410,19 @@ reload_wm_hints (MetaWindow *window,
if (hints->flags & XUrgencyHint) if (hints->flags & XUrgencyHint)
urgent = TRUE; urgent = TRUE;
meta_verbose ("Read WM_HINTS input: %d iconic: %d group leader: 0x%lx pixmap: 0x%lx mask: 0x%lx", meta_topic (META_DEBUG_X11,
window->input, window->initially_iconic, "Read WM_HINTS input: %d iconic: %d group leader: 0x%lx pixmap: 0x%lx mask: 0x%lx",
priv->xgroup_leader, window->input, window->initially_iconic,
priv->wm_hints_pixmap, priv->xgroup_leader,
priv->wm_hints_mask); priv->wm_hints_pixmap,
priv->wm_hints_mask);
} }
if (priv->xgroup_leader != old_group_leader) if (priv->xgroup_leader != old_group_leader)
{ {
meta_verbose ("Window %s changed its group leader to 0x%lx", meta_topic (META_DEBUG_X11,
window->desc, priv->xgroup_leader); "Window %s changed its group leader to 0x%lx",
window->desc, priv->xgroup_leader);
meta_window_x11_group_leader_changed (window); meta_window_x11_group_leader_changed (window);
} }
@ -1509,9 +1519,14 @@ reload_transient_for (MetaWindow *window,
current_transient_for = transient_for; current_transient_for = transient_for;
if (current_transient_for != None) if (current_transient_for != None)
meta_verbose ("Window %s transient for 0x%lx", window->desc, current_transient_for); {
meta_topic (META_DEBUG_X11, "Window %s transient for 0x%lx",
window->desc, current_transient_for);
}
else else
meta_verbose ("Window %s is not transient", window->desc); {
meta_topic (META_DEBUG_X11, "Window %s is not transient", window->desc);
}
if (current_transient_for == None || if (current_transient_for == None ||
current_transient_for == window->display->x11_display->xroot) current_transient_for == window->display->x11_display->xroot)
@ -1533,8 +1548,9 @@ reload_gtk_theme_variant (MetaWindow *window,
if (value->type != META_PROP_VALUE_INVALID) if (value->type != META_PROP_VALUE_INVALID)
{ {
requested_variant = value->v.str; requested_variant = value->v.str;
meta_verbose ("Requested \"%s\" theme variant for window %s.", meta_topic (META_DEBUG_X11,
requested_variant, window->desc); "Requested \"%s\" theme variant for window %s.",
requested_variant, window->desc);
} }
if (g_strcmp0 (requested_variant, current_variant) != 0) if (g_strcmp0 (requested_variant, current_variant) != 0)
@ -1565,11 +1581,19 @@ reload_bypass_compositor (MetaWindow *window,
return; return;
if (requested_value == META_BYPASS_COMPOSITOR_HINT_ON) if (requested_value == META_BYPASS_COMPOSITOR_HINT_ON)
meta_verbose ("Request to bypass compositor for window %s.", window->desc); {
meta_topic (META_DEBUG_X11,
"Request to bypass compositor for window %s.", window->desc);
}
else if (requested_value == META_BYPASS_COMPOSITOR_HINT_OFF) else if (requested_value == META_BYPASS_COMPOSITOR_HINT_OFF)
meta_verbose ("Request to don't bypass compositor for window %s.", window->desc); {
meta_topic (META_DEBUG_X11,
"Request to don't bypass compositor for window %s.", window->desc);
}
else if (requested_value != META_BYPASS_COMPOSITOR_HINT_AUTO) else if (requested_value != META_BYPASS_COMPOSITOR_HINT_AUTO)
return; {
return;
}
priv->bypass_compositor = requested_value; priv->bypass_compositor = requested_value;
} }

View File

@ -267,7 +267,8 @@ update_sm_hints (MetaWindow *window)
} }
else else
{ {
meta_verbose ("Didn't find a client leader for %s", window->desc); meta_topic (META_DEBUG_X11,
"Didn't find a client leader for %s", window->desc);
if (!meta_prefs_get_disable_workarounds ()) if (!meta_prefs_get_disable_workarounds ())
{ {
@ -280,14 +281,20 @@ update_sm_hints (MetaWindow *window)
&priv->sm_client_id); &priv->sm_client_id);
if (priv->sm_client_id) if (priv->sm_client_id)
meta_warning ("Window %s sets SM_CLIENT_ID on itself, instead of on the WM_CLIENT_LEADER window as specified in the ICCCM.", {
meta_topic (META_DEBUG_X11,
"Window %s sets SM_CLIENT_ID on itself, "
"instead of on the WM_CLIENT_LEADER window "
"as specified in the ICCCM.",
window->desc); window->desc);
}
} }
} }
meta_verbose ("Window %s client leader: 0x%lx SM_CLIENT_ID: '%s'", meta_topic (META_DEBUG_X11,
window->desc, priv->xclient_leader, "Window %s client leader: 0x%lx SM_CLIENT_ID: '%s'",
priv->sm_client_id ? priv->sm_client_id : "none"); window->desc, priv->xclient_leader,
priv->sm_client_id ? priv->sm_client_id : "none");
} }
static void static void
@ -726,7 +733,8 @@ meta_window_x11_unmanage (MetaWindow *window)
/* We need to clean off the window's state so it /* We need to clean off the window's state so it
* won't be restored if the app maps it again. * won't be restored if the app maps it again.
*/ */
meta_verbose ("Cleaning state from window %s", window->desc); meta_topic (META_DEBUG_X11,
"Cleaning state from window %s", window->desc);
XDeleteProperty (x11_display->xdisplay, XDeleteProperty (x11_display->xdisplay,
priv->xwindow, priv->xwindow,
x11_display->atom__NET_WM_DESKTOP); x11_display->atom__NET_WM_DESKTOP);
@ -1324,7 +1332,8 @@ update_gtk_edge_constraints (MetaWindow *window)
data[0] = edge_constraints_to_gtk_edge_constraints (window); data[0] = edge_constraints_to_gtk_edge_constraints (window);
meta_verbose ("Setting _GTK_EDGE_CONSTRAINTS to %lu", data[0]); meta_topic (META_DEBUG_X11,
"Setting _GTK_EDGE_CONSTRAINTS to %lu", data[0]);
mtk_x11_error_trap_push (x11_display->xdisplay); mtk_x11_error_trap_push (x11_display->xdisplay);
XChangeProperty (x11_display->xdisplay, XChangeProperty (x11_display->xdisplay,
@ -1358,8 +1367,9 @@ meta_window_x11_current_workspace_changed (MetaWindow *window)
data[0] = meta_window_get_net_wm_desktop (window); data[0] = meta_window_get_net_wm_desktop (window);
meta_verbose ("Setting _NET_WM_DESKTOP of %s to %lu", meta_topic (META_DEBUG_X11,
window->desc, data[0]); "Setting _NET_WM_DESKTOP of %s to %lu",
window->desc, data[0]);
mtk_x11_error_trap_push (x11_display->xdisplay); mtk_x11_error_trap_push (x11_display->xdisplay);
XChangeProperty (x11_display->xdisplay, XChangeProperty (x11_display->xdisplay,
@ -1654,7 +1664,7 @@ meta_window_x11_update_struts (MetaWindow *window)
g_return_val_if_fail (!window->override_redirect, FALSE); g_return_val_if_fail (!window->override_redirect, FALSE);
meta_verbose ("Updating struts for %s", window->desc); meta_topic (META_DEBUG_X11, "Updating struts for %s", window->desc);
Window xwindow = meta_window_x11_get_xwindow (window); Window xwindow = meta_window_x11_get_xwindow (window);
old_struts = g_steal_pointer (&window->struts); old_struts = g_steal_pointer (&window->struts);
@ -1666,9 +1676,11 @@ meta_window_x11_update_struts (MetaWindow *window)
&struts, &nitems)) &struts, &nitems))
{ {
if (nitems != 12) if (nitems != 12)
meta_verbose ("_NET_WM_STRUT_PARTIAL on %s has %d values instead " {
"of 12", meta_topic (META_DEBUG_X11,
"_NET_WM_STRUT_PARTIAL on %s has %d values instead of 12.",
window->desc, nitems); window->desc, nitems);
}
else else
{ {
/* Pull out the strut info for each side in the hint */ /* Pull out the strut info for each side in the hint */
@ -1724,17 +1736,19 @@ meta_window_x11_update_struts (MetaWindow *window)
new_struts = g_slist_prepend (new_struts, temp); new_struts = g_slist_prepend (new_struts, temp);
} }
meta_verbose ("_NET_WM_STRUT_PARTIAL struts %u %u %u %u for " meta_topic (META_DEBUG_X11,
"window %s", "_NET_WM_STRUT_PARTIAL struts %u %u %u %u for "
struts[0], struts[1], struts[2], struts[3], "window %s",
window->desc); struts[0], struts[1], struts[2], struts[3],
window->desc);
} }
g_free (struts); g_free (struts);
} }
else else
{ {
meta_verbose ("No _NET_WM_STRUT property for %s", meta_topic (META_DEBUG_X11,
window->desc); "No _NET_WM_STRUT property for %s",
window->desc);
} }
if (!new_struts && if (!new_struts &&
@ -1744,8 +1758,9 @@ meta_window_x11_update_struts (MetaWindow *window)
&struts, &nitems)) &struts, &nitems))
{ {
if (nitems != 4) if (nitems != 4)
meta_verbose ("_NET_WM_STRUT on %s has %d values instead of 4", meta_topic (META_DEBUG_X11,
window->desc, nitems); "_NET_WM_STRUT on %s has %d values instead of 4",
window->desc, nitems);
else else
{ {
/* Pull out the strut info for each side in the hint */ /* Pull out the strut info for each side in the hint */
@ -1789,16 +1804,17 @@ meta_window_x11_update_struts (MetaWindow *window)
new_struts = g_slist_prepend (new_struts, temp); new_struts = g_slist_prepend (new_struts, temp);
} }
meta_verbose ("_NET_WM_STRUT struts %u %u %u %u for window %s", meta_topic (META_DEBUG_X11,
struts[0], struts[1], struts[2], struts[3], "_NET_WM_STRUT struts %u %u %u %u for window %s",
window->desc); struts[0], struts[1], struts[2], struts[3],
window->desc);
} }
g_free (struts); g_free (struts);
} }
else if (!new_struts) else if (!new_struts)
{ {
meta_verbose ("No _NET_WM_STRUT property for %s", meta_topic (META_DEBUG_X11, "No _NET_WM_STRUT property for %s",
window->desc); window->desc);
} }
/* Determine whether old_struts and new_struts are the same */ /* Determine whether old_struts and new_struts are the same */
@ -2162,15 +2178,16 @@ meta_window_x11_constructed (GObject *object)
XWindowAttributes attrs = priv->attributes; XWindowAttributes attrs = priv->attributes;
MtkRectangle rect; MtkRectangle rect;
meta_verbose ("attrs->map_state = %d (%s)", meta_topic (META_DEBUG_X11,
attrs.map_state, "attrs->map_state = %d (%s)",
(attrs.map_state == IsUnmapped) ? attrs.map_state,
"IsUnmapped" : (attrs.map_state == IsUnmapped) ?
(attrs.map_state == IsViewable) ? "IsUnmapped" :
"IsViewable" : (attrs.map_state == IsViewable) ?
(attrs.map_state == IsUnviewable) ? "IsViewable" :
"IsUnviewable" : (attrs.map_state == IsUnviewable) ?
"(unknown)"); "IsUnviewable" :
"(unknown)");
window->client_type = META_WINDOW_CLIENT_TYPE_X11; window->client_type = META_WINDOW_CLIENT_TYPE_X11;
window->override_redirect = attrs.override_redirect; window->override_redirect = attrs.override_redirect;
@ -2401,7 +2418,7 @@ meta_window_x11_set_net_wm_state (MetaWindow *window)
++i; ++i;
} }
meta_verbose ("Setting _NET_WM_STATE with %d atoms", i); meta_topic (META_DEBUG_X11, "Setting _NET_WM_STATE with %d atoms", i);
mtk_x11_error_trap_push (x11_display->xdisplay); mtk_x11_error_trap_push (x11_display->xdisplay);
XChangeProperty (x11_display->xdisplay, priv->xwindow, XChangeProperty (x11_display->xdisplay, priv->xwindow,
@ -2437,7 +2454,7 @@ meta_window_x11_set_net_wm_state (MetaWindow *window)
meta_x11_display_logical_monitor_to_xinerama_index (window->display->x11_display, meta_x11_display_logical_monitor_to_xinerama_index (window->display->x11_display,
window->fullscreen_monitors.right); window->fullscreen_monitors.right);
meta_verbose ("Setting _NET_WM_FULLSCREEN_MONITORS"); meta_topic (META_DEBUG_X11, "Setting _NET_WM_FULLSCREEN_MONITORS");
mtk_x11_error_trap_push (x11_display->xdisplay); mtk_x11_error_trap_push (x11_display->xdisplay);
XChangeProperty (x11_display->xdisplay, XChangeProperty (x11_display->xdisplay,
priv->xwindow, priv->xwindow,
@ -2448,7 +2465,7 @@ meta_window_x11_set_net_wm_state (MetaWindow *window)
} }
else else
{ {
meta_verbose ("Clearing _NET_WM_FULLSCREEN_MONITORS"); meta_topic (META_DEBUG_X11, "Clearing _NET_WM_FULLSCREEN_MONITORS");
mtk_x11_error_trap_push (x11_display->xdisplay); mtk_x11_error_trap_push (x11_display->xdisplay);
XDeleteProperty (x11_display->xdisplay, XDeleteProperty (x11_display->xdisplay,
priv->xwindow, priv->xwindow,
@ -3134,8 +3151,9 @@ meta_window_x11_configure_request (MetaWindow *window,
return TRUE; return TRUE;
meta_topic (META_DEBUG_STACK, meta_topic (META_DEBUG_STACK,
"xconfigure stacking request from window %s sibling %s stackmode %d", "xconfigure stacking request from window %s "
window->desc, sibling->desc, event->xconfigurerequest.detail); "sibling %s stackmode %d",
window->desc, sibling->desc, event->xconfigurerequest.detail);
} }
restack_window (window, sibling, event->xconfigurerequest.detail); restack_window (window, sibling, event->xconfigurerequest.detail);
} }
@ -3156,8 +3174,8 @@ meta_window_x11_impl_process_property_notify (MetaWindow *window,
char *property_name = XGetAtomName (window->display->x11_display->xdisplay, char *property_name = XGetAtomName (window->display->x11_display->xdisplay,
event->atom); event->atom);
meta_verbose ("Property notify on %s for %s", meta_topic (META_DEBUG_X11, "Property notify on %s for %s",
window->desc, property_name); window->desc, property_name);
XFree (property_name); XFree (property_name);
} }
@ -3377,8 +3395,8 @@ meta_window_x11_client_message (MetaWindow *window,
space = event->xclient.data.l[0]; space = event->xclient.data.l[0];
meta_verbose ("Request to move %s to workspace %d", meta_topic (META_DEBUG_X11, "Request to move %s to workspace %d",
window->desc, space); window->desc, space);
workspace = workspace =
meta_workspace_manager_get_workspace_by_index (workspace_manager, meta_workspace_manager_get_workspace_by_index (workspace_manager,
@ -3389,10 +3407,10 @@ meta_window_x11_client_message (MetaWindow *window,
else if (space == (int) 0xFFFFFFFF) else if (space == (int) 0xFFFFFFFF)
meta_window_stick (window); meta_window_stick (window);
else else
meta_verbose ("No such workspace %d for screen", space); meta_topic (META_DEBUG_X11, "No such workspace %d for screen", space);
meta_verbose ("Window %s now on_all_workspaces = %d", meta_topic (META_DEBUG_X11, "Window %s now on_all_workspaces = %d",
window->desc, window->on_all_workspaces); window->desc, window->on_all_workspaces);
return TRUE; return TRUE;
} }
@ -3422,10 +3440,10 @@ meta_window_x11_client_message (MetaWindow *window,
if (mtk_x11_error_trap_pop_with_return (x11_display->xdisplay) != Success) if (mtk_x11_error_trap_pop_with_return (x11_display->xdisplay) != Success)
str2 = NULL; str2 = NULL;
meta_verbose ("Request to change _NET_WM_STATE action %lu atom1: %s atom2: %s", meta_topic (META_DEBUG_X11, "Request to change _NET_WM_STATE action %lu atom1: %s atom2: %s",
action, action,
str1 ? str1 : "(unknown)", str1 ? str1 : "(unknown)",
str2 ? str2 : "(unknown)"); str2 ? str2 : "(unknown)");
meta_XFree (str1); meta_XFree (str1);
meta_XFree (str2); meta_XFree (str2);
@ -3558,8 +3576,8 @@ meta_window_x11_client_message (MetaWindow *window,
else if (event->xclient.message_type == else if (event->xclient.message_type ==
x11_display->atom_WM_CHANGE_STATE) x11_display->atom_WM_CHANGE_STATE)
{ {
meta_verbose ("WM_CHANGE_STATE client message, state: %ld", meta_topic (META_DEBUG_X11, "WM_CHANGE_STATE client message, state: %ld",
event->xclient.data.l[0]); event->xclient.data.l[0]);
if (event->xclient.data.l[0] == IconicState) if (event->xclient.data.l[0] == IconicState)
meta_window_minimize (window); meta_window_minimize (window);
@ -3775,8 +3793,8 @@ meta_window_x11_client_message (MetaWindow *window,
MetaClientType source_indication; MetaClientType source_indication;
guint32 timestamp; guint32 timestamp;
meta_verbose ("_NET_ACTIVE_WINDOW request for window '%s', activating", meta_topic (META_DEBUG_X11, "_NET_ACTIVE_WINDOW request for window '%s', activating",
window->desc); window->desc);
source_indication = event->xclient.data.l[0]; source_indication = event->xclient.data.l[0];
timestamp = event->xclient.data.l[1]; timestamp = event->xclient.data.l[1];
@ -3801,8 +3819,9 @@ meta_window_x11_client_message (MetaWindow *window,
{ {
MetaLogicalMonitor *top, *bottom, *left, *right; MetaLogicalMonitor *top, *bottom, *left, *right;
meta_verbose ("_NET_WM_FULLSCREEN_MONITORS request for window '%s'", meta_topic (META_DEBUG_X11,
window->desc); "_NET_WM_FULLSCREEN_MONITORS request for window '%s'",
window->desc);
top = top =
meta_x11_display_xinerama_index_to_logical_monitor (window->display->x11_display, meta_x11_display_xinerama_index_to_logical_monitor (window->display->x11_display,
@ -4043,12 +4062,12 @@ meta_window_x11_new (MetaDisplay *display,
MetaWindow *window = NULL; MetaWindow *window = NULL;
gulong event_mask; gulong event_mask;
meta_verbose ("Attempting to manage 0x%lx", xwindow); meta_topic (META_DEBUG_X11, "Attempting to manage 0x%lx", xwindow);
if (meta_x11_display_xwindow_is_a_no_focus_window (x11_display, xwindow)) if (meta_x11_display_xwindow_is_a_no_focus_window (x11_display, xwindow))
{ {
meta_verbose ("Not managing no_focus_window 0x%lx", meta_topic (META_DEBUG_X11, "Not managing no_focus_window 0x%lx",
xwindow); xwindow);
return NULL; return NULL;
} }
@ -4063,32 +4082,32 @@ meta_window_x11_new (MetaDisplay *display,
if (!XGetWindowAttributes (x11_display->xdisplay, xwindow, &attrs)) if (!XGetWindowAttributes (x11_display->xdisplay, xwindow, &attrs))
{ {
meta_verbose ("Failed to get attributes for window 0x%lx", meta_topic (META_DEBUG_X11, "Failed to get attributes for window 0x%lx",
xwindow); xwindow);
goto error; goto error;
} }
if (attrs.root != x11_display->xroot) if (attrs.root != x11_display->xroot)
{ {
meta_verbose ("Not on our screen"); meta_topic (META_DEBUG_X11, "Not on our screen");
goto error; goto error;
} }
if (attrs.class == InputOnly) if (attrs.class == InputOnly)
{ {
meta_verbose ("Not managing InputOnly windows"); meta_topic (META_DEBUG_X11, "Not managing InputOnly windows");
goto error; goto error;
} }
if (is_our_xwindow (x11_display, xwindow, &attrs)) if (is_our_xwindow (x11_display, xwindow, &attrs))
{ {
meta_verbose ("Not managing our own windows"); meta_topic (META_DEBUG_X11, "Not managing our own windows");
goto error; goto error;
} }
if (maybe_filter_xwindow (display, xwindow, must_be_viewable, &attrs)) if (maybe_filter_xwindow (display, xwindow, must_be_viewable, &attrs))
{ {
meta_verbose ("Not managing filtered window"); meta_topic (META_DEBUG_X11, "Not managing filtered window");
goto error; goto error;
} }
@ -4105,14 +4124,15 @@ meta_window_x11_new (MetaDisplay *display,
&state) && &state) &&
(state == IconicState || state == NormalState))) (state == IconicState || state == NormalState)))
{ {
meta_verbose ("Deciding not to manage unmapped or unviewable window 0x%lx", meta_topic (META_DEBUG_X11,
xwindow); "Deciding not to manage unmapped or unviewable window 0x%lx",
xwindow);
goto error; goto error;
} }
existing_wm_state = state; existing_wm_state = state;
meta_verbose ("WM_STATE of %lx = %s", xwindow, meta_topic (META_DEBUG_X11, "WM_STATE of %lx = %s", xwindow,
wm_state_to_string (existing_wm_state)); wm_state_to_string (existing_wm_state));
} }
/* /*
@ -4170,8 +4190,9 @@ meta_window_x11_new (MetaDisplay *display,
if (mtk_x11_error_trap_pop_with_return (x11_display->xdisplay) != Success) if (mtk_x11_error_trap_pop_with_return (x11_display->xdisplay) != Success)
{ {
meta_verbose ("Window 0x%lx disappeared just as we tried to manage it", meta_topic (META_DEBUG_X11,
xwindow); "Window 0x%lx disappeared just as we tried to manage it",
xwindow);
goto error; goto error;
} }
@ -4201,8 +4222,9 @@ meta_window_x11_new (MetaDisplay *display,
{ {
/* WM_STATE said minimized */ /* WM_STATE said minimized */
window->minimized = TRUE; window->minimized = TRUE;
meta_verbose ("Window %s had preexisting WM_STATE = IconicState, minimizing", meta_topic (META_DEBUG_X11,
window->desc); "Window %s had preexisting WM_STATE = IconicState, minimizing",
window->desc);
/* Assume window was previously placed, though perhaps it's /* Assume window was previously placed, though perhaps it's
* been iconic its whole life, we have no way of knowing. * been iconic its whole life, we have no way of knowing.
@ -4333,8 +4355,8 @@ meta_window_x11_recalc_window_type (MetaWindow *window)
} }
} }
meta_verbose ("Calculated type %u for %s, old type %u", meta_topic (META_DEBUG_X11, "Calculated type %u for %s, old type %u",
type, window->desc, type); type, window->desc, type);
meta_window_set_type (window, type); meta_window_set_type (window, type);
} }
@ -4440,7 +4462,8 @@ meta_window_x11_set_allowed_actions_hint (MetaWindow *window)
g_assert (i <= MAX_N_ACTIONS); g_assert (i <= MAX_N_ACTIONS);
meta_verbose ("Setting _NET_WM_ALLOWED_ACTIONS with %d atoms", i); meta_topic (META_DEBUG_X11,
"Setting _NET_WM_ALLOWED_ACTIONS with %d atoms", i);
mtk_x11_error_trap_push (x11_display->xdisplay); mtk_x11_error_trap_push (x11_display->xdisplay);
XChangeProperty (x11_display->xdisplay, XChangeProperty (x11_display->xdisplay,

View File

@ -300,7 +300,7 @@ motif_hints_from_results (GetPropertyResults *results,
{ {
g_free (results->prop); g_free (results->prop);
results->prop = NULL; results->prop = NULL;
meta_verbose ("Motif hints had unexpected type or n_items"); meta_topic (META_DEBUG_X11, "Motif hints had unexpected type or n_items");
return FALSE; return FALSE;
} }
@ -681,8 +681,9 @@ wm_hints_from_results (GetPropertyResults *results,
/* pre-R3 bogusly truncated window_group, don't fail on them */ /* pre-R3 bogusly truncated window_group, don't fail on them */
if (results->n_items < (NumPropWMHintsElements - 1)) if (results->n_items < (NumPropWMHintsElements - 1))
{ {
meta_verbose ("WM_HINTS property too short: %d should be %d", meta_topic (META_DEBUG_X11,
(int) results->n_items, NumPropWMHintsElements - 1); "WM_HINTS property too short: %d should be %d",
(int) results->n_items, NumPropWMHintsElements - 1);
if (results->prop) if (results->prop)
{ {
g_free (results->prop); g_free (results->prop);
@ -833,8 +834,8 @@ meta_prop_get_values (MetaX11Display *x11_display,
xcb_get_property_cookie_t *tasks; xcb_get_property_cookie_t *tasks;
xcb_connection_t *xcb_conn = XGetXCBConnection (x11_display->xdisplay); xcb_connection_t *xcb_conn = XGetXCBConnection (x11_display->xdisplay);
meta_verbose ("Requesting %d properties of 0x%lx at once", meta_topic (META_DEBUG_X11, "Requesting %d properties of 0x%lx at once",
n_values, xwindow); n_values, xwindow);
if (n_values == 0) if (n_values == 0)
return; return;