mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
Throughout: move to meta_topic rather than meta_verbose so metacity.log
2002-02-07 Havoc Pennington <hp@pobox.com> Throughout: move to meta_topic rather than meta_verbose so metacity.log can start being more useful * src/util.h (enum): add more debug topics * src/frames.c: clean up some cruft that caused warnings
This commit is contained in:
parent
090096b1e2
commit
d91715dc8f
@ -1,3 +1,12 @@
|
||||
2002-02-07 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
Throughout: move to meta_topic rather than meta_verbose so
|
||||
metacity.log can start being more useful
|
||||
|
||||
* src/util.h (enum): add more debug topics
|
||||
|
||||
* src/frames.c: clean up some cruft that caused warnings
|
||||
|
||||
2002-02-07 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/theme.c (colorize_pixbuf): do random voodoo on the algorithm
|
||||
|
@ -692,7 +692,8 @@ event_callback (XEvent *event,
|
||||
event->xunmap.window))
|
||||
{
|
||||
display->last_ignored_unmap_serial = event->xany.serial;
|
||||
meta_verbose ("Will not focus on EnterNotify with serial %lu\n",
|
||||
meta_topic (META_DEBUG_FOCUS,
|
||||
"Will not focus on EnterNotify with serial %lu\n",
|
||||
display->last_ignored_unmap_serial);
|
||||
}
|
||||
}
|
||||
@ -968,7 +969,8 @@ event_callback (XEvent *event,
|
||||
{
|
||||
if (window->unmaps_pending == 0)
|
||||
{
|
||||
meta_verbose ("Window %s withdrawn\n",
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Window %s withdrawn\n",
|
||||
window->desc);
|
||||
window->withdrawn = TRUE;
|
||||
meta_window_free (window); /* Unmanage withdrawn window */
|
||||
@ -977,7 +979,8 @@ event_callback (XEvent *event,
|
||||
else
|
||||
{
|
||||
window->unmaps_pending -= 1;
|
||||
meta_verbose ("Received pending unmap, %d now pending\n",
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Received pending unmap, %d now pending\n",
|
||||
window->unmaps_pending);
|
||||
}
|
||||
}
|
||||
@ -1078,7 +1081,6 @@ event_callback (XEvent *event,
|
||||
|
||||
if (screen)
|
||||
{
|
||||
meta_debug_spew ("client for screen\n");
|
||||
if (event->xclient.message_type ==
|
||||
display->atom_net_current_desktop)
|
||||
{
|
||||
@ -1539,7 +1541,8 @@ meta_spew_event (MetaDisplay *display,
|
||||
else
|
||||
winname = g_strdup_printf ("0x%lx", event->xany.window);
|
||||
|
||||
meta_verbose ("%s on %s%s %s serial %lu\n", name, winname,
|
||||
meta_topic (META_DEBUG_EVENTS,
|
||||
"%s on %s%s %s serial %lu\n", name, winname,
|
||||
extra ? ":" : "", extra ? extra : "",
|
||||
event->xany.serial);
|
||||
|
||||
|
@ -105,7 +105,8 @@ meta_window_ensure_frame (MetaWindow *window)
|
||||
window->mapped = FALSE; /* the reparent will unmap the window,
|
||||
* we don't want to take that as a withdraw
|
||||
*/
|
||||
meta_verbose ("Incrementing unmaps_pending on %s for reparent\n", window->desc);
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Incrementing unmaps_pending on %s for reparent\n", window->desc);
|
||||
window->unmaps_pending += 1;
|
||||
}
|
||||
/* window was reparented to this position */
|
||||
@ -158,7 +159,8 @@ meta_window_destroy_frame (MetaWindow *window)
|
||||
* can identify a withdraw initiated
|
||||
* by the client.
|
||||
*/
|
||||
meta_verbose ("Incrementing unmaps_pending on %s for reparent back to root\n", window->desc);
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Incrementing unmaps_pending on %s for reparent back to root\n", window->desc);
|
||||
window->unmaps_pending += 1;
|
||||
}
|
||||
XReparentWindow (window->display->xdisplay,
|
||||
|
189
src/frames.c
189
src/frames.c
@ -48,30 +48,10 @@ static gboolean meta_frames_destroy_event (GtkWidget *widget,
|
||||
GdkEventAny *event);
|
||||
static gboolean meta_frames_expose_event (GtkWidget *widget,
|
||||
GdkEventExpose *event);
|
||||
static gboolean meta_frames_key_press_event (GtkWidget *widget,
|
||||
GdkEventKey *event);
|
||||
static gboolean meta_frames_key_release_event (GtkWidget *widget,
|
||||
GdkEventKey *event);
|
||||
static gboolean meta_frames_enter_notify_event (GtkWidget *widget,
|
||||
GdkEventCrossing *event);
|
||||
static gboolean meta_frames_leave_notify_event (GtkWidget *widget,
|
||||
GdkEventCrossing *event);
|
||||
static gboolean meta_frames_configure_event (GtkWidget *widget,
|
||||
GdkEventConfigure *event);
|
||||
static gboolean meta_frames_focus_in_event (GtkWidget *widget,
|
||||
GdkEventFocus *event);
|
||||
static gboolean meta_frames_focus_out_event (GtkWidget *widget,
|
||||
GdkEventFocus *event);
|
||||
static gboolean meta_frames_map_event (GtkWidget *widget,
|
||||
GdkEventAny *event);
|
||||
static gboolean meta_frames_unmap_event (GtkWidget *widget,
|
||||
GdkEventAny *event);
|
||||
static gboolean meta_frames_property_notify_event (GtkWidget *widget,
|
||||
GdkEventProperty *event);
|
||||
static gboolean meta_frames_client_event (GtkWidget *widget,
|
||||
GdkEventClient *event);
|
||||
static gboolean meta_frames_window_state_event (GtkWidget *widget,
|
||||
GdkEventWindowState *event);
|
||||
|
||||
static void meta_frames_paint_to_drawable (MetaFrames *frames,
|
||||
MetaUIFrame *frame,
|
||||
@ -94,14 +74,7 @@ static MetaFrameControl get_control (MetaFrames *frames,
|
||||
int y);
|
||||
static void clear_tip (MetaFrames *frames);
|
||||
|
||||
enum
|
||||
{
|
||||
dummy, /* remove this when you add more signals */
|
||||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static GtkWidgetClass *parent_class = NULL;
|
||||
static guint signals[LAST_SIGNAL];
|
||||
|
||||
GtkType
|
||||
meta_frames_get_type (void)
|
||||
@ -150,11 +123,11 @@ meta_frames_class_init (MetaFramesClass *class)
|
||||
widget_class->unrealize = meta_frames_unrealize;
|
||||
|
||||
widget_class->expose_event = meta_frames_expose_event;
|
||||
widget_class->unmap_event = meta_frames_unmap_event;
|
||||
widget_class->destroy_event = meta_frames_destroy_event;
|
||||
widget_class->button_press_event = meta_frames_button_press_event;
|
||||
widget_class->button_release_event = meta_frames_button_release_event;
|
||||
widget_class->motion_notify_event = meta_frames_motion_notify_event;
|
||||
widget_class->enter_notify_event = meta_frames_enter_notify_event;
|
||||
widget_class->leave_notify_event = meta_frames_leave_notify_event;
|
||||
}
|
||||
|
||||
@ -1252,38 +1225,6 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
|
||||
mini_icon, icon);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_key_press_event (GtkWidget *widget,
|
||||
GdkEventKey *event)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_key_release_event (GtkWidget *widget,
|
||||
GdkEventKey *event)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_enter_notify_event (GtkWidget *widget,
|
||||
GdkEventCrossing *event)
|
||||
@ -1322,134 +1263,6 @@ meta_frames_leave_notify_event (GtkWidget *widget,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_configure_event (GtkWidget *widget,
|
||||
GdkEventConfigure *event)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_focus_in_event (GtkWidget *widget,
|
||||
GdkEventFocus *event)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_focus_out_event (GtkWidget *widget,
|
||||
GdkEventFocus *event)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_map_event (GtkWidget *widget,
|
||||
GdkEventAny *event)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_unmap_event (GtkWidget *widget,
|
||||
GdkEventAny *event)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_property_notify_event (GtkWidget *widget,
|
||||
GdkEventProperty *event)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_client_event (GtkWidget *widget,
|
||||
GdkEventClient *event)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_frames_window_state_event (GtkWidget *widget,
|
||||
GdkEventWindowState *event)
|
||||
{
|
||||
MetaUIFrame *frame;
|
||||
MetaFrames *frames;
|
||||
|
||||
frames = META_FRAMES (widget);
|
||||
|
||||
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
|
||||
if (frame == NULL)
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GdkRectangle*
|
||||
control_rect (MetaFrameControl control,
|
||||
MetaFrameGeometry *fgeom)
|
||||
|
@ -214,7 +214,7 @@ meta_window_place (MetaWindow *window,
|
||||
* placement coordinates.
|
||||
*/
|
||||
|
||||
meta_verbose ("Placing window %s\n", window->desc);
|
||||
meta_topic (META_DEBUG_PLACEMENT, "Placing window %s\n", window->desc);
|
||||
|
||||
/* FIXME copying Mac, when placing a dialog
|
||||
* put it at 1/5 down and horizontally centered
|
||||
@ -245,7 +245,7 @@ meta_window_place (MetaWindow *window,
|
||||
if (fgeom)
|
||||
y += fgeom->top_height;
|
||||
|
||||
meta_verbose ("Centered window %s over transient parent\n",
|
||||
meta_topic (META_DEBUG_PLACEMENT, "Centered window %s over transient parent\n",
|
||||
window->desc);
|
||||
|
||||
goto done;
|
||||
@ -265,7 +265,7 @@ meta_window_place (MetaWindow *window,
|
||||
x = (w - window->rect.width) / 2;
|
||||
y = (y - window->rect.height) / 2;
|
||||
|
||||
meta_verbose ("Centered window %s on screen\n",
|
||||
meta_topic (META_DEBUG_PLACEMENT, "Centered window %s on screen\n",
|
||||
window->desc);
|
||||
|
||||
goto done;
|
||||
|
26
src/prefs.c
26
src/prefs.c
@ -36,7 +36,7 @@
|
||||
#define KEY_NUM_WORKSPACES "/apps/metacity/general/num_workspaces"
|
||||
#define KEY_APPLICATION_BASED "/apps/metacity/general/application_based"
|
||||
|
||||
static GConfClient *client = NULL;
|
||||
static GConfClient *default_client = NULL;
|
||||
static GList *listeners = NULL;
|
||||
static GList *changes = NULL;
|
||||
static guint changed_idle;
|
||||
@ -198,24 +198,24 @@ meta_prefs_init (void)
|
||||
int int_val;
|
||||
gboolean bool_val;
|
||||
|
||||
if (client != NULL)
|
||||
if (default_client != NULL)
|
||||
return;
|
||||
|
||||
/* returns a reference which we hold forever */
|
||||
client = gconf_client_get_default ();
|
||||
default_client = gconf_client_get_default ();
|
||||
|
||||
gconf_client_add_dir (client, "/apps/metacity",
|
||||
gconf_client_add_dir (default_client, "/apps/metacity",
|
||||
GCONF_CLIENT_PRELOAD_RECURSIVE,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
|
||||
str_val = gconf_client_get_string (client, KEY_FOCUS_MODE,
|
||||
str_val = gconf_client_get_string (default_client, KEY_FOCUS_MODE,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
update_focus_mode (str_val);
|
||||
g_free (str_val);
|
||||
|
||||
str_val = gconf_client_get_string (client, KEY_THEME,
|
||||
str_val = gconf_client_get_string (default_client, KEY_THEME,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
update_theme (str_val);
|
||||
@ -226,33 +226,33 @@ meta_prefs_init (void)
|
||||
* just lazy. But they keys ought to be set, anyhow.
|
||||
*/
|
||||
|
||||
bool_val = gconf_client_get_bool (client, KEY_USE_DESKTOP_FONT,
|
||||
bool_val = gconf_client_get_bool (default_client, KEY_USE_DESKTOP_FONT,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
update_use_desktop_font (bool_val);
|
||||
|
||||
int_val = gconf_client_get_int (client, KEY_TITLEBAR_FONT_SIZE,
|
||||
int_val = gconf_client_get_int (default_client, KEY_TITLEBAR_FONT_SIZE,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
update_titlebar_font_size (int_val);
|
||||
|
||||
str_val = gconf_client_get_string (client, KEY_TITLEBAR_FONT,
|
||||
str_val = gconf_client_get_string (default_client, KEY_TITLEBAR_FONT,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
update_titlebar_font (str_val);
|
||||
g_free (str_val);
|
||||
|
||||
int_val = gconf_client_get_int (client, KEY_NUM_WORKSPACES,
|
||||
int_val = gconf_client_get_int (default_client, KEY_NUM_WORKSPACES,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
update_num_workspaces (int_val);
|
||||
|
||||
bool_val = gconf_client_get_bool (client, KEY_APPLICATION_BASED,
|
||||
bool_val = gconf_client_get_bool (default_client, KEY_APPLICATION_BASED,
|
||||
&err);
|
||||
cleanup_error (&err);
|
||||
update_application_based (bool_val);
|
||||
|
||||
gconf_client_notify_add (client, "/apps/metacity",
|
||||
gconf_client_notify_add (default_client, "/apps/metacity",
|
||||
change_notify,
|
||||
NULL,
|
||||
NULL,
|
||||
@ -422,7 +422,7 @@ update_focus_mode (const char *value)
|
||||
static gboolean
|
||||
update_theme (const char *value)
|
||||
{
|
||||
const char *old_theme;
|
||||
char *old_theme;
|
||||
gboolean changed;
|
||||
|
||||
old_theme = current_theme;
|
||||
|
@ -27,7 +27,7 @@
|
||||
void
|
||||
meta_session_init (const char *previous_id)
|
||||
{
|
||||
meta_verbose ("Compiled without session management support\n");
|
||||
meta_topic (META_DEBUG_SM, "Compiled without session management support\n");
|
||||
}
|
||||
|
||||
const MetaWindowSessionInfo*
|
||||
@ -208,7 +208,7 @@ meta_session_init (const char *previous_id)
|
||||
unsigned long mask;
|
||||
SmcCallbacks callbacks;
|
||||
|
||||
meta_verbose ("Initializing session with session ID '%s'\n",
|
||||
meta_topic (META_DEBUG_SM, "Initializing session with session ID '%s'\n",
|
||||
previous_id ? previous_id : "(none)");
|
||||
|
||||
if (previous_id)
|
||||
@ -251,7 +251,7 @@ meta_session_init (const char *previous_id)
|
||||
{
|
||||
if (client_id == NULL)
|
||||
meta_bug ("Session manager gave us a NULL client ID?");
|
||||
meta_verbose ("Obtained session ID '%s'\n", client_id);
|
||||
meta_topic (META_DEBUG_SM, "Obtained session ID '%s'\n", client_id);
|
||||
}
|
||||
|
||||
if (previous_id && strcmp (previous_id, client_id) == 0)
|
||||
@ -439,7 +439,7 @@ save_yourself_callback (SmcConn smc_conn,
|
||||
static void
|
||||
die_callback (SmcConn smc_conn, SmPointer client_data)
|
||||
{
|
||||
meta_verbose ("Exiting at request of session manager\n");
|
||||
meta_topic (META_DEBUG_SM, "Exiting at request of session manager\n");
|
||||
disconnect ();
|
||||
meta_quit (META_EXIT_SUCCESS);
|
||||
}
|
||||
@ -768,7 +768,7 @@ save_state (void)
|
||||
session_dir, g_strerror (errno));
|
||||
}
|
||||
|
||||
meta_verbose ("Saving session to '%s'\n", session_file);
|
||||
meta_topic (META_DEBUG_SM, "Saving session to '%s'\n", session_file);
|
||||
|
||||
outfile = fopen (session_file, "w");
|
||||
|
||||
@ -833,7 +833,7 @@ save_state (void)
|
||||
role = window->role ?
|
||||
encode_text_as_utf8_markup (window->role) : NULL;
|
||||
|
||||
meta_verbose ("Saving session managed window %s, client ID '%s'\n",
|
||||
meta_topic (META_DEBUG_SM, "Saving session managed window %s, client ID '%s'\n",
|
||||
window->desc, window->sm_client_id);
|
||||
|
||||
fprintf (outfile,
|
||||
@ -884,7 +884,7 @@ save_state (void)
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_verbose ("Not saving window '%s', not session managed\n",
|
||||
meta_topic (META_DEBUG_SM, "Not saving window '%s', not session managed\n",
|
||||
window->desc);
|
||||
}
|
||||
|
||||
@ -992,7 +992,7 @@ load_state (const char *previous_id)
|
||||
return;
|
||||
}
|
||||
|
||||
meta_verbose ("Parsing saved session file %s\n", session_file);
|
||||
meta_topic (META_DEBUG_SM, "Parsing saved session file %s\n", session_file);
|
||||
g_free (session_file);
|
||||
session_file = NULL;
|
||||
|
||||
@ -1207,7 +1207,7 @@ start_element_handler (GMarkupParseContext *context,
|
||||
++i;
|
||||
}
|
||||
|
||||
meta_verbose ("Loaded geometry %d,%d %dx%d gravity %s\n",
|
||||
meta_topic (META_DEBUG_SM, "Loaded geometry %d,%d %dx%d gravity %s\n",
|
||||
pd->info->rect.x,
|
||||
pd->info->rect.y,
|
||||
pd->info->rect.width,
|
||||
@ -1242,7 +1242,7 @@ end_element_handler (GMarkupParseContext *context,
|
||||
window_info_list = g_slist_prepend (window_info_list,
|
||||
pd->info);
|
||||
|
||||
meta_verbose ("Loaded window info from session with class: %s name: %s role: %s\n",
|
||||
meta_topic (META_DEBUG_SM, "Loaded window info from session with class: %s name: %s role: %s\n",
|
||||
pd->info->res_class ? pd->info->res_class : "(none)",
|
||||
pd->info->res_name ? pd->info->res_name : "(none)",
|
||||
pd->info->role ? pd->info->role : "(none)");
|
||||
@ -1305,7 +1305,7 @@ get_possible_matches (MetaWindow *window)
|
||||
both_null_or_matching (info->res_name, window->res_name) &&
|
||||
both_null_or_matching (info->role, window->role))
|
||||
{
|
||||
meta_verbose ("Window %s may match saved window with class: %s name: %s role: %s\n",
|
||||
meta_topic (META_DEBUG_SM, "Window %s may match saved window with class: %s name: %s role: %s\n",
|
||||
window->desc,
|
||||
info->res_class ? info->res_class : "(none)",
|
||||
info->res_name ? info->res_name : "(none)",
|
||||
@ -1318,28 +1318,28 @@ get_possible_matches (MetaWindow *window)
|
||||
if (meta_is_verbose ())
|
||||
{
|
||||
if (!both_null_or_matching (info->id, window->sm_client_id))
|
||||
meta_verbose ("Window %s has SM client ID %s, saved state has %s, no match\n",
|
||||
meta_topic (META_DEBUG_SM, "Window %s has SM client ID %s, saved state has %s, no match\n",
|
||||
window->desc,
|
||||
window->sm_client_id ? window->sm_client_id : "(none)",
|
||||
info->id ? info->id : "(none)");
|
||||
else if (!both_null_or_matching (info->res_class, window->res_class))
|
||||
meta_verbose ("Window %s has class %s doesn't match saved class %s, no match\n",
|
||||
meta_topic (META_DEBUG_SM, "Window %s has class %s doesn't match saved class %s, no match\n",
|
||||
window->desc,
|
||||
window->res_class ? window->res_class : "(none)",
|
||||
info->res_class ? info->res_class : "(none)");
|
||||
|
||||
else if (!both_null_or_matching (info->res_name, window->res_name))
|
||||
meta_verbose ("Window %s has name %s doesn't match saved name %s, no match\n",
|
||||
meta_topic (META_DEBUG_SM, "Window %s has name %s doesn't match saved name %s, no match\n",
|
||||
window->desc,
|
||||
window->res_name ? window->res_name : "(none)",
|
||||
info->res_name ? info->res_name : "(none)");
|
||||
else if (!both_null_or_matching (info->role, window->role))
|
||||
meta_verbose ("Window %s has role %s doesn't match saved role %s, no match\n",
|
||||
meta_topic (META_DEBUG_SM, "Window %s has role %s doesn't match saved role %s, no match\n",
|
||||
window->desc,
|
||||
window->role ? window->role : "(none)",
|
||||
info->role ? info->role : "(none)");
|
||||
else
|
||||
meta_verbose ("???? should not happen - window %s doesn't match saved state %s for no good reason\n",
|
||||
meta_topic (META_DEBUG_SM, "???? should not happen - window %s doesn't match saved state %s for no good reason\n",
|
||||
window->desc, info->id);
|
||||
}
|
||||
}
|
||||
@ -1408,7 +1408,9 @@ meta_window_lookup_saved_state (MetaWindow *window)
|
||||
*/
|
||||
if (window->sm_client_id == NULL)
|
||||
{
|
||||
meta_verbose ("Window %s is not session managed, not checking for saved state\n", window->desc);
|
||||
meta_topic (META_DEBUG_SM,
|
||||
"Window %s is not session managed, not checking for saved state\n",
|
||||
window->desc);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1416,7 +1418,7 @@ meta_window_lookup_saved_state (MetaWindow *window)
|
||||
|
||||
if (possibles == NULL)
|
||||
{
|
||||
meta_verbose ("Window %s has no possible matches in the list of saved window states\n",
|
||||
meta_topic (META_DEBUG_SM, "Window %s has no possible matches in the list of saved window states\n",
|
||||
window->desc);
|
||||
return NULL;
|
||||
}
|
||||
|
28
src/stack.c
28
src/stack.c
@ -133,7 +133,7 @@ meta_stack_add (MetaStack *stack,
|
||||
{
|
||||
MetaStackOp *op;
|
||||
|
||||
meta_verbose ("Adding window %s to the stack\n", window->desc);
|
||||
meta_topic (META_DEBUG_STACK, "Adding window %s to the stack\n", window->desc);
|
||||
|
||||
op = ensure_op (stack, window);
|
||||
|
||||
@ -160,7 +160,7 @@ meta_stack_remove (MetaStack *stack,
|
||||
{
|
||||
MetaStackOp *op;
|
||||
|
||||
meta_verbose ("Removing window %s from the stack\n", window->desc);
|
||||
meta_topic (META_DEBUG_STACK, "Removing window %s from the stack\n", window->desc);
|
||||
|
||||
op = ensure_op (stack, window);
|
||||
|
||||
@ -275,7 +275,7 @@ compute_layer (MetaWindow *window)
|
||||
break;
|
||||
}
|
||||
|
||||
meta_verbose ("Window %s on layer %d\n",
|
||||
meta_topic (META_DEBUG_STACK, "Window %s on layer %d\n",
|
||||
window->desc, window->layer);
|
||||
}
|
||||
|
||||
@ -353,7 +353,7 @@ sort_window_list (GList *list)
|
||||
|
||||
if (parent)
|
||||
{
|
||||
meta_verbose ("Stacking %s above %s due to transiency\n",
|
||||
meta_topic (META_DEBUG_STACK, "Stacking %s above %s due to transiency\n",
|
||||
w->desc, parent->desc);
|
||||
list = ensure_before (list, w, parent);
|
||||
}
|
||||
@ -388,7 +388,7 @@ meta_stack_sync_to_server (MetaStack *stack)
|
||||
if (stack->pending == NULL)
|
||||
return;
|
||||
|
||||
meta_verbose ("Syncing window stack to server\n");
|
||||
meta_topic (META_DEBUG_STACK, "Syncing window stack to server\n");
|
||||
|
||||
/* Here comes the fun - figure out all the stacking.
|
||||
* We make no pretense of efficiency.
|
||||
@ -596,12 +596,12 @@ meta_stack_sync_to_server (MetaStack *stack)
|
||||
/* Sort each layer... */
|
||||
if (needs_sort[i])
|
||||
{
|
||||
meta_verbose ("Sorting layer %d\n", i);
|
||||
meta_topic (META_DEBUG_STACK, "Sorting layer %d\n", i);
|
||||
stack->layers[i] = sort_window_list (stack->layers[i]);
|
||||
}
|
||||
|
||||
/* ... then append it */
|
||||
meta_verbose ("Layer %d: ", i);
|
||||
meta_topic (META_DEBUG_STACK, "Layer %d: ", i);
|
||||
meta_push_no_msg_prefix ();
|
||||
tmp = stack->layers[i];
|
||||
while (tmp != NULL)
|
||||
@ -617,12 +617,12 @@ meta_stack_sync_to_server (MetaStack *stack)
|
||||
else
|
||||
g_array_append_val (root_children_stacked, w->xwindow);
|
||||
|
||||
meta_verbose ("%s ", w->desc);
|
||||
meta_topic (META_DEBUG_STACK, "%s ", w->desc);
|
||||
|
||||
tmp = tmp->next;
|
||||
}
|
||||
|
||||
meta_verbose ("\n");
|
||||
meta_topic (META_DEBUG_STACK, "\n");
|
||||
meta_pop_no_msg_prefix ();
|
||||
}
|
||||
while (i > 0);
|
||||
@ -634,7 +634,7 @@ meta_stack_sync_to_server (MetaStack *stack)
|
||||
|
||||
/* Sync to server */
|
||||
|
||||
meta_verbose ("Restacking %d windows\n",
|
||||
meta_topic (META_DEBUG_STACK, "Restacking %d windows\n",
|
||||
root_children_stacked->len);
|
||||
|
||||
meta_error_trap_push (stack->screen->display);
|
||||
@ -644,7 +644,7 @@ meta_stack_sync_to_server (MetaStack *stack)
|
||||
/* Just impose our stack, we don't know the previous state.
|
||||
* This involves a ton of circulate requests and may flicker.
|
||||
*/
|
||||
meta_verbose ("Don't know last stack state, restacking everything\n");
|
||||
meta_topic (META_DEBUG_STACK, "Don't know last stack state, restacking everything\n");
|
||||
|
||||
if (root_children_stacked->len > 0)
|
||||
XRestackWindows (stack->screen->display->xdisplay,
|
||||
@ -693,7 +693,7 @@ meta_stack_sync_to_server (MetaStack *stack)
|
||||
/* Move *newp below last_window */
|
||||
if (last_window == None)
|
||||
{
|
||||
meta_verbose ("Raising window 0x%lx to the top\n", *newp);
|
||||
meta_topic (META_DEBUG_STACK, "Raising window 0x%lx to the top\n", *newp);
|
||||
|
||||
XRaiseWindow (stack->screen->display->xdisplay,
|
||||
*newp);
|
||||
@ -710,7 +710,7 @@ meta_stack_sync_to_server (MetaStack *stack)
|
||||
changes.sibling = last_window;
|
||||
changes.stack_mode = Below;
|
||||
|
||||
meta_verbose ("Placing window 0x%lx below 0x%lx\n",
|
||||
meta_topic (META_DEBUG_STACK, "Placing window 0x%lx below 0x%lx\n",
|
||||
*newp, last_window);
|
||||
|
||||
XConfigureWindow (stack->screen->display->xdisplay,
|
||||
@ -727,7 +727,7 @@ meta_stack_sync_to_server (MetaStack *stack)
|
||||
if (newp != new_end)
|
||||
{
|
||||
/* Restack remaining windows */
|
||||
meta_verbose ("Restacking remaining %d windows\n",
|
||||
meta_topic (META_DEBUG_STACK, "Restacking remaining %d windows\n",
|
||||
(int) (new_end - newp));
|
||||
/* We need to include an already-stacked window
|
||||
* in the restack call, so we get in the proper position
|
||||
|
@ -3790,7 +3790,7 @@ meta_theme_load (const char *theme_name,
|
||||
&length,
|
||||
&error))
|
||||
{
|
||||
meta_verbose ("Failed to read theme from file %s: %s\n",
|
||||
meta_topic (META_DEBUG_THEMES, "Failed to read theme from file %s: %s\n",
|
||||
theme_file, error->message);
|
||||
g_error_free (error);
|
||||
g_free (theme_dir);
|
||||
@ -3814,7 +3814,7 @@ meta_theme_load (const char *theme_name,
|
||||
&length,
|
||||
&error))
|
||||
{
|
||||
meta_verbose ("Failed to read theme from file %s: %s\n",
|
||||
meta_topic (META_DEBUG_THEMES, "Failed to read theme from file %s: %s\n",
|
||||
theme_file, error->message);
|
||||
g_error_free (error);
|
||||
g_free (theme_dir);
|
||||
@ -3838,7 +3838,7 @@ meta_theme_load (const char *theme_name,
|
||||
&length,
|
||||
&error))
|
||||
{
|
||||
meta_verbose ("Failed to read theme from file %s: %s\n",
|
||||
meta_topic (META_DEBUG_THEMES, "Failed to read theme from file %s: %s\n",
|
||||
theme_file, error->message);
|
||||
g_error_free (error);
|
||||
g_free (theme_dir);
|
||||
@ -3874,7 +3874,7 @@ meta_theme_load (const char *theme_name,
|
||||
|
||||
g_assert (text);
|
||||
|
||||
meta_verbose ("Parsing theme file %s\n", theme_file);
|
||||
meta_topic (META_DEBUG_THEMES, "Parsing theme file %s\n", theme_file);
|
||||
|
||||
parse_info_init (&info);
|
||||
info.theme_name = theme_name;
|
||||
|
@ -3853,7 +3853,7 @@ meta_theme_set_current (const char *name,
|
||||
MetaTheme *new_theme;
|
||||
GError *err;
|
||||
|
||||
meta_verbose ("Setting current theme to \"%s\"\n", name);
|
||||
meta_topic (META_DEBUG_THEMES, "Setting current theme to \"%s\"\n", name);
|
||||
|
||||
if (!force_reload &&
|
||||
meta_current_theme &&
|
||||
@ -3876,7 +3876,7 @@ meta_theme_set_current (const char *name,
|
||||
|
||||
meta_current_theme = new_theme;
|
||||
|
||||
meta_verbose ("New theme is \"%s\"\n", meta_current_theme->name);
|
||||
meta_topic (META_DEBUG_THEMES, "New theme is \"%s\"\n", meta_current_theme->name);
|
||||
}
|
||||
}
|
||||
|
||||
|
21
src/util.c
21
src/util.c
@ -147,9 +147,24 @@ topic_name (MetaDebugTopic topic)
|
||||
{
|
||||
case META_DEBUG_FOCUS:
|
||||
return "FOCUS";
|
||||
break;
|
||||
case META_DEBUG_GRADIENT_CACHE:
|
||||
return "GRADIENT_CACHE";
|
||||
case META_DEBUG_WORKAREA:
|
||||
return "WORKAREA";
|
||||
case META_DEBUG_STACK:
|
||||
return "STACK";
|
||||
case META_DEBUG_THEMES:
|
||||
return "THEMES";
|
||||
case META_DEBUG_SM:
|
||||
return "SM";
|
||||
case META_DEBUG_EVENTS:
|
||||
return "EVENTS";
|
||||
case META_DEBUG_WINDOW_STATE:
|
||||
return "WINDOW_STATE";
|
||||
case META_DEBUG_WINDOW_OPS:
|
||||
return "WINDOW_OPS";
|
||||
case META_DEBUG_PLACEMENT:
|
||||
return "PLACEMENT";
|
||||
case META_DEBUG_GEOMETRY:
|
||||
return "GEOMETRY";
|
||||
break;
|
||||
}
|
||||
|
||||
|
12
src/util.h
12
src/util.h
@ -45,8 +45,16 @@ void meta_fatal (const char *format,
|
||||
|
||||
typedef enum
|
||||
{
|
||||
META_DEBUG_FOCUS,
|
||||
META_DEBUG_GRADIENT_CACHE
|
||||
META_DEBUG_FOCUS = 1 << 0,
|
||||
META_DEBUG_WORKAREA = 1 << 1,
|
||||
META_DEBUG_STACK = 1 << 2,
|
||||
META_DEBUG_THEMES = 1 << 3,
|
||||
META_DEBUG_SM = 1 << 4,
|
||||
META_DEBUG_EVENTS = 1 << 5,
|
||||
META_DEBUG_WINDOW_STATE = 1 << 6,
|
||||
META_DEBUG_WINDOW_OPS = 1 << 7,
|
||||
META_DEBUG_GEOMETRY = 1 << 8,
|
||||
META_DEBUG_PLACEMENT = 1 << 9
|
||||
|
||||
} MetaDebugTopic;
|
||||
|
||||
|
178
src/window.c
178
src/window.c
@ -317,7 +317,8 @@ meta_window_new (MetaDisplay *display, Window xwindow,
|
||||
/* if already mapped we don't want to do the placement thing */
|
||||
window->placed = window->mapped;
|
||||
if (window->placed)
|
||||
meta_verbose ("Not placing window 0x%lx since it's already mapped\n",
|
||||
meta_topic (META_DEBUG_PLACEMENT,
|
||||
"Not placing window 0x%lx since it's already mapped\n",
|
||||
xwindow);
|
||||
window->unmanaging = FALSE;
|
||||
window->calc_showing_queued = FALSE;
|
||||
@ -517,7 +518,8 @@ meta_window_new (MetaDisplay *display, Window xwindow,
|
||||
{
|
||||
/* don't constrain with placement algorithm */
|
||||
window->placed = TRUE;
|
||||
meta_verbose ("Honoring USPosition for %s instead of using placement algorithm\n", window->desc);
|
||||
meta_topic (META_DEBUG_PLACEMENT,
|
||||
"Honoring USPosition for %s instead of using placement algorithm\n", window->desc);
|
||||
}
|
||||
|
||||
/* Assume the app knows best how to place these. */
|
||||
@ -592,7 +594,8 @@ meta_window_apply_session_info (MetaWindow *window,
|
||||
if (info->on_all_workspaces_set)
|
||||
{
|
||||
window->on_all_workspaces = info->on_all_workspaces;
|
||||
meta_verbose ("Restoring sticky state %d for window %s\n",
|
||||
meta_topic (META_DEBUG_SM,
|
||||
"Restoring sticky state %d for window %s\n",
|
||||
window->on_all_workspaces, window->desc);
|
||||
}
|
||||
|
||||
@ -638,7 +641,8 @@ meta_window_apply_session_info (MetaWindow *window,
|
||||
|
||||
meta_workspace_add_window (space, window);
|
||||
|
||||
meta_verbose ("Restoring saved window %s to workspace %d\n",
|
||||
meta_topic (META_DEBUG_SM,
|
||||
"Restoring saved window %s to workspace %d\n",
|
||||
window->desc,
|
||||
meta_workspace_screen_index (space));
|
||||
|
||||
@ -666,7 +670,8 @@ meta_window_apply_session_info (MetaWindow *window,
|
||||
/* Force old gravity, ignoring anything now set */
|
||||
window->size_hints.win_gravity = info->gravity;
|
||||
|
||||
meta_verbose ("Restoring pos %d,%d size %d x %d for %s\n",
|
||||
meta_topic (META_DEBUG_SM,
|
||||
"Restoring pos %d,%d size %d x %d for %s\n",
|
||||
x, y, w, h, window->desc);
|
||||
|
||||
meta_window_move_resize_internal (window,
|
||||
@ -710,7 +715,12 @@ meta_window_free (MetaWindow *window)
|
||||
}
|
||||
|
||||
if (window->has_struts)
|
||||
{
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Unmanaging window %s which has struts, so invalidating work areas\n",
|
||||
window->desc);
|
||||
invalidate_work_areas (window);
|
||||
}
|
||||
|
||||
if (window->display->grab_window == window)
|
||||
meta_display_end_grab_op (window->display,
|
||||
@ -970,7 +980,8 @@ idle_calc_showing (gpointer data)
|
||||
GSList *tmp;
|
||||
GSList *copy;
|
||||
|
||||
meta_verbose ("Clearing the calc_showing queue\n");
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Clearing the calc_showing queue\n");
|
||||
|
||||
/* Work with a copy, for reentrancy. The allowed reentrancy isn't
|
||||
* complete; destroying a window while we're in here would result in
|
||||
@ -1021,7 +1032,8 @@ meta_window_unqueue_calc_showing (MetaWindow *window)
|
||||
if (!window->calc_showing_queued)
|
||||
return;
|
||||
|
||||
meta_verbose ("Removing %s from the calc_showing queue\n",
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Removing %s from the calc_showing queue\n",
|
||||
window->desc);
|
||||
|
||||
/* Note that window may not actually be in move_resize_pending
|
||||
@ -1057,7 +1069,8 @@ meta_window_queue_calc_showing (MetaWindow *window)
|
||||
if (window->calc_showing_queued)
|
||||
return;
|
||||
|
||||
meta_verbose ("Putting %s in the calc_showing queue\n",
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Putting %s in the calc_showing queue\n",
|
||||
window->desc);
|
||||
|
||||
window->calc_showing_queued = TRUE;
|
||||
@ -1073,7 +1086,8 @@ meta_window_show (MetaWindow *window)
|
||||
{
|
||||
gboolean did_placement;
|
||||
|
||||
meta_verbose ("Showing window %s, shaded: %d iconic: %d placed: %d\n",
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Showing window %s, shaded: %d iconic: %d placed: %d\n",
|
||||
window->desc, window->shaded, window->iconic, window->placed);
|
||||
|
||||
did_placement = FALSE;
|
||||
@ -1103,7 +1117,8 @@ meta_window_show (MetaWindow *window)
|
||||
|
||||
if (window->frame && !window->frame->mapped)
|
||||
{
|
||||
meta_verbose ("Frame actually needs map\n");
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Frame actually needs map\n");
|
||||
window->frame->mapped = TRUE;
|
||||
meta_ui_map_frame (window->screen->ui, window->frame->xwindow);
|
||||
}
|
||||
@ -1112,8 +1127,10 @@ meta_window_show (MetaWindow *window)
|
||||
{
|
||||
if (window->mapped)
|
||||
{
|
||||
meta_verbose ("%s actually needs unmap (shaded)\n", window->desc);
|
||||
meta_verbose ("Incrementing unmaps_pending on %s for shade\n",
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"%s actually needs unmap (shaded)\n", window->desc);
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Incrementing unmaps_pending on %s for shade\n",
|
||||
window->desc);
|
||||
window->mapped = FALSE;
|
||||
window->unmaps_pending += 1;
|
||||
@ -1132,7 +1149,8 @@ meta_window_show (MetaWindow *window)
|
||||
{
|
||||
if (!window->mapped)
|
||||
{
|
||||
meta_verbose ("%s actually needs map\n", window->desc);
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"%s actually needs map\n", window->desc);
|
||||
window->mapped = TRUE;
|
||||
meta_error_trap_push (window->display);
|
||||
XMapWindow (window->display->xdisplay, window->xwindow);
|
||||
@ -1179,13 +1197,14 @@ meta_window_hide (MetaWindow *window)
|
||||
{
|
||||
gboolean did_hide;
|
||||
|
||||
meta_verbose ("Hiding window %s\n", window->desc);
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Hiding window %s\n", window->desc);
|
||||
|
||||
did_hide = FALSE;
|
||||
|
||||
if (window->frame && window->frame->mapped)
|
||||
{
|
||||
meta_verbose ("Frame actually needs unmap\n");
|
||||
meta_topic (META_DEBUG_WINDOW_STATE, "Frame actually needs unmap\n");
|
||||
window->frame->mapped = FALSE;
|
||||
meta_ui_unmap_frame (window->screen->ui, window->frame->xwindow);
|
||||
did_hide = TRUE;
|
||||
@ -1193,8 +1212,10 @@ meta_window_hide (MetaWindow *window)
|
||||
|
||||
if (window->mapped)
|
||||
{
|
||||
meta_verbose ("%s actually needs unmap\n", window->desc);
|
||||
meta_verbose ("Incrementing unmaps_pending on %s for hide\n",
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"%s actually needs unmap\n", window->desc);
|
||||
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||
"Incrementing unmaps_pending on %s for hide\n",
|
||||
window->desc);
|
||||
window->mapped = FALSE;
|
||||
window->unmaps_pending += 1;
|
||||
@ -1213,8 +1234,13 @@ meta_window_hide (MetaWindow *window)
|
||||
if (did_hide)
|
||||
{
|
||||
if (window->has_struts)
|
||||
{
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Unmapped window %s with struts, so invalidating work areas\n",
|
||||
window->desc);
|
||||
invalidate_work_areas (window);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
@ -1258,7 +1284,8 @@ meta_window_maximize (MetaWindow *window)
|
||||
{
|
||||
if (!window->maximized)
|
||||
{
|
||||
meta_verbose ("Maximizing %s\n", window->desc);
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Maximizing %s\n", window->desc);
|
||||
|
||||
window->maximized = TRUE;
|
||||
|
||||
@ -1285,7 +1312,8 @@ meta_window_unmaximize (MetaWindow *window)
|
||||
{
|
||||
if (window->maximized)
|
||||
{
|
||||
meta_verbose ("Unmaximizing %s\n", window->desc);
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Unmaximizing %s\n", window->desc);
|
||||
|
||||
window->maximized = FALSE;
|
||||
|
||||
@ -1303,7 +1331,8 @@ meta_window_unmaximize (MetaWindow *window)
|
||||
void
|
||||
meta_window_shade (MetaWindow *window)
|
||||
{
|
||||
meta_verbose ("Shading %s\n", window->desc);
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Shading %s\n", window->desc);
|
||||
if (!window->shaded)
|
||||
{
|
||||
if (window->mapped)
|
||||
@ -1348,7 +1377,8 @@ meta_window_shade (MetaWindow *window)
|
||||
void
|
||||
meta_window_unshade (MetaWindow *window)
|
||||
{
|
||||
meta_verbose ("Unshading %s\n", window->desc);
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Unshading %s\n", window->desc);
|
||||
if (window->shaded)
|
||||
{
|
||||
window->shaded = FALSE;
|
||||
@ -1566,7 +1596,8 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
{
|
||||
int oldx, oldy;
|
||||
meta_window_get_position (window, &oldx, &oldy);
|
||||
meta_verbose ("Move/resize %s to %d,%d %dx%d%s%s from %d,%d %dx%d\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Move/resize %s to %d,%d %dx%d%s%s from %d,%d %dx%d\n",
|
||||
window->desc, root_x_nw, root_y_nw, w, h,
|
||||
is_configure_request ? " (configure request)" : "",
|
||||
is_user_action ? " (user move/resize)" : "",
|
||||
@ -1578,7 +1609,8 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
&fgeom);
|
||||
|
||||
constrain_size (window, &fgeom, w, h, &w, &h);
|
||||
meta_verbose ("Constrained resize of %s to %d x %d\n", window->desc, w, h);
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Constrained resize of %s to %d x %d\n", window->desc, w, h);
|
||||
|
||||
if (w != window->rect.width ||
|
||||
h != window->rect.height)
|
||||
@ -1609,7 +1641,8 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
window->frame->rect.width = new_w;
|
||||
window->frame->rect.height = new_h;
|
||||
|
||||
meta_verbose ("Calculated frame size %dx%d\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Calculated frame size %dx%d\n",
|
||||
window->frame->rect.width,
|
||||
window->frame->rect.height);
|
||||
}
|
||||
@ -1632,7 +1665,8 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
&root_x_nw,
|
||||
&root_y_nw);
|
||||
|
||||
meta_verbose ("Compensated position for gravity, new pos %d,%d\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Compensated position for gravity, new pos %d,%d\n",
|
||||
root_x_nw, root_y_nw);
|
||||
}
|
||||
|
||||
@ -1705,7 +1739,8 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
root_x_nw, root_y_nw,
|
||||
&root_x_nw, &root_y_nw);
|
||||
|
||||
meta_verbose ("Constrained position to %d,%d\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Constrained position to %d,%d\n",
|
||||
root_x_nw, root_y_nw);
|
||||
|
||||
if (window->frame)
|
||||
@ -1879,7 +1914,8 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
{
|
||||
int newx, newy;
|
||||
meta_window_get_position (window, &newx, &newy);
|
||||
meta_verbose ("Syncing new client geometry %d,%d %dx%d, border: %s pos: %s size: %s\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Syncing new client geometry %d,%d %dx%d, border: %s pos: %s size: %s\n",
|
||||
newx, newy,
|
||||
window->rect.width, window->rect.height,
|
||||
mask & CWBorderWidth ? "true" : "false",
|
||||
@ -1924,14 +1960,15 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
{
|
||||
int newx, newy;
|
||||
meta_window_get_position (window, &newx, &newy);
|
||||
meta_verbose ("New size/position %d,%d %dx%d (user %d,%d %dx%d)\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"New size/position %d,%d %dx%d (user %d,%d %dx%d)\n",
|
||||
newx, newy, window->rect.width, window->rect.height,
|
||||
window->user_rect.x, window->user_rect.y,
|
||||
window->user_rect.width, window->user_rect.height);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_verbose ("Size/position not modified\n");
|
||||
meta_topic (META_DEBUG_GEOMETRY, "Size/position not modified\n");
|
||||
}
|
||||
|
||||
/* Update struts for new window size */
|
||||
@ -1945,6 +1982,8 @@ meta_window_move_resize_internal (MetaWindow *window,
|
||||
* is somewhat fragile, though.
|
||||
*/
|
||||
|
||||
meta_topic (META_DEBUG_WORKAREA, "Window %s resized so invalidating its work areas\n",
|
||||
window->desc);
|
||||
invalidate_work_areas (window);
|
||||
}
|
||||
|
||||
@ -2061,7 +2100,7 @@ idle_move_resize (gpointer data)
|
||||
GSList *tmp;
|
||||
GSList *copy;
|
||||
|
||||
meta_verbose ("Clearing the move_resize queue\n");
|
||||
meta_topic (META_DEBUG_GEOMETRY, "Clearing the move_resize queue\n");
|
||||
|
||||
/* Work with a copy, for reentrancy. The allowed reentrancy isn't
|
||||
* complete; destroying a window while we're in here would result in
|
||||
@ -2102,7 +2141,8 @@ meta_window_unqueue_move_resize (MetaWindow *window)
|
||||
if (!window->move_resize_queued)
|
||||
return;
|
||||
|
||||
meta_verbose ("Removing %s from the move_resize queue\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Removing %s from the move_resize queue\n",
|
||||
window->desc);
|
||||
|
||||
/* Note that window may not actually be in move_resize_pending
|
||||
@ -2144,7 +2184,8 @@ meta_window_queue_move_resize (MetaWindow *window)
|
||||
if (window->move_resize_queued)
|
||||
return;
|
||||
|
||||
meta_verbose ("Putting %s in the move_resize queue\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Putting %s in the move_resize queue\n",
|
||||
window->desc);
|
||||
|
||||
window->move_resize_queued = TRUE;
|
||||
@ -2309,7 +2350,8 @@ meta_window_delete (MetaWindow *window,
|
||||
meta_error_trap_push (window->display);
|
||||
if (window->delete_window)
|
||||
{
|
||||
meta_verbose ("Deleting %s with delete_window request\n",
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Deleting %s with delete_window request\n",
|
||||
window->desc);
|
||||
meta_window_send_icccm_message (window,
|
||||
window->display->atom_wm_delete_window,
|
||||
@ -2317,7 +2359,8 @@ meta_window_delete (MetaWindow *window,
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_verbose ("Deleting %s with explicit kill\n",
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Deleting %s with explicit kill\n",
|
||||
window->desc);
|
||||
XKillClient (window->display->xdisplay, window->xwindow);
|
||||
}
|
||||
@ -2520,7 +2563,8 @@ meta_window_set_current_workspace_hint (MetaWindow *window)
|
||||
void
|
||||
meta_window_raise (MetaWindow *window)
|
||||
{
|
||||
meta_verbose ("Raising window %s\n", window->desc);
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Raising window %s\n", window->desc);
|
||||
|
||||
meta_stack_raise (window->screen->stack, window);
|
||||
}
|
||||
@ -2528,7 +2572,8 @@ meta_window_raise (MetaWindow *window)
|
||||
void
|
||||
meta_window_lower (MetaWindow *window)
|
||||
{
|
||||
meta_verbose ("Lowering window %s\n", window->desc);
|
||||
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||
"Lowering window %s\n", window->desc);
|
||||
|
||||
meta_stack_lower (window->screen->stack, window);
|
||||
}
|
||||
@ -2954,7 +2999,8 @@ meta_window_client_message (MetaWindow *window,
|
||||
|
||||
if (event->xclient.data.l[1] & WIN_HINTS_DO_NOT_COVER)
|
||||
{
|
||||
meta_verbose ("Setting WIN_HINTS_DO_NOT_COVER\n");
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Setting WIN_HINTS_DO_NOT_COVER\n");
|
||||
|
||||
data[0] = WIN_HINTS_DO_NOT_COVER;
|
||||
|
||||
@ -2967,7 +3013,8 @@ meta_window_client_message (MetaWindow *window,
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_verbose ("Unsetting WIN_HINTS_DO_NOT_COVER\n");
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Unsetting WIN_HINTS_DO_NOT_COVER\n");
|
||||
|
||||
data[0] = 0;
|
||||
|
||||
@ -3240,7 +3287,8 @@ send_configure_notify (MetaWindow *window)
|
||||
event.xconfigure.above = None; /* FIXME */
|
||||
event.xconfigure.override_redirect = False;
|
||||
|
||||
meta_verbose ("Sending synthetic configure notify to %s with x: %d y: %d w: %d h: %d\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Sending synthetic configure notify to %s with x: %d y: %d w: %d h: %d\n",
|
||||
window->desc,
|
||||
event.xconfigure.x, event.xconfigure.y,
|
||||
event.xconfigure.width, event.xconfigure.height);
|
||||
@ -3268,46 +3316,46 @@ spew_size_hints_differences (const XSizeHints *old,
|
||||
const XSizeHints *new)
|
||||
{
|
||||
if (FLAG_CHANGED (old, new, USPosition))
|
||||
meta_verbose ("XSizeHints: USPosition now %s\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "XSizeHints: USPosition now %s\n",
|
||||
FLAG_TOGGLED_ON (old, new, USPosition) ? "set" : "unset");
|
||||
if (FLAG_CHANGED (old, new, USSize))
|
||||
meta_verbose ("XSizeHints: USSize now %s\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "XSizeHints: USSize now %s\n",
|
||||
FLAG_TOGGLED_ON (old, new, USSize) ? "set" : "unset");
|
||||
if (FLAG_CHANGED (old, new, PPosition))
|
||||
meta_verbose ("XSizeHints: PPosition now %s\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "XSizeHints: PPosition now %s\n",
|
||||
FLAG_TOGGLED_ON (old, new, PPosition) ? "set" : "unset");
|
||||
if (FLAG_CHANGED (old, new, PSize))
|
||||
meta_verbose ("XSizeHints: PSize now %s\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "XSizeHints: PSize now %s\n",
|
||||
FLAG_TOGGLED_ON (old, new, PSize) ? "set" : "unset");
|
||||
if (FLAG_CHANGED (old, new, PMinSize))
|
||||
meta_verbose ("XSizeHints: PMinSize now %s (%d x %d -> %d x %d)\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "XSizeHints: PMinSize now %s (%d x %d -> %d x %d)\n",
|
||||
FLAG_TOGGLED_ON (old, new, PMinSize) ? "set" : "unset",
|
||||
old->min_width, old->min_height,
|
||||
new->min_width, new->min_height);
|
||||
if (FLAG_CHANGED (old, new, PMaxSize))
|
||||
meta_verbose ("XSizeHints: PMaxSize now %s (%d x %d -> %d x %d)\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "XSizeHints: PMaxSize now %s (%d x %d -> %d x %d)\n",
|
||||
FLAG_TOGGLED_ON (old, new, PMaxSize) ? "set" : "unset",
|
||||
old->max_width, old->max_height,
|
||||
new->max_width, new->max_height);
|
||||
if (FLAG_CHANGED (old, new, PResizeInc))
|
||||
meta_verbose ("XSizeHints: PResizeInc now %s (width_inc %d -> %d height_inc %d -> %d)\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "XSizeHints: PResizeInc now %s (width_inc %d -> %d height_inc %d -> %d)\n",
|
||||
FLAG_TOGGLED_ON (old, new, PResizeInc) ? "set" : "unset",
|
||||
old->width_inc, new->width_inc,
|
||||
old->height_inc, new->height_inc);
|
||||
if (FLAG_CHANGED (old, new, PAspect))
|
||||
meta_verbose ("XSizeHints: PAspect now %s (min %d/%d -> %d/%d max %d/%d -> %d/%d)\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "XSizeHints: PAspect now %s (min %d/%d -> %d/%d max %d/%d -> %d/%d)\n",
|
||||
FLAG_TOGGLED_ON (old, new, PAspect) ? "set" : "unset",
|
||||
old->min_aspect.x, old->min_aspect.y,
|
||||
new->min_aspect.x, new->min_aspect.y,
|
||||
old->max_aspect.x, old->max_aspect.y,
|
||||
new->max_aspect.x, new->max_aspect.y);
|
||||
if (FLAG_CHANGED (old, new, PBaseSize))
|
||||
meta_verbose ("XSizeHints: PBaseSize now %s (%d x %d -> %d x %d)\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "XSizeHints: PBaseSize now %s (%d x %d -> %d x %d)\n",
|
||||
FLAG_TOGGLED_ON (old, new, PBaseSize) ? "set" : "unset",
|
||||
old->base_width, old->base_height,
|
||||
new->base_width, new->base_height);
|
||||
if (FLAG_CHANGED (old, new, PWinGravity))
|
||||
meta_verbose ("XSizeHints: PWinGravity now %s (%d -> %d)\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "XSizeHints: PWinGravity now %s (%d -> %d)\n",
|
||||
FLAG_TOGGLED_ON (old, new, PWinGravity) ? "set" : "unset",
|
||||
old->win_gravity, new->win_gravity);
|
||||
}
|
||||
@ -3319,7 +3367,7 @@ update_size_hints (MetaWindow *window)
|
||||
gulong supplied;
|
||||
XSizeHints old_hints;
|
||||
|
||||
meta_verbose ("Updating WM_NORMAL_HINTS for %s\n", window->desc);
|
||||
meta_topic (META_DEBUG_GEOMETRY, "Updating WM_NORMAL_HINTS for %s\n", window->desc);
|
||||
|
||||
old_hints = window->size_hints;
|
||||
|
||||
@ -3355,7 +3403,7 @@ update_size_hints (MetaWindow *window)
|
||||
|
||||
if (window->size_hints.flags & PBaseSize)
|
||||
{
|
||||
meta_verbose ("Window %s sets base size %d x %d\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "Window %s sets base size %d x %d\n",
|
||||
window->desc,
|
||||
window->size_hints.base_width,
|
||||
window->size_hints.base_height);
|
||||
@ -3374,7 +3422,7 @@ update_size_hints (MetaWindow *window)
|
||||
|
||||
if (window->size_hints.flags & PMinSize)
|
||||
{
|
||||
meta_verbose ("Window %s sets min size %d x %d\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "Window %s sets min size %d x %d\n",
|
||||
window->desc,
|
||||
window->size_hints.min_width,
|
||||
window->size_hints.min_height);
|
||||
@ -3393,7 +3441,7 @@ update_size_hints (MetaWindow *window)
|
||||
|
||||
if (window->size_hints.flags & PMaxSize)
|
||||
{
|
||||
meta_verbose ("Window %s sets max size %d x %d\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "Window %s sets max size %d x %d\n",
|
||||
window->desc,
|
||||
window->size_hints.max_width,
|
||||
window->size_hints.max_height);
|
||||
@ -3408,7 +3456,8 @@ update_size_hints (MetaWindow *window)
|
||||
if (window->size_hints.max_width < window->size_hints.min_width)
|
||||
{
|
||||
/* someone is on crack */
|
||||
meta_warning (_("Window %s sets max width %d less than min width %d, disabling resize\n"),
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Window %s sets max width %d less than min width %d, disabling resize\n",
|
||||
window->desc,
|
||||
window->size_hints.max_width,
|
||||
window->size_hints.min_width);
|
||||
@ -3418,7 +3467,8 @@ update_size_hints (MetaWindow *window)
|
||||
if (window->size_hints.max_height < window->size_hints.min_height)
|
||||
{
|
||||
/* another cracksmoker */
|
||||
meta_warning (_("Window %s sets max height %d less than min height %d, disabling resize\n"),
|
||||
meta_topic (META_DEBUG_GEOMETRY,
|
||||
"Window %s sets max height %d less than min height %d, disabling resize\n",
|
||||
window->desc,
|
||||
window->size_hints.max_height,
|
||||
window->size_hints.min_height);
|
||||
@ -3427,19 +3477,19 @@ update_size_hints (MetaWindow *window)
|
||||
|
||||
if (window->size_hints.flags & PResizeInc)
|
||||
{
|
||||
meta_verbose ("Window %s sets resize width inc: %d height inc: %d\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "Window %s sets resize width inc: %d height inc: %d\n",
|
||||
window->desc,
|
||||
window->size_hints.width_inc,
|
||||
window->size_hints.height_inc);
|
||||
if (window->size_hints.width_inc == 0)
|
||||
{
|
||||
window->size_hints.width_inc = 1;
|
||||
meta_verbose ("Corrected 0 width_inc to 1\n");
|
||||
meta_topic (META_DEBUG_GEOMETRY, "Corrected 0 width_inc to 1\n");
|
||||
}
|
||||
if (window->size_hints.height_inc == 0)
|
||||
{
|
||||
window->size_hints.height_inc = 1;
|
||||
meta_verbose ("Corrected 0 height_inc to 1\n");
|
||||
meta_topic (META_DEBUG_GEOMETRY, "Corrected 0 height_inc to 1\n");
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -3451,7 +3501,7 @@ update_size_hints (MetaWindow *window)
|
||||
|
||||
if (window->size_hints.flags & PAspect)
|
||||
{
|
||||
meta_verbose ("Window %s sets min_aspect: %d/%d max_aspect: %d/%d\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "Window %s sets min_aspect: %d/%d max_aspect: %d/%d\n",
|
||||
window->desc,
|
||||
window->size_hints.min_aspect.x,
|
||||
window->size_hints.min_aspect.y,
|
||||
@ -3475,13 +3525,13 @@ update_size_hints (MetaWindow *window)
|
||||
|
||||
if (window->size_hints.flags & PWinGravity)
|
||||
{
|
||||
meta_verbose ("Window %s sets gravity %d\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "Window %s sets gravity %d\n",
|
||||
window->desc,
|
||||
window->size_hints.win_gravity);
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_verbose ("Window %s doesn't set gravity, using NW\n",
|
||||
meta_topic (META_DEBUG_GEOMETRY, "Window %s doesn't set gravity, using NW\n",
|
||||
window->desc);
|
||||
window->size_hints.win_gravity = NorthWestGravity;
|
||||
window->size_hints.flags |= PWinGravity;
|
||||
@ -4832,6 +4882,9 @@ update_struts (MetaWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Invalidating work areas of window %s due to struts update\n",
|
||||
window->desc);
|
||||
invalidate_work_areas (window);
|
||||
}
|
||||
|
||||
@ -5737,7 +5790,8 @@ meta_window_get_work_area (MetaWindow *window,
|
||||
area->width = window->screen->width - left_strut - right_strut;
|
||||
area->height = window->screen->height - top_strut - bottom_strut;
|
||||
|
||||
meta_verbose ("Window %s has work area %d,%d %d x %d\n",
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Window %s has work area %d,%d %d x %d\n",
|
||||
window->desc, area->x, area->y, area->width, area->height);
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,12 @@ meta_workspace_add_window (MetaWorkspace *workspace,
|
||||
|
||||
meta_window_queue_calc_showing (window);
|
||||
if (window->has_struts)
|
||||
{
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Invalidating work area of workspace %d since we're adding window %s to it\n",
|
||||
meta_workspace_index (workspace), window->desc);
|
||||
meta_workspace_invalidate_work_area (workspace);
|
||||
}
|
||||
|
||||
/* queue a move_resize since changing workspaces may change
|
||||
* the relevant struts
|
||||
@ -126,7 +131,12 @@ meta_workspace_remove_window (MetaWorkspace *workspace,
|
||||
meta_window_queue_calc_showing (window);
|
||||
|
||||
if (window->has_struts)
|
||||
{
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Invalidating work area of workspace %d since we're removing window %s from it\n",
|
||||
meta_workspace_index (workspace), window->desc);
|
||||
meta_workspace_invalidate_work_area (workspace);
|
||||
}
|
||||
|
||||
/* queue a move_resize since changing workspaces may change
|
||||
* the relevant struts
|
||||
@ -326,9 +336,15 @@ meta_workspace_invalidate_work_area (MetaWorkspace *workspace)
|
||||
GList *tmp;
|
||||
|
||||
if (workspace->work_area_invalid)
|
||||
{
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Work area for workspace %d is already invalid\n",
|
||||
meta_workspace_index (workspace));
|
||||
return;
|
||||
}
|
||||
|
||||
meta_verbose ("Invalidating work area for workspace %d\n",
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Invalidating work area for workspace %d\n",
|
||||
meta_workspace_index (workspace));
|
||||
|
||||
workspace->work_area_invalid = TRUE;
|
||||
@ -399,7 +415,8 @@ meta_workspace_get_work_area (MetaWorkspace *workspace,
|
||||
|
||||
workspace->work_area_invalid = FALSE;
|
||||
|
||||
meta_verbose ("Workspace %d has work area %d,%d %d x %d\n",
|
||||
meta_topic (META_DEBUG_WORKAREA,
|
||||
"Computed work area for workspace %d: %d,%d %d x %d\n",
|
||||
meta_workspace_index (workspace),
|
||||
workspace->work_area.x,
|
||||
workspace->work_area.y,
|
||||
|
Loading…
Reference in New Issue
Block a user