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>
|
2002-02-07 Havoc Pennington <hp@pobox.com>
|
||||||
|
|
||||||
* src/theme.c (colorize_pixbuf): do random voodoo on the algorithm
|
* src/theme.c (colorize_pixbuf): do random voodoo on the algorithm
|
||||||
|
413
src/display.c
413
src/display.c
@ -692,8 +692,9 @@ event_callback (XEvent *event,
|
|||||||
event->xunmap.window))
|
event->xunmap.window))
|
||||||
{
|
{
|
||||||
display->last_ignored_unmap_serial = event->xany.serial;
|
display->last_ignored_unmap_serial = event->xany.serial;
|
||||||
meta_verbose ("Will not focus on EnterNotify with serial %lu\n",
|
meta_topic (META_DEBUG_FOCUS,
|
||||||
display->last_ignored_unmap_serial);
|
"Will not focus on EnterNotify with serial %lu\n",
|
||||||
|
display->last_ignored_unmap_serial);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -968,8 +969,9 @@ event_callback (XEvent *event,
|
|||||||
{
|
{
|
||||||
if (window->unmaps_pending == 0)
|
if (window->unmaps_pending == 0)
|
||||||
{
|
{
|
||||||
meta_verbose ("Window %s withdrawn\n",
|
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||||
window->desc);
|
"Window %s withdrawn\n",
|
||||||
|
window->desc);
|
||||||
window->withdrawn = TRUE;
|
window->withdrawn = TRUE;
|
||||||
meta_window_free (window); /* Unmanage withdrawn window */
|
meta_window_free (window); /* Unmanage withdrawn window */
|
||||||
window = NULL;
|
window = NULL;
|
||||||
@ -977,8 +979,9 @@ event_callback (XEvent *event,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
window->unmaps_pending -= 1;
|
window->unmaps_pending -= 1;
|
||||||
meta_verbose ("Received pending unmap, %d now pending\n",
|
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||||
window->unmaps_pending);
|
"Received pending unmap, %d now pending\n",
|
||||||
|
window->unmaps_pending);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1078,7 +1081,6 @@ event_callback (XEvent *event,
|
|||||||
|
|
||||||
if (screen)
|
if (screen)
|
||||||
{
|
{
|
||||||
meta_debug_spew ("client for screen\n");
|
|
||||||
if (event->xclient.message_type ==
|
if (event->xclient.message_type ==
|
||||||
display->atom_net_current_desktop)
|
display->atom_net_current_desktop)
|
||||||
{
|
{
|
||||||
@ -1338,215 +1340,216 @@ static void
|
|||||||
meta_spew_event (MetaDisplay *display,
|
meta_spew_event (MetaDisplay *display,
|
||||||
XEvent *event)
|
XEvent *event)
|
||||||
{
|
{
|
||||||
const char *name = NULL;
|
const char *name = NULL;
|
||||||
char *extra = NULL;
|
char *extra = NULL;
|
||||||
char *winname;
|
char *winname;
|
||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
|
|
||||||
/* filter overnumerous events */
|
/* filter overnumerous events */
|
||||||
if (event->type == Expose || event->type == MotionNotify ||
|
if (event->type == Expose || event->type == MotionNotify ||
|
||||||
event->type == NoExpose)
|
event->type == NoExpose)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch (event->type)
|
switch (event->type)
|
||||||
{
|
{
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
name = "KeyPress";
|
name = "KeyPress";
|
||||||
extra = key_event_description (display->xdisplay, event);
|
extra = key_event_description (display->xdisplay, event);
|
||||||
break;
|
break;
|
||||||
case KeyRelease:
|
case KeyRelease:
|
||||||
name = "KeyRelease";
|
name = "KeyRelease";
|
||||||
extra = key_event_description (display->xdisplay, event);
|
extra = key_event_description (display->xdisplay, event);
|
||||||
break;
|
break;
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
name = "ButtonPress";
|
name = "ButtonPress";
|
||||||
break;
|
break;
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
name = "ButtonRelease";
|
name = "ButtonRelease";
|
||||||
break;
|
break;
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
name = "MotionNotify";
|
name = "MotionNotify";
|
||||||
break;
|
break;
|
||||||
case EnterNotify:
|
case EnterNotify:
|
||||||
name = "EnterNotify";
|
name = "EnterNotify";
|
||||||
extra = g_strdup_printf ("win: 0x%lx root: 0x%lx subwindow: 0x%lx mode: %d detail: %d",
|
extra = g_strdup_printf ("win: 0x%lx root: 0x%lx subwindow: 0x%lx mode: %d detail: %d",
|
||||||
event->xcrossing.window,
|
event->xcrossing.window,
|
||||||
event->xcrossing.root,
|
event->xcrossing.root,
|
||||||
event->xcrossing.subwindow,
|
event->xcrossing.subwindow,
|
||||||
event->xcrossing.mode,
|
event->xcrossing.mode,
|
||||||
event->xcrossing.detail);
|
event->xcrossing.detail);
|
||||||
break;
|
break;
|
||||||
case LeaveNotify:
|
case LeaveNotify:
|
||||||
name = "LeaveNotify";
|
name = "LeaveNotify";
|
||||||
extra = g_strdup_printf ("win: 0x%lx root: 0x%lx subwindow: 0x%lx mode: %d detail: %d",
|
extra = g_strdup_printf ("win: 0x%lx root: 0x%lx subwindow: 0x%lx mode: %d detail: %d",
|
||||||
event->xcrossing.window,
|
event->xcrossing.window,
|
||||||
event->xcrossing.root,
|
event->xcrossing.root,
|
||||||
event->xcrossing.subwindow,
|
event->xcrossing.subwindow,
|
||||||
event->xcrossing.mode,
|
event->xcrossing.mode,
|
||||||
event->xcrossing.detail);
|
event->xcrossing.detail);
|
||||||
break;
|
break;
|
||||||
case FocusIn:
|
case FocusIn:
|
||||||
name = "FocusIn";
|
name = "FocusIn";
|
||||||
extra = g_strdup_printf ("detail: %s mode: %s\n",
|
extra = g_strdup_printf ("detail: %s mode: %s\n",
|
||||||
meta_focus_detail_to_string (event->xfocus.detail),
|
meta_focus_detail_to_string (event->xfocus.detail),
|
||||||
meta_focus_mode_to_string (event->xfocus.mode));
|
meta_focus_mode_to_string (event->xfocus.mode));
|
||||||
break;
|
break;
|
||||||
case FocusOut:
|
case FocusOut:
|
||||||
name = "FocusOut";
|
name = "FocusOut";
|
||||||
extra = g_strdup_printf ("detail: %s mode: %s\n",
|
extra = g_strdup_printf ("detail: %s mode: %s\n",
|
||||||
meta_focus_detail_to_string (event->xfocus.detail),
|
meta_focus_detail_to_string (event->xfocus.detail),
|
||||||
meta_focus_mode_to_string (event->xfocus.mode));
|
meta_focus_mode_to_string (event->xfocus.mode));
|
||||||
break;
|
break;
|
||||||
case KeymapNotify:
|
case KeymapNotify:
|
||||||
name = "KeymapNotify";
|
name = "KeymapNotify";
|
||||||
break;
|
break;
|
||||||
case Expose:
|
case Expose:
|
||||||
name = "Expose";
|
name = "Expose";
|
||||||
break;
|
break;
|
||||||
case GraphicsExpose:
|
case GraphicsExpose:
|
||||||
name = "GraphicsExpose";
|
name = "GraphicsExpose";
|
||||||
break;
|
break;
|
||||||
case NoExpose:
|
case NoExpose:
|
||||||
name = "NoExpose";
|
name = "NoExpose";
|
||||||
break;
|
break;
|
||||||
case VisibilityNotify:
|
case VisibilityNotify:
|
||||||
name = "VisibilityNotify";
|
name = "VisibilityNotify";
|
||||||
break;
|
break;
|
||||||
case CreateNotify:
|
case CreateNotify:
|
||||||
name = "CreateNotify";
|
name = "CreateNotify";
|
||||||
break;
|
break;
|
||||||
case DestroyNotify:
|
case DestroyNotify:
|
||||||
name = "DestroyNotify";
|
name = "DestroyNotify";
|
||||||
break;
|
break;
|
||||||
case UnmapNotify:
|
case UnmapNotify:
|
||||||
name = "UnmapNotify";
|
name = "UnmapNotify";
|
||||||
break;
|
break;
|
||||||
case MapNotify:
|
case MapNotify:
|
||||||
name = "MapNotify";
|
name = "MapNotify";
|
||||||
break;
|
break;
|
||||||
case MapRequest:
|
case MapRequest:
|
||||||
name = "MapRequest";
|
name = "MapRequest";
|
||||||
break;
|
break;
|
||||||
case ReparentNotify:
|
case ReparentNotify:
|
||||||
name = "ReparentNotify";
|
name = "ReparentNotify";
|
||||||
break;
|
break;
|
||||||
case ConfigureNotify:
|
case ConfigureNotify:
|
||||||
name = "ConfigureNotify";
|
name = "ConfigureNotify";
|
||||||
extra = g_strdup_printf ("x: %d y: %d w: %d h: %d above: 0x%lx",
|
extra = g_strdup_printf ("x: %d y: %d w: %d h: %d above: 0x%lx",
|
||||||
event->xconfigure.x,
|
event->xconfigure.x,
|
||||||
event->xconfigure.y,
|
event->xconfigure.y,
|
||||||
event->xconfigure.width,
|
event->xconfigure.width,
|
||||||
event->xconfigure.height,
|
event->xconfigure.height,
|
||||||
event->xconfigure.above);
|
event->xconfigure.above);
|
||||||
break;
|
break;
|
||||||
case ConfigureRequest:
|
case ConfigureRequest:
|
||||||
name = "ConfigureRequest";
|
name = "ConfigureRequest";
|
||||||
extra = g_strdup_printf ("parent: 0x%lx window: 0x%lx x: %d %sy: %d %sw: %d %sh: %d %sborder: %d %s",
|
extra = g_strdup_printf ("parent: 0x%lx window: 0x%lx x: %d %sy: %d %sw: %d %sh: %d %sborder: %d %s",
|
||||||
event->xconfigurerequest.parent,
|
event->xconfigurerequest.parent,
|
||||||
event->xconfigurerequest.window,
|
event->xconfigurerequest.window,
|
||||||
event->xconfigurerequest.x,
|
event->xconfigurerequest.x,
|
||||||
event->xconfigurerequest.value_mask &
|
event->xconfigurerequest.value_mask &
|
||||||
CWX ? "" : "(unset) ",
|
CWX ? "" : "(unset) ",
|
||||||
event->xconfigurerequest.y,
|
event->xconfigurerequest.y,
|
||||||
event->xconfigurerequest.value_mask &
|
event->xconfigurerequest.value_mask &
|
||||||
CWY ? "" : "(unset) ",
|
CWY ? "" : "(unset) ",
|
||||||
event->xconfigurerequest.width,
|
event->xconfigurerequest.width,
|
||||||
event->xconfigurerequest.value_mask &
|
event->xconfigurerequest.value_mask &
|
||||||
CWWidth ? "" : "(unset) ",
|
CWWidth ? "" : "(unset) ",
|
||||||
event->xconfigurerequest.height,
|
event->xconfigurerequest.height,
|
||||||
event->xconfigurerequest.value_mask &
|
event->xconfigurerequest.value_mask &
|
||||||
CWHeight ? "" : "(unset) ",
|
CWHeight ? "" : "(unset) ",
|
||||||
event->xconfigurerequest.border_width,
|
event->xconfigurerequest.border_width,
|
||||||
event->xconfigurerequest.value_mask &
|
event->xconfigurerequest.value_mask &
|
||||||
CWBorderWidth ? "" : "(unset)");
|
CWBorderWidth ? "" : "(unset)");
|
||||||
break;
|
break;
|
||||||
case GravityNotify:
|
case GravityNotify:
|
||||||
name = "GravityNotify";
|
name = "GravityNotify";
|
||||||
break;
|
break;
|
||||||
case ResizeRequest:
|
case ResizeRequest:
|
||||||
name = "ResizeRequest";
|
name = "ResizeRequest";
|
||||||
break;
|
break;
|
||||||
case CirculateNotify:
|
case CirculateNotify:
|
||||||
name = "CirculateNotify";
|
name = "CirculateNotify";
|
||||||
break;
|
break;
|
||||||
case CirculateRequest:
|
case CirculateRequest:
|
||||||
name = "CirculateRequest";
|
name = "CirculateRequest";
|
||||||
break;
|
break;
|
||||||
case PropertyNotify:
|
case PropertyNotify:
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
const char *state;
|
const char *state;
|
||||||
|
|
||||||
name = "PropertyNotify";
|
name = "PropertyNotify";
|
||||||
|
|
||||||
meta_error_trap_push (display);
|
meta_error_trap_push (display);
|
||||||
str = XGetAtomName (display->xdisplay,
|
str = XGetAtomName (display->xdisplay,
|
||||||
event->xproperty.atom);
|
event->xproperty.atom);
|
||||||
meta_error_trap_pop (display);
|
meta_error_trap_pop (display);
|
||||||
|
|
||||||
if (event->xproperty.state == PropertyNewValue)
|
if (event->xproperty.state == PropertyNewValue)
|
||||||
state = "PropertyNewValue";
|
state = "PropertyNewValue";
|
||||||
else if (event->xproperty.state == PropertyDelete)
|
else if (event->xproperty.state == PropertyDelete)
|
||||||
state = "PropertyDelete";
|
state = "PropertyDelete";
|
||||||
else
|
else
|
||||||
state = "???";
|
state = "???";
|
||||||
|
|
||||||
extra = g_strdup_printf ("atom: %s state: %s",
|
extra = g_strdup_printf ("atom: %s state: %s",
|
||||||
str ? str : "(unknown atom)",
|
str ? str : "(unknown atom)",
|
||||||
state);
|
state);
|
||||||
XFree (str);
|
XFree (str);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SelectionClear:
|
case SelectionClear:
|
||||||
name = "SelectionClear";
|
name = "SelectionClear";
|
||||||
break;
|
break;
|
||||||
case SelectionRequest:
|
case SelectionRequest:
|
||||||
name = "SelectionRequest";
|
name = "SelectionRequest";
|
||||||
break;
|
break;
|
||||||
case SelectionNotify:
|
case SelectionNotify:
|
||||||
name = "SelectionNotify";
|
name = "SelectionNotify";
|
||||||
break;
|
break;
|
||||||
case ColormapNotify:
|
case ColormapNotify:
|
||||||
name = "ColormapNotify";
|
name = "ColormapNotify";
|
||||||
break;
|
break;
|
||||||
case ClientMessage:
|
case ClientMessage:
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
name = "ClientMessage";
|
name = "ClientMessage";
|
||||||
meta_error_trap_push (display);
|
meta_error_trap_push (display);
|
||||||
str = XGetAtomName (display->xdisplay,
|
str = XGetAtomName (display->xdisplay,
|
||||||
event->xclient.message_type);
|
event->xclient.message_type);
|
||||||
meta_error_trap_pop (display);
|
meta_error_trap_pop (display);
|
||||||
extra = g_strdup_printf ("type: %s format: %d\n",
|
extra = g_strdup_printf ("type: %s format: %d\n",
|
||||||
str ? str : "(unknown atom)",
|
str ? str : "(unknown atom)",
|
||||||
event->xclient.format);
|
event->xclient.format);
|
||||||
XFree (str);
|
XFree (str);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MappingNotify:
|
case MappingNotify:
|
||||||
name = "MappingNotify";
|
name = "MappingNotify";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
meta_verbose ("Unknown event type %d\n", event->xany.type);
|
meta_verbose ("Unknown event type %d\n", event->xany.type);
|
||||||
name = "Unknown event type";
|
name = "Unknown event type";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
screen = meta_display_screen_for_root (display, event->xany.window);
|
screen = meta_display_screen_for_root (display, event->xany.window);
|
||||||
|
|
||||||
if (screen)
|
if (screen)
|
||||||
winname = g_strdup_printf ("root %d", screen->number);
|
winname = g_strdup_printf ("root %d", screen->number);
|
||||||
else
|
else
|
||||||
winname = g_strdup_printf ("0x%lx", event->xany.window);
|
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,
|
||||||
extra ? ":" : "", extra ? extra : "",
|
"%s on %s%s %s serial %lu\n", name, winname,
|
||||||
event->xany.serial);
|
extra ? ":" : "", extra ? extra : "",
|
||||||
|
event->xany.serial);
|
||||||
|
|
||||||
g_free (winname);
|
g_free (winname);
|
||||||
|
|
||||||
if (extra)
|
if (extra)
|
||||||
g_free (extra);
|
g_free (extra);
|
||||||
}
|
}
|
||||||
|
|
||||||
MetaWindow*
|
MetaWindow*
|
||||||
|
@ -105,7 +105,8 @@ meta_window_ensure_frame (MetaWindow *window)
|
|||||||
window->mapped = FALSE; /* the reparent will unmap the window,
|
window->mapped = FALSE; /* the reparent will unmap the window,
|
||||||
* we don't want to take that as a withdraw
|
* 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->unmaps_pending += 1;
|
||||||
}
|
}
|
||||||
/* window was reparented to this position */
|
/* window was reparented to this position */
|
||||||
@ -158,7 +159,8 @@ meta_window_destroy_frame (MetaWindow *window)
|
|||||||
* can identify a withdraw initiated
|
* can identify a withdraw initiated
|
||||||
* by the client.
|
* 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;
|
window->unmaps_pending += 1;
|
||||||
}
|
}
|
||||||
XReparentWindow (window->display->xdisplay,
|
XReparentWindow (window->display->xdisplay,
|
||||||
|
191
src/frames.c
191
src/frames.c
@ -48,30 +48,10 @@ static gboolean meta_frames_destroy_event (GtkWidget *widget,
|
|||||||
GdkEventAny *event);
|
GdkEventAny *event);
|
||||||
static gboolean meta_frames_expose_event (GtkWidget *widget,
|
static gboolean meta_frames_expose_event (GtkWidget *widget,
|
||||||
GdkEventExpose *event);
|
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,
|
static gboolean meta_frames_enter_notify_event (GtkWidget *widget,
|
||||||
GdkEventCrossing *event);
|
GdkEventCrossing *event);
|
||||||
static gboolean meta_frames_leave_notify_event (GtkWidget *widget,
|
static gboolean meta_frames_leave_notify_event (GtkWidget *widget,
|
||||||
GdkEventCrossing *event);
|
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,
|
static void meta_frames_paint_to_drawable (MetaFrames *frames,
|
||||||
MetaUIFrame *frame,
|
MetaUIFrame *frame,
|
||||||
@ -94,14 +74,7 @@ static MetaFrameControl get_control (MetaFrames *frames,
|
|||||||
int y);
|
int y);
|
||||||
static void clear_tip (MetaFrames *frames);
|
static void clear_tip (MetaFrames *frames);
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
dummy, /* remove this when you add more signals */
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
static GtkWidgetClass *parent_class = NULL;
|
static GtkWidgetClass *parent_class = NULL;
|
||||||
static guint signals[LAST_SIGNAL];
|
|
||||||
|
|
||||||
GtkType
|
GtkType
|
||||||
meta_frames_get_type (void)
|
meta_frames_get_type (void)
|
||||||
@ -150,11 +123,11 @@ meta_frames_class_init (MetaFramesClass *class)
|
|||||||
widget_class->unrealize = meta_frames_unrealize;
|
widget_class->unrealize = meta_frames_unrealize;
|
||||||
|
|
||||||
widget_class->expose_event = meta_frames_expose_event;
|
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->destroy_event = meta_frames_destroy_event;
|
|
||||||
widget_class->button_press_event = meta_frames_button_press_event;
|
widget_class->button_press_event = meta_frames_button_press_event;
|
||||||
widget_class->button_release_event = meta_frames_button_release_event;
|
widget_class->button_release_event = meta_frames_button_release_event;
|
||||||
widget_class->motion_notify_event = meta_frames_motion_notify_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;
|
widget_class->leave_notify_event = meta_frames_leave_notify_event;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1252,38 +1225,6 @@ meta_frames_paint_to_drawable (MetaFrames *frames,
|
|||||||
mini_icon, icon);
|
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
|
static gboolean
|
||||||
meta_frames_enter_notify_event (GtkWidget *widget,
|
meta_frames_enter_notify_event (GtkWidget *widget,
|
||||||
GdkEventCrossing *event)
|
GdkEventCrossing *event)
|
||||||
@ -1322,134 +1263,6 @@ meta_frames_leave_notify_event (GtkWidget *widget,
|
|||||||
return TRUE;
|
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*
|
static GdkRectangle*
|
||||||
control_rect (MetaFrameControl control,
|
control_rect (MetaFrameControl control,
|
||||||
MetaFrameGeometry *fgeom)
|
MetaFrameGeometry *fgeom)
|
||||||
|
10
src/place.c
10
src/place.c
@ -214,7 +214,7 @@ meta_window_place (MetaWindow *window,
|
|||||||
* placement coordinates.
|
* 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
|
/* FIXME copying Mac, when placing a dialog
|
||||||
* put it at 1/5 down and horizontally centered
|
* put it at 1/5 down and horizontally centered
|
||||||
@ -245,8 +245,8 @@ meta_window_place (MetaWindow *window,
|
|||||||
if (fgeom)
|
if (fgeom)
|
||||||
y += fgeom->top_height;
|
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);
|
window->desc);
|
||||||
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -265,8 +265,8 @@ meta_window_place (MetaWindow *window,
|
|||||||
x = (w - window->rect.width) / 2;
|
x = (w - window->rect.width) / 2;
|
||||||
y = (y - window->rect.height) / 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);
|
window->desc);
|
||||||
|
|
||||||
goto done;
|
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_NUM_WORKSPACES "/apps/metacity/general/num_workspaces"
|
||||||
#define KEY_APPLICATION_BASED "/apps/metacity/general/application_based"
|
#define KEY_APPLICATION_BASED "/apps/metacity/general/application_based"
|
||||||
|
|
||||||
static GConfClient *client = NULL;
|
static GConfClient *default_client = NULL;
|
||||||
static GList *listeners = NULL;
|
static GList *listeners = NULL;
|
||||||
static GList *changes = NULL;
|
static GList *changes = NULL;
|
||||||
static guint changed_idle;
|
static guint changed_idle;
|
||||||
@ -198,24 +198,24 @@ meta_prefs_init (void)
|
|||||||
int int_val;
|
int int_val;
|
||||||
gboolean bool_val;
|
gboolean bool_val;
|
||||||
|
|
||||||
if (client != NULL)
|
if (default_client != NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* returns a reference which we hold forever */
|
/* 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,
|
GCONF_CLIENT_PRELOAD_RECURSIVE,
|
||||||
&err);
|
&err);
|
||||||
cleanup_error (&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);
|
&err);
|
||||||
cleanup_error (&err);
|
cleanup_error (&err);
|
||||||
update_focus_mode (str_val);
|
update_focus_mode (str_val);
|
||||||
g_free (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);
|
&err);
|
||||||
cleanup_error (&err);
|
cleanup_error (&err);
|
||||||
update_theme (str_val);
|
update_theme (str_val);
|
||||||
@ -226,33 +226,33 @@ meta_prefs_init (void)
|
|||||||
* just lazy. But they keys ought to be set, anyhow.
|
* 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);
|
&err);
|
||||||
cleanup_error (&err);
|
cleanup_error (&err);
|
||||||
update_use_desktop_font (bool_val);
|
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);
|
&err);
|
||||||
cleanup_error (&err);
|
cleanup_error (&err);
|
||||||
update_titlebar_font_size (int_val);
|
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);
|
&err);
|
||||||
cleanup_error (&err);
|
cleanup_error (&err);
|
||||||
update_titlebar_font (str_val);
|
update_titlebar_font (str_val);
|
||||||
g_free (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);
|
&err);
|
||||||
cleanup_error (&err);
|
cleanup_error (&err);
|
||||||
update_num_workspaces (int_val);
|
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);
|
&err);
|
||||||
cleanup_error (&err);
|
cleanup_error (&err);
|
||||||
update_application_based (bool_val);
|
update_application_based (bool_val);
|
||||||
|
|
||||||
gconf_client_notify_add (client, "/apps/metacity",
|
gconf_client_notify_add (default_client, "/apps/metacity",
|
||||||
change_notify,
|
change_notify,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
@ -422,7 +422,7 @@ update_focus_mode (const char *value)
|
|||||||
static gboolean
|
static gboolean
|
||||||
update_theme (const char *value)
|
update_theme (const char *value)
|
||||||
{
|
{
|
||||||
const char *old_theme;
|
char *old_theme;
|
||||||
gboolean changed;
|
gboolean changed;
|
||||||
|
|
||||||
old_theme = current_theme;
|
old_theme = current_theme;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
void
|
void
|
||||||
meta_session_init (const char *previous_id)
|
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*
|
const MetaWindowSessionInfo*
|
||||||
@ -208,8 +208,8 @@ meta_session_init (const char *previous_id)
|
|||||||
unsigned long mask;
|
unsigned long mask;
|
||||||
SmcCallbacks callbacks;
|
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)");
|
previous_id ? previous_id : "(none)");
|
||||||
|
|
||||||
if (previous_id)
|
if (previous_id)
|
||||||
load_state (previous_id);
|
load_state (previous_id);
|
||||||
@ -251,7 +251,7 @@ meta_session_init (const char *previous_id)
|
|||||||
{
|
{
|
||||||
if (client_id == NULL)
|
if (client_id == NULL)
|
||||||
meta_bug ("Session manager gave us a NULL client ID?");
|
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)
|
if (previous_id && strcmp (previous_id, client_id) == 0)
|
||||||
@ -439,7 +439,7 @@ save_yourself_callback (SmcConn smc_conn,
|
|||||||
static void
|
static void
|
||||||
die_callback (SmcConn smc_conn, SmPointer client_data)
|
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 ();
|
disconnect ();
|
||||||
meta_quit (META_EXIT_SUCCESS);
|
meta_quit (META_EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
@ -768,7 +768,7 @@ save_state (void)
|
|||||||
session_dir, g_strerror (errno));
|
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");
|
outfile = fopen (session_file, "w");
|
||||||
|
|
||||||
@ -833,8 +833,8 @@ save_state (void)
|
|||||||
role = window->role ?
|
role = window->role ?
|
||||||
encode_text_as_utf8_markup (window->role) : NULL;
|
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);
|
window->desc, window->sm_client_id);
|
||||||
|
|
||||||
fprintf (outfile,
|
fprintf (outfile,
|
||||||
" <window id=\"%s\" class=\"%s\" name=\"%s\" title=\"%s\" role=\"%s\" type=\"%s\">\n",
|
" <window id=\"%s\" class=\"%s\" name=\"%s\" title=\"%s\" role=\"%s\" type=\"%s\">\n",
|
||||||
@ -884,8 +884,8 @@ save_state (void)
|
|||||||
}
|
}
|
||||||
else
|
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);
|
window->desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
@ -992,7 +992,7 @@ load_state (const char *previous_id)
|
|||||||
return;
|
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);
|
g_free (session_file);
|
||||||
session_file = NULL;
|
session_file = NULL;
|
||||||
|
|
||||||
@ -1207,12 +1207,12 @@ start_element_handler (GMarkupParseContext *context,
|
|||||||
++i;
|
++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.x,
|
||||||
pd->info->rect.y,
|
pd->info->rect.y,
|
||||||
pd->info->rect.width,
|
pd->info->rect.width,
|
||||||
pd->info->rect.height,
|
pd->info->rect.height,
|
||||||
window_gravity_to_string (pd->info->gravity));
|
window_gravity_to_string (pd->info->gravity));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1242,10 +1242,10 @@ end_element_handler (GMarkupParseContext *context,
|
|||||||
window_info_list = g_slist_prepend (window_info_list,
|
window_info_list = g_slist_prepend (window_info_list,
|
||||||
pd->info);
|
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_class ? pd->info->res_class : "(none)",
|
||||||
pd->info->res_name ? pd->info->res_name : "(none)",
|
pd->info->res_name ? pd->info->res_name : "(none)",
|
||||||
pd->info->role ? pd->info->role : "(none)");
|
pd->info->role ? pd->info->role : "(none)");
|
||||||
|
|
||||||
pd->info = NULL;
|
pd->info = NULL;
|
||||||
}
|
}
|
||||||
@ -1305,11 +1305,11 @@ get_possible_matches (MetaWindow *window)
|
|||||||
both_null_or_matching (info->res_name, window->res_name) &&
|
both_null_or_matching (info->res_name, window->res_name) &&
|
||||||
both_null_or_matching (info->role, window->role))
|
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,
|
window->desc,
|
||||||
info->res_class ? info->res_class : "(none)",
|
info->res_class ? info->res_class : "(none)",
|
||||||
info->res_name ? info->res_name : "(none)",
|
info->res_name ? info->res_name : "(none)",
|
||||||
info->role ? info->role : "(none)");
|
info->role ? info->role : "(none)");
|
||||||
|
|
||||||
retval = g_slist_prepend (retval, info);
|
retval = g_slist_prepend (retval, info);
|
||||||
}
|
}
|
||||||
@ -1318,29 +1318,29 @@ get_possible_matches (MetaWindow *window)
|
|||||||
if (meta_is_verbose ())
|
if (meta_is_verbose ())
|
||||||
{
|
{
|
||||||
if (!both_null_or_matching (info->id, window->sm_client_id))
|
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->desc,
|
||||||
window->sm_client_id ? window->sm_client_id : "(none)",
|
window->sm_client_id ? window->sm_client_id : "(none)",
|
||||||
info->id ? info->id : "(none)");
|
info->id ? info->id : "(none)");
|
||||||
else if (!both_null_or_matching (info->res_class, window->res_class))
|
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->desc,
|
||||||
window->res_class ? window->res_class : "(none)",
|
window->res_class ? window->res_class : "(none)",
|
||||||
info->res_class ? info->res_class : "(none)");
|
info->res_class ? info->res_class : "(none)");
|
||||||
|
|
||||||
else if (!both_null_or_matching (info->res_name, window->res_name))
|
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->desc,
|
||||||
window->res_name ? window->res_name : "(none)",
|
window->res_name ? window->res_name : "(none)",
|
||||||
info->res_name ? info->res_name : "(none)");
|
info->res_name ? info->res_name : "(none)");
|
||||||
else if (!both_null_or_matching (info->role, window->role))
|
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->desc,
|
||||||
window->role ? window->role : "(none)",
|
window->role ? window->role : "(none)",
|
||||||
info->role ? info->role : "(none)");
|
info->role ? info->role : "(none)");
|
||||||
else
|
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);
|
window->desc, info->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1408,7 +1408,9 @@ meta_window_lookup_saved_state (MetaWindow *window)
|
|||||||
*/
|
*/
|
||||||
if (window->sm_client_id == NULL)
|
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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1416,8 +1418,8 @@ meta_window_lookup_saved_state (MetaWindow *window)
|
|||||||
|
|
||||||
if (possibles == NULL)
|
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);
|
window->desc);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
34
src/stack.c
34
src/stack.c
@ -133,7 +133,7 @@ meta_stack_add (MetaStack *stack,
|
|||||||
{
|
{
|
||||||
MetaStackOp *op;
|
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);
|
op = ensure_op (stack, window);
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ meta_stack_remove (MetaStack *stack,
|
|||||||
{
|
{
|
||||||
MetaStackOp *op;
|
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);
|
op = ensure_op (stack, window);
|
||||||
|
|
||||||
@ -275,8 +275,8 @@ compute_layer (MetaWindow *window)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_verbose ("Window %s on layer %d\n",
|
meta_topic (META_DEBUG_STACK, "Window %s on layer %d\n",
|
||||||
window->desc, window->layer);
|
window->desc, window->layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GList*
|
static GList*
|
||||||
@ -353,8 +353,8 @@ sort_window_list (GList *list)
|
|||||||
|
|
||||||
if (parent)
|
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);
|
w->desc, parent->desc);
|
||||||
list = ensure_before (list, w, parent);
|
list = ensure_before (list, w, parent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -388,7 +388,7 @@ meta_stack_sync_to_server (MetaStack *stack)
|
|||||||
if (stack->pending == NULL)
|
if (stack->pending == NULL)
|
||||||
return;
|
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.
|
/* Here comes the fun - figure out all the stacking.
|
||||||
* We make no pretense of efficiency.
|
* We make no pretense of efficiency.
|
||||||
@ -596,12 +596,12 @@ meta_stack_sync_to_server (MetaStack *stack)
|
|||||||
/* Sort each layer... */
|
/* Sort each layer... */
|
||||||
if (needs_sort[i])
|
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]);
|
stack->layers[i] = sort_window_list (stack->layers[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ... then append it */
|
/* ... then append it */
|
||||||
meta_verbose ("Layer %d: ", i);
|
meta_topic (META_DEBUG_STACK, "Layer %d: ", i);
|
||||||
meta_push_no_msg_prefix ();
|
meta_push_no_msg_prefix ();
|
||||||
tmp = stack->layers[i];
|
tmp = stack->layers[i];
|
||||||
while (tmp != NULL)
|
while (tmp != NULL)
|
||||||
@ -617,12 +617,12 @@ meta_stack_sync_to_server (MetaStack *stack)
|
|||||||
else
|
else
|
||||||
g_array_append_val (root_children_stacked, w->xwindow);
|
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;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_verbose ("\n");
|
meta_topic (META_DEBUG_STACK, "\n");
|
||||||
meta_pop_no_msg_prefix ();
|
meta_pop_no_msg_prefix ();
|
||||||
}
|
}
|
||||||
while (i > 0);
|
while (i > 0);
|
||||||
@ -634,8 +634,8 @@ meta_stack_sync_to_server (MetaStack *stack)
|
|||||||
|
|
||||||
/* Sync to server */
|
/* Sync to server */
|
||||||
|
|
||||||
meta_verbose ("Restacking %d windows\n",
|
meta_topic (META_DEBUG_STACK, "Restacking %d windows\n",
|
||||||
root_children_stacked->len);
|
root_children_stacked->len);
|
||||||
|
|
||||||
meta_error_trap_push (stack->screen->display);
|
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.
|
/* Just impose our stack, we don't know the previous state.
|
||||||
* This involves a ton of circulate requests and may flicker.
|
* 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)
|
if (root_children_stacked->len > 0)
|
||||||
XRestackWindows (stack->screen->display->xdisplay,
|
XRestackWindows (stack->screen->display->xdisplay,
|
||||||
@ -693,7 +693,7 @@ meta_stack_sync_to_server (MetaStack *stack)
|
|||||||
/* Move *newp below last_window */
|
/* Move *newp below last_window */
|
||||||
if (last_window == None)
|
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,
|
XRaiseWindow (stack->screen->display->xdisplay,
|
||||||
*newp);
|
*newp);
|
||||||
@ -710,7 +710,7 @@ meta_stack_sync_to_server (MetaStack *stack)
|
|||||||
changes.sibling = last_window;
|
changes.sibling = last_window;
|
||||||
changes.stack_mode = Below;
|
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);
|
*newp, last_window);
|
||||||
|
|
||||||
XConfigureWindow (stack->screen->display->xdisplay,
|
XConfigureWindow (stack->screen->display->xdisplay,
|
||||||
@ -727,7 +727,7 @@ meta_stack_sync_to_server (MetaStack *stack)
|
|||||||
if (newp != new_end)
|
if (newp != new_end)
|
||||||
{
|
{
|
||||||
/* Restack remaining windows */
|
/* Restack remaining windows */
|
||||||
meta_verbose ("Restacking remaining %d windows\n",
|
meta_topic (META_DEBUG_STACK, "Restacking remaining %d windows\n",
|
||||||
(int) (new_end - newp));
|
(int) (new_end - newp));
|
||||||
/* We need to include an already-stacked window
|
/* We need to include an already-stacked window
|
||||||
* in the restack call, so we get in the proper position
|
* in the restack call, so we get in the proper position
|
||||||
|
@ -3790,8 +3790,8 @@ meta_theme_load (const char *theme_name,
|
|||||||
&length,
|
&length,
|
||||||
&error))
|
&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);
|
theme_file, error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
g_free (theme_dir);
|
g_free (theme_dir);
|
||||||
g_free (theme_file);
|
g_free (theme_file);
|
||||||
@ -3814,8 +3814,8 @@ meta_theme_load (const char *theme_name,
|
|||||||
&length,
|
&length,
|
||||||
&error))
|
&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);
|
theme_file, error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
g_free (theme_dir);
|
g_free (theme_dir);
|
||||||
g_free (theme_file);
|
g_free (theme_file);
|
||||||
@ -3838,8 +3838,8 @@ meta_theme_load (const char *theme_name,
|
|||||||
&length,
|
&length,
|
||||||
&error))
|
&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);
|
theme_file, error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
g_free (theme_dir);
|
g_free (theme_dir);
|
||||||
g_free (theme_file);
|
g_free (theme_file);
|
||||||
@ -3874,7 +3874,7 @@ meta_theme_load (const char *theme_name,
|
|||||||
|
|
||||||
g_assert (text);
|
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);
|
parse_info_init (&info);
|
||||||
info.theme_name = theme_name;
|
info.theme_name = theme_name;
|
||||||
|
@ -3853,7 +3853,7 @@ meta_theme_set_current (const char *name,
|
|||||||
MetaTheme *new_theme;
|
MetaTheme *new_theme;
|
||||||
GError *err;
|
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 &&
|
if (!force_reload &&
|
||||||
meta_current_theme &&
|
meta_current_theme &&
|
||||||
@ -3876,7 +3876,7 @@ meta_theme_set_current (const char *name,
|
|||||||
|
|
||||||
meta_current_theme = new_theme;
|
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:
|
case META_DEBUG_FOCUS:
|
||||||
return "FOCUS";
|
return "FOCUS";
|
||||||
break;
|
case META_DEBUG_WORKAREA:
|
||||||
case META_DEBUG_GRADIENT_CACHE:
|
return "WORKAREA";
|
||||||
return "GRADIENT_CACHE";
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
12
src/util.h
12
src/util.h
@ -45,8 +45,16 @@ void meta_fatal (const char *format,
|
|||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
META_DEBUG_FOCUS,
|
META_DEBUG_FOCUS = 1 << 0,
|
||||||
META_DEBUG_GRADIENT_CACHE
|
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;
|
} MetaDebugTopic;
|
||||||
|
|
||||||
|
350
src/window.c
350
src/window.c
@ -317,8 +317,9 @@ meta_window_new (MetaDisplay *display, Window xwindow,
|
|||||||
/* if already mapped we don't want to do the placement thing */
|
/* if already mapped we don't want to do the placement thing */
|
||||||
window->placed = window->mapped;
|
window->placed = window->mapped;
|
||||||
if (window->placed)
|
if (window->placed)
|
||||||
meta_verbose ("Not placing window 0x%lx since it's already mapped\n",
|
meta_topic (META_DEBUG_PLACEMENT,
|
||||||
xwindow);
|
"Not placing window 0x%lx since it's already mapped\n",
|
||||||
|
xwindow);
|
||||||
window->unmanaging = FALSE;
|
window->unmanaging = FALSE;
|
||||||
window->calc_showing_queued = FALSE;
|
window->calc_showing_queued = FALSE;
|
||||||
window->move_resize_queued = FALSE;
|
window->move_resize_queued = FALSE;
|
||||||
@ -517,7 +518,8 @@ meta_window_new (MetaDisplay *display, Window xwindow,
|
|||||||
{
|
{
|
||||||
/* don't constrain with placement algorithm */
|
/* don't constrain with placement algorithm */
|
||||||
window->placed = TRUE;
|
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. */
|
/* Assume the app knows best how to place these. */
|
||||||
@ -592,8 +594,9 @@ meta_window_apply_session_info (MetaWindow *window,
|
|||||||
if (info->on_all_workspaces_set)
|
if (info->on_all_workspaces_set)
|
||||||
{
|
{
|
||||||
window->on_all_workspaces = info->on_all_workspaces;
|
window->on_all_workspaces = info->on_all_workspaces;
|
||||||
meta_verbose ("Restoring sticky state %d for window %s\n",
|
meta_topic (META_DEBUG_SM,
|
||||||
window->on_all_workspaces, window->desc);
|
"Restoring sticky state %d for window %s\n",
|
||||||
|
window->on_all_workspaces, window->desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info->workspace_indices)
|
if (info->workspace_indices)
|
||||||
@ -638,9 +641,10 @@ meta_window_apply_session_info (MetaWindow *window,
|
|||||||
|
|
||||||
meta_workspace_add_window (space, window);
|
meta_workspace_add_window (space, window);
|
||||||
|
|
||||||
meta_verbose ("Restoring saved window %s to workspace %d\n",
|
meta_topic (META_DEBUG_SM,
|
||||||
window->desc,
|
"Restoring saved window %s to workspace %d\n",
|
||||||
meta_workspace_screen_index (space));
|
window->desc,
|
||||||
|
meta_workspace_screen_index (space));
|
||||||
|
|
||||||
tmp = tmp->next;
|
tmp = tmp->next;
|
||||||
}
|
}
|
||||||
@ -666,8 +670,9 @@ meta_window_apply_session_info (MetaWindow *window,
|
|||||||
/* Force old gravity, ignoring anything now set */
|
/* Force old gravity, ignoring anything now set */
|
||||||
window->size_hints.win_gravity = info->gravity;
|
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,
|
||||||
x, y, w, h, window->desc);
|
"Restoring pos %d,%d size %d x %d for %s\n",
|
||||||
|
x, y, w, h, window->desc);
|
||||||
|
|
||||||
meta_window_move_resize_internal (window,
|
meta_window_move_resize_internal (window,
|
||||||
META_DO_GRAVITY_ADJUST,
|
META_DO_GRAVITY_ADJUST,
|
||||||
@ -710,7 +715,12 @@ meta_window_free (MetaWindow *window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (window->has_struts)
|
if (window->has_struts)
|
||||||
invalidate_work_areas (window);
|
{
|
||||||
|
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)
|
if (window->display->grab_window == window)
|
||||||
meta_display_end_grab_op (window->display,
|
meta_display_end_grab_op (window->display,
|
||||||
@ -970,7 +980,8 @@ idle_calc_showing (gpointer data)
|
|||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
GSList *copy;
|
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
|
/* Work with a copy, for reentrancy. The allowed reentrancy isn't
|
||||||
* complete; destroying a window while we're in here would result in
|
* complete; destroying a window while we're in here would result in
|
||||||
@ -1021,8 +1032,9 @@ meta_window_unqueue_calc_showing (MetaWindow *window)
|
|||||||
if (!window->calc_showing_queued)
|
if (!window->calc_showing_queued)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
meta_verbose ("Removing %s from the calc_showing queue\n",
|
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||||
window->desc);
|
"Removing %s from the calc_showing queue\n",
|
||||||
|
window->desc);
|
||||||
|
|
||||||
/* Note that window may not actually be in move_resize_pending
|
/* Note that window may not actually be in move_resize_pending
|
||||||
* because it may have been in "copy" inside the idle handler
|
* because it may have been in "copy" inside the idle handler
|
||||||
@ -1057,8 +1069,9 @@ meta_window_queue_calc_showing (MetaWindow *window)
|
|||||||
if (window->calc_showing_queued)
|
if (window->calc_showing_queued)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
meta_verbose ("Putting %s in the calc_showing queue\n",
|
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||||
window->desc);
|
"Putting %s in the calc_showing queue\n",
|
||||||
|
window->desc);
|
||||||
|
|
||||||
window->calc_showing_queued = TRUE;
|
window->calc_showing_queued = TRUE;
|
||||||
|
|
||||||
@ -1073,8 +1086,9 @@ meta_window_show (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
gboolean did_placement;
|
gboolean did_placement;
|
||||||
|
|
||||||
meta_verbose ("Showing window %s, shaded: %d iconic: %d placed: %d\n",
|
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||||
window->desc, window->shaded, window->iconic, window->placed);
|
"Showing window %s, shaded: %d iconic: %d placed: %d\n",
|
||||||
|
window->desc, window->shaded, window->iconic, window->placed);
|
||||||
|
|
||||||
did_placement = FALSE;
|
did_placement = FALSE;
|
||||||
if (!window->placed)
|
if (!window->placed)
|
||||||
@ -1103,7 +1117,8 @@ meta_window_show (MetaWindow *window)
|
|||||||
|
|
||||||
if (window->frame && !window->frame->mapped)
|
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;
|
window->frame->mapped = TRUE;
|
||||||
meta_ui_map_frame (window->screen->ui, window->frame->xwindow);
|
meta_ui_map_frame (window->screen->ui, window->frame->xwindow);
|
||||||
}
|
}
|
||||||
@ -1112,9 +1127,11 @@ meta_window_show (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
if (window->mapped)
|
if (window->mapped)
|
||||||
{
|
{
|
||||||
meta_verbose ("%s actually needs unmap (shaded)\n", window->desc);
|
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||||
meta_verbose ("Incrementing unmaps_pending on %s for shade\n",
|
"%s actually needs unmap (shaded)\n", window->desc);
|
||||||
window->desc);
|
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||||
|
"Incrementing unmaps_pending on %s for shade\n",
|
||||||
|
window->desc);
|
||||||
window->mapped = FALSE;
|
window->mapped = FALSE;
|
||||||
window->unmaps_pending += 1;
|
window->unmaps_pending += 1;
|
||||||
meta_error_trap_push (window->display);
|
meta_error_trap_push (window->display);
|
||||||
@ -1132,7 +1149,8 @@ meta_window_show (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
if (!window->mapped)
|
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;
|
window->mapped = TRUE;
|
||||||
meta_error_trap_push (window->display);
|
meta_error_trap_push (window->display);
|
||||||
XMapWindow (window->display->xdisplay, window->xwindow);
|
XMapWindow (window->display->xdisplay, window->xwindow);
|
||||||
@ -1179,13 +1197,14 @@ meta_window_hide (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
gboolean did_hide;
|
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;
|
did_hide = FALSE;
|
||||||
|
|
||||||
if (window->frame && window->frame->mapped)
|
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;
|
window->frame->mapped = FALSE;
|
||||||
meta_ui_unmap_frame (window->screen->ui, window->frame->xwindow);
|
meta_ui_unmap_frame (window->screen->ui, window->frame->xwindow);
|
||||||
did_hide = TRUE;
|
did_hide = TRUE;
|
||||||
@ -1193,9 +1212,11 @@ meta_window_hide (MetaWindow *window)
|
|||||||
|
|
||||||
if (window->mapped)
|
if (window->mapped)
|
||||||
{
|
{
|
||||||
meta_verbose ("%s actually needs unmap\n", window->desc);
|
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||||
meta_verbose ("Incrementing unmaps_pending on %s for hide\n",
|
"%s actually needs unmap\n", window->desc);
|
||||||
window->desc);
|
meta_topic (META_DEBUG_WINDOW_STATE,
|
||||||
|
"Incrementing unmaps_pending on %s for hide\n",
|
||||||
|
window->desc);
|
||||||
window->mapped = FALSE;
|
window->mapped = FALSE;
|
||||||
window->unmaps_pending += 1;
|
window->unmaps_pending += 1;
|
||||||
meta_error_trap_push (window->display);
|
meta_error_trap_push (window->display);
|
||||||
@ -1213,7 +1234,12 @@ meta_window_hide (MetaWindow *window)
|
|||||||
if (did_hide)
|
if (did_hide)
|
||||||
{
|
{
|
||||||
if (window->has_struts)
|
if (window->has_struts)
|
||||||
invalidate_work_areas (window);
|
{
|
||||||
|
meta_topic (META_DEBUG_WORKAREA,
|
||||||
|
"Unmapped window %s with struts, so invalidating work areas\n",
|
||||||
|
window->desc);
|
||||||
|
invalidate_work_areas (window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1258,7 +1284,8 @@ meta_window_maximize (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
if (!window->maximized)
|
if (!window->maximized)
|
||||||
{
|
{
|
||||||
meta_verbose ("Maximizing %s\n", window->desc);
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
|
"Maximizing %s\n", window->desc);
|
||||||
|
|
||||||
window->maximized = TRUE;
|
window->maximized = TRUE;
|
||||||
|
|
||||||
@ -1285,7 +1312,8 @@ meta_window_unmaximize (MetaWindow *window)
|
|||||||
{
|
{
|
||||||
if (window->maximized)
|
if (window->maximized)
|
||||||
{
|
{
|
||||||
meta_verbose ("Unmaximizing %s\n", window->desc);
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
|
"Unmaximizing %s\n", window->desc);
|
||||||
|
|
||||||
window->maximized = FALSE;
|
window->maximized = FALSE;
|
||||||
|
|
||||||
@ -1303,7 +1331,8 @@ meta_window_unmaximize (MetaWindow *window)
|
|||||||
void
|
void
|
||||||
meta_window_shade (MetaWindow *window)
|
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->shaded)
|
||||||
{
|
{
|
||||||
if (window->mapped)
|
if (window->mapped)
|
||||||
@ -1348,7 +1377,8 @@ meta_window_shade (MetaWindow *window)
|
|||||||
void
|
void
|
||||||
meta_window_unshade (MetaWindow *window)
|
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)
|
if (window->shaded)
|
||||||
{
|
{
|
||||||
window->shaded = FALSE;
|
window->shaded = FALSE;
|
||||||
@ -1566,11 +1596,12 @@ meta_window_move_resize_internal (MetaWindow *window,
|
|||||||
{
|
{
|
||||||
int oldx, oldy;
|
int oldx, oldy;
|
||||||
meta_window_get_position (window, &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,
|
||||||
window->desc, root_x_nw, root_y_nw, w, h,
|
"Move/resize %s to %d,%d %dx%d%s%s from %d,%d %dx%d\n",
|
||||||
is_configure_request ? " (configure request)" : "",
|
window->desc, root_x_nw, root_y_nw, w, h,
|
||||||
is_user_action ? " (user move/resize)" : "",
|
is_configure_request ? " (configure request)" : "",
|
||||||
oldx, oldy, window->rect.width, window->rect.height);
|
is_user_action ? " (user move/resize)" : "",
|
||||||
|
oldx, oldy, window->rect.width, window->rect.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->frame)
|
if (window->frame)
|
||||||
@ -1578,7 +1609,8 @@ meta_window_move_resize_internal (MetaWindow *window,
|
|||||||
&fgeom);
|
&fgeom);
|
||||||
|
|
||||||
constrain_size (window, &fgeom, w, h, &w, &h);
|
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 ||
|
if (w != window->rect.width ||
|
||||||
h != window->rect.height)
|
h != window->rect.height)
|
||||||
@ -1609,9 +1641,10 @@ meta_window_move_resize_internal (MetaWindow *window,
|
|||||||
window->frame->rect.width = new_w;
|
window->frame->rect.width = new_w;
|
||||||
window->frame->rect.height = new_h;
|
window->frame->rect.height = new_h;
|
||||||
|
|
||||||
meta_verbose ("Calculated frame size %dx%d\n",
|
meta_topic (META_DEBUG_GEOMETRY,
|
||||||
window->frame->rect.width,
|
"Calculated frame size %dx%d\n",
|
||||||
window->frame->rect.height);
|
window->frame->rect.width,
|
||||||
|
window->frame->rect.height);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1632,8 +1665,9 @@ meta_window_move_resize_internal (MetaWindow *window,
|
|||||||
&root_x_nw,
|
&root_x_nw,
|
||||||
&root_y_nw);
|
&root_y_nw);
|
||||||
|
|
||||||
meta_verbose ("Compensated position for gravity, new pos %d,%d\n",
|
meta_topic (META_DEBUG_GEOMETRY,
|
||||||
root_x_nw, root_y_nw);
|
"Compensated position for gravity, new pos %d,%d\n",
|
||||||
|
root_x_nw, root_y_nw);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* There can be somewhat bogus interactions between gravity
|
/* There can be somewhat bogus interactions between gravity
|
||||||
@ -1705,8 +1739,9 @@ meta_window_move_resize_internal (MetaWindow *window,
|
|||||||
root_x_nw, root_y_nw,
|
root_x_nw, root_y_nw,
|
||||||
&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,
|
||||||
root_x_nw, root_y_nw);
|
"Constrained position to %d,%d\n",
|
||||||
|
root_x_nw, root_y_nw);
|
||||||
|
|
||||||
if (window->frame)
|
if (window->frame)
|
||||||
{
|
{
|
||||||
@ -1879,12 +1914,13 @@ meta_window_move_resize_internal (MetaWindow *window,
|
|||||||
{
|
{
|
||||||
int newx, newy;
|
int newx, newy;
|
||||||
meta_window_get_position (window, &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,
|
||||||
newx, newy,
|
"Syncing new client geometry %d,%d %dx%d, border: %s pos: %s size: %s\n",
|
||||||
window->rect.width, window->rect.height,
|
newx, newy,
|
||||||
mask & CWBorderWidth ? "true" : "false",
|
window->rect.width, window->rect.height,
|
||||||
need_move_client ? "true" : "false",
|
mask & CWBorderWidth ? "true" : "false",
|
||||||
need_resize_client ? "true" : "false");
|
need_move_client ? "true" : "false",
|
||||||
|
need_resize_client ? "true" : "false");
|
||||||
}
|
}
|
||||||
|
|
||||||
meta_error_trap_push (window->display);
|
meta_error_trap_push (window->display);
|
||||||
@ -1924,14 +1960,15 @@ meta_window_move_resize_internal (MetaWindow *window,
|
|||||||
{
|
{
|
||||||
int newx, newy;
|
int newx, newy;
|
||||||
meta_window_get_position (window, &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,
|
||||||
newx, newy, window->rect.width, window->rect.height,
|
"New size/position %d,%d %dx%d (user %d,%d %dx%d)\n",
|
||||||
window->user_rect.x, window->user_rect.y,
|
newx, newy, window->rect.width, window->rect.height,
|
||||||
window->user_rect.width, window->user_rect.height);
|
window->user_rect.x, window->user_rect.y,
|
||||||
|
window->user_rect.width, window->user_rect.height);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
meta_verbose ("Size/position not modified\n");
|
meta_topic (META_DEBUG_GEOMETRY, "Size/position not modified\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update struts for new window size */
|
/* Update struts for new window size */
|
||||||
@ -1944,7 +1981,9 @@ meta_window_move_resize_internal (MetaWindow *window,
|
|||||||
* above. We rely on reaching an equilibrium state, which
|
* above. We rely on reaching an equilibrium state, which
|
||||||
* is somewhat fragile, though.
|
* is somewhat fragile, though.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
meta_topic (META_DEBUG_WORKAREA, "Window %s resized so invalidating its work areas\n",
|
||||||
|
window->desc);
|
||||||
invalidate_work_areas (window);
|
invalidate_work_areas (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2061,7 +2100,7 @@ idle_move_resize (gpointer data)
|
|||||||
GSList *tmp;
|
GSList *tmp;
|
||||||
GSList *copy;
|
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
|
/* Work with a copy, for reentrancy. The allowed reentrancy isn't
|
||||||
* complete; destroying a window while we're in here would result in
|
* complete; destroying a window while we're in here would result in
|
||||||
@ -2102,8 +2141,9 @@ meta_window_unqueue_move_resize (MetaWindow *window)
|
|||||||
if (!window->move_resize_queued)
|
if (!window->move_resize_queued)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
meta_verbose ("Removing %s from the move_resize queue\n",
|
meta_topic (META_DEBUG_GEOMETRY,
|
||||||
window->desc);
|
"Removing %s from the move_resize queue\n",
|
||||||
|
window->desc);
|
||||||
|
|
||||||
/* Note that window may not actually be in move_resize_pending
|
/* Note that window may not actually be in move_resize_pending
|
||||||
* because it may have been in "copy" inside the idle handler
|
* because it may have been in "copy" inside the idle handler
|
||||||
@ -2144,8 +2184,9 @@ meta_window_queue_move_resize (MetaWindow *window)
|
|||||||
if (window->move_resize_queued)
|
if (window->move_resize_queued)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
meta_verbose ("Putting %s in the move_resize queue\n",
|
meta_topic (META_DEBUG_GEOMETRY,
|
||||||
window->desc);
|
"Putting %s in the move_resize queue\n",
|
||||||
|
window->desc);
|
||||||
|
|
||||||
window->move_resize_queued = TRUE;
|
window->move_resize_queued = TRUE;
|
||||||
|
|
||||||
@ -2309,16 +2350,18 @@ meta_window_delete (MetaWindow *window,
|
|||||||
meta_error_trap_push (window->display);
|
meta_error_trap_push (window->display);
|
||||||
if (window->delete_window)
|
if (window->delete_window)
|
||||||
{
|
{
|
||||||
meta_verbose ("Deleting %s with delete_window request\n",
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
window->desc);
|
"Deleting %s with delete_window request\n",
|
||||||
|
window->desc);
|
||||||
meta_window_send_icccm_message (window,
|
meta_window_send_icccm_message (window,
|
||||||
window->display->atom_wm_delete_window,
|
window->display->atom_wm_delete_window,
|
||||||
timestamp);
|
timestamp);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
meta_verbose ("Deleting %s with explicit kill\n",
|
meta_topic (META_DEBUG_WINDOW_OPS,
|
||||||
window->desc);
|
"Deleting %s with explicit kill\n",
|
||||||
|
window->desc);
|
||||||
XKillClient (window->display->xdisplay, window->xwindow);
|
XKillClient (window->display->xdisplay, window->xwindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2520,7 +2563,8 @@ meta_window_set_current_workspace_hint (MetaWindow *window)
|
|||||||
void
|
void
|
||||||
meta_window_raise (MetaWindow *window)
|
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);
|
meta_stack_raise (window->screen->stack, window);
|
||||||
}
|
}
|
||||||
@ -2528,7 +2572,8 @@ meta_window_raise (MetaWindow *window)
|
|||||||
void
|
void
|
||||||
meta_window_lower (MetaWindow *window)
|
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);
|
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)
|
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;
|
data[0] = WIN_HINTS_DO_NOT_COVER;
|
||||||
|
|
||||||
@ -2967,7 +3013,8 @@ meta_window_client_message (MetaWindow *window,
|
|||||||
}
|
}
|
||||||
else
|
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;
|
data[0] = 0;
|
||||||
|
|
||||||
@ -3240,10 +3287,11 @@ send_configure_notify (MetaWindow *window)
|
|||||||
event.xconfigure.above = None; /* FIXME */
|
event.xconfigure.above = None; /* FIXME */
|
||||||
event.xconfigure.override_redirect = False;
|
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,
|
||||||
window->desc,
|
"Sending synthetic configure notify to %s with x: %d y: %d w: %d h: %d\n",
|
||||||
event.xconfigure.x, event.xconfigure.y,
|
window->desc,
|
||||||
event.xconfigure.width, event.xconfigure.height);
|
event.xconfigure.x, event.xconfigure.y,
|
||||||
|
event.xconfigure.width, event.xconfigure.height);
|
||||||
|
|
||||||
meta_error_trap_push (window->display);
|
meta_error_trap_push (window->display);
|
||||||
XSendEvent (window->display->xdisplay,
|
XSendEvent (window->display->xdisplay,
|
||||||
@ -3268,48 +3316,48 @@ spew_size_hints_differences (const XSizeHints *old,
|
|||||||
const XSizeHints *new)
|
const XSizeHints *new)
|
||||||
{
|
{
|
||||||
if (FLAG_CHANGED (old, new, USPosition))
|
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");
|
FLAG_TOGGLED_ON (old, new, USPosition) ? "set" : "unset");
|
||||||
if (FLAG_CHANGED (old, new, USSize))
|
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");
|
FLAG_TOGGLED_ON (old, new, USSize) ? "set" : "unset");
|
||||||
if (FLAG_CHANGED (old, new, PPosition))
|
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");
|
FLAG_TOGGLED_ON (old, new, PPosition) ? "set" : "unset");
|
||||||
if (FLAG_CHANGED (old, new, PSize))
|
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");
|
FLAG_TOGGLED_ON (old, new, PSize) ? "set" : "unset");
|
||||||
if (FLAG_CHANGED (old, new, PMinSize))
|
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",
|
FLAG_TOGGLED_ON (old, new, PMinSize) ? "set" : "unset",
|
||||||
old->min_width, old->min_height,
|
old->min_width, old->min_height,
|
||||||
new->min_width, new->min_height);
|
new->min_width, new->min_height);
|
||||||
if (FLAG_CHANGED (old, new, PMaxSize))
|
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",
|
FLAG_TOGGLED_ON (old, new, PMaxSize) ? "set" : "unset",
|
||||||
old->max_width, old->max_height,
|
old->max_width, old->max_height,
|
||||||
new->max_width, new->max_height);
|
new->max_width, new->max_height);
|
||||||
if (FLAG_CHANGED (old, new, PResizeInc))
|
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",
|
FLAG_TOGGLED_ON (old, new, PResizeInc) ? "set" : "unset",
|
||||||
old->width_inc, new->width_inc,
|
old->width_inc, new->width_inc,
|
||||||
old->height_inc, new->height_inc);
|
old->height_inc, new->height_inc);
|
||||||
if (FLAG_CHANGED (old, new, PAspect))
|
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",
|
FLAG_TOGGLED_ON (old, new, PAspect) ? "set" : "unset",
|
||||||
old->min_aspect.x, old->min_aspect.y,
|
old->min_aspect.x, old->min_aspect.y,
|
||||||
new->min_aspect.x, new->min_aspect.y,
|
new->min_aspect.x, new->min_aspect.y,
|
||||||
old->max_aspect.x, old->max_aspect.y,
|
old->max_aspect.x, old->max_aspect.y,
|
||||||
new->max_aspect.x, new->max_aspect.y);
|
new->max_aspect.x, new->max_aspect.y);
|
||||||
if (FLAG_CHANGED (old, new, PBaseSize))
|
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",
|
FLAG_TOGGLED_ON (old, new, PBaseSize) ? "set" : "unset",
|
||||||
old->base_width, old->base_height,
|
old->base_width, old->base_height,
|
||||||
new->base_width, new->base_height);
|
new->base_width, new->base_height);
|
||||||
if (FLAG_CHANGED (old, new, PWinGravity))
|
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",
|
FLAG_TOGGLED_ON (old, new, PWinGravity) ? "set" : "unset",
|
||||||
old->win_gravity, new->win_gravity);
|
old->win_gravity, new->win_gravity);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@ -3319,7 +3367,7 @@ update_size_hints (MetaWindow *window)
|
|||||||
gulong supplied;
|
gulong supplied;
|
||||||
XSizeHints old_hints;
|
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;
|
old_hints = window->size_hints;
|
||||||
|
|
||||||
@ -3355,10 +3403,10 @@ update_size_hints (MetaWindow *window)
|
|||||||
|
|
||||||
if (window->size_hints.flags & PBaseSize)
|
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->desc,
|
||||||
window->size_hints.base_width,
|
window->size_hints.base_width,
|
||||||
window->size_hints.base_height);
|
window->size_hints.base_height);
|
||||||
}
|
}
|
||||||
else if (window->size_hints.flags & PMinSize)
|
else if (window->size_hints.flags & PMinSize)
|
||||||
{
|
{
|
||||||
@ -3374,10 +3422,10 @@ update_size_hints (MetaWindow *window)
|
|||||||
|
|
||||||
if (window->size_hints.flags & PMinSize)
|
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->desc,
|
||||||
window->size_hints.min_width,
|
window->size_hints.min_width,
|
||||||
window->size_hints.min_height);
|
window->size_hints.min_height);
|
||||||
}
|
}
|
||||||
else if (window->size_hints.flags & PBaseSize)
|
else if (window->size_hints.flags & PBaseSize)
|
||||||
{
|
{
|
||||||
@ -3393,10 +3441,10 @@ update_size_hints (MetaWindow *window)
|
|||||||
|
|
||||||
if (window->size_hints.flags & PMaxSize)
|
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->desc,
|
||||||
window->size_hints.max_width,
|
window->size_hints.max_width,
|
||||||
window->size_hints.max_height);
|
window->size_hints.max_height);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3408,38 +3456,40 @@ update_size_hints (MetaWindow *window)
|
|||||||
if (window->size_hints.max_width < window->size_hints.min_width)
|
if (window->size_hints.max_width < window->size_hints.min_width)
|
||||||
{
|
{
|
||||||
/* someone is on crack */
|
/* 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->desc,
|
"Window %s sets max width %d less than min width %d, disabling resize\n",
|
||||||
window->size_hints.max_width,
|
window->desc,
|
||||||
window->size_hints.min_width);
|
window->size_hints.max_width,
|
||||||
|
window->size_hints.min_width);
|
||||||
window->size_hints.max_width = window->size_hints.min_width;
|
window->size_hints.max_width = window->size_hints.min_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->size_hints.max_height < window->size_hints.min_height)
|
if (window->size_hints.max_height < window->size_hints.min_height)
|
||||||
{
|
{
|
||||||
/* another cracksmoker */
|
/* another cracksmoker */
|
||||||
meta_warning (_("Window %s sets max height %d less than min height %d, disabling resize\n"),
|
meta_topic (META_DEBUG_GEOMETRY,
|
||||||
window->desc,
|
"Window %s sets max height %d less than min height %d, disabling resize\n",
|
||||||
window->size_hints.max_height,
|
window->desc,
|
||||||
window->size_hints.min_height);
|
window->size_hints.max_height,
|
||||||
|
window->size_hints.min_height);
|
||||||
window->size_hints.max_height = window->size_hints.min_height;
|
window->size_hints.max_height = window->size_hints.min_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->size_hints.flags & PResizeInc)
|
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->desc,
|
||||||
window->size_hints.width_inc,
|
window->size_hints.width_inc,
|
||||||
window->size_hints.height_inc);
|
window->size_hints.height_inc);
|
||||||
if (window->size_hints.width_inc == 0)
|
if (window->size_hints.width_inc == 0)
|
||||||
{
|
{
|
||||||
window->size_hints.width_inc = 1;
|
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)
|
if (window->size_hints.height_inc == 0)
|
||||||
{
|
{
|
||||||
window->size_hints.height_inc = 1;
|
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
|
else
|
||||||
@ -3451,12 +3501,12 @@ update_size_hints (MetaWindow *window)
|
|||||||
|
|
||||||
if (window->size_hints.flags & PAspect)
|
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->desc,
|
||||||
window->size_hints.min_aspect.x,
|
window->size_hints.min_aspect.x,
|
||||||
window->size_hints.min_aspect.y,
|
window->size_hints.min_aspect.y,
|
||||||
window->size_hints.max_aspect.x,
|
window->size_hints.max_aspect.x,
|
||||||
window->size_hints.max_aspect.y);
|
window->size_hints.max_aspect.y);
|
||||||
|
|
||||||
/* don't divide by 0 */
|
/* don't divide by 0 */
|
||||||
if (window->size_hints.min_aspect.y < 1)
|
if (window->size_hints.min_aspect.y < 1)
|
||||||
@ -3475,14 +3525,14 @@ update_size_hints (MetaWindow *window)
|
|||||||
|
|
||||||
if (window->size_hints.flags & PWinGravity)
|
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->desc,
|
||||||
window->size_hints.win_gravity);
|
window->size_hints.win_gravity);
|
||||||
}
|
}
|
||||||
else
|
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->desc);
|
||||||
window->size_hints.win_gravity = NorthWestGravity;
|
window->size_hints.win_gravity = NorthWestGravity;
|
||||||
window->size_hints.flags |= PWinGravity;
|
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);
|
invalidate_work_areas (window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5737,8 +5790,9 @@ meta_window_get_work_area (MetaWindow *window,
|
|||||||
area->width = window->screen->width - left_strut - right_strut;
|
area->width = window->screen->width - left_strut - right_strut;
|
||||||
area->height = window->screen->height - top_strut - bottom_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->desc, area->x, area->y, area->width, area->height);
|
"Window %s has work area %d,%d %d x %d\n",
|
||||||
|
window->desc, area->x, area->y, area->width, area->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
|
@ -104,7 +104,12 @@ meta_workspace_add_window (MetaWorkspace *workspace,
|
|||||||
|
|
||||||
meta_window_queue_calc_showing (window);
|
meta_window_queue_calc_showing (window);
|
||||||
if (window->has_struts)
|
if (window->has_struts)
|
||||||
meta_workspace_invalidate_work_area (workspace);
|
{
|
||||||
|
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
|
/* queue a move_resize since changing workspaces may change
|
||||||
* the relevant struts
|
* the relevant struts
|
||||||
@ -126,7 +131,12 @@ meta_workspace_remove_window (MetaWorkspace *workspace,
|
|||||||
meta_window_queue_calc_showing (window);
|
meta_window_queue_calc_showing (window);
|
||||||
|
|
||||||
if (window->has_struts)
|
if (window->has_struts)
|
||||||
meta_workspace_invalidate_work_area (workspace);
|
{
|
||||||
|
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
|
/* queue a move_resize since changing workspaces may change
|
||||||
* the relevant struts
|
* the relevant struts
|
||||||
@ -326,10 +336,16 @@ meta_workspace_invalidate_work_area (MetaWorkspace *workspace)
|
|||||||
GList *tmp;
|
GList *tmp;
|
||||||
|
|
||||||
if (workspace->work_area_invalid)
|
if (workspace->work_area_invalid)
|
||||||
return;
|
{
|
||||||
|
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,
|
||||||
meta_workspace_index (workspace));
|
"Invalidating work area for workspace %d\n",
|
||||||
|
meta_workspace_index (workspace));
|
||||||
|
|
||||||
workspace->work_area_invalid = TRUE;
|
workspace->work_area_invalid = TRUE;
|
||||||
|
|
||||||
@ -399,12 +415,13 @@ meta_workspace_get_work_area (MetaWorkspace *workspace,
|
|||||||
|
|
||||||
workspace->work_area_invalid = FALSE;
|
workspace->work_area_invalid = FALSE;
|
||||||
|
|
||||||
meta_verbose ("Workspace %d has work area %d,%d %d x %d\n",
|
meta_topic (META_DEBUG_WORKAREA,
|
||||||
meta_workspace_index (workspace),
|
"Computed work area for workspace %d: %d,%d %d x %d\n",
|
||||||
workspace->work_area.x,
|
meta_workspace_index (workspace),
|
||||||
workspace->work_area.y,
|
workspace->work_area.x,
|
||||||
workspace->work_area.width,
|
workspace->work_area.y,
|
||||||
workspace->work_area.height);
|
workspace->work_area.width,
|
||||||
|
workspace->work_area.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
*area = workspace->work_area;
|
*area = workspace->work_area;
|
||||||
|
Loading…
Reference in New Issue
Block a user