mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 20:12:06 +00:00
core: Trace various window management actions
https://gitlab.gnome.org/GNOME/mutter/merge_requests/765
This commit is contained in:
parent
2f072af02b
commit
908203c735
@ -52,6 +52,7 @@
|
|||||||
#include "clutter/x11/clutter-x11.h"
|
#include "clutter/x11/clutter-x11.h"
|
||||||
#include "compositor/compositor-private.h"
|
#include "compositor/compositor-private.h"
|
||||||
#include "compositor/meta-compositor-x11.h"
|
#include "compositor/meta-compositor-x11.h"
|
||||||
|
#include "cogl/cogl-trace.h"
|
||||||
#include "core/bell.h"
|
#include "core/bell.h"
|
||||||
#include "core/boxes-private.h"
|
#include "core/boxes-private.h"
|
||||||
#include "core/display-private.h"
|
#include "core/display-private.h"
|
||||||
@ -1481,6 +1482,8 @@ void
|
|||||||
meta_display_notify_window_created (MetaDisplay *display,
|
meta_display_notify_window_created (MetaDisplay *display,
|
||||||
MetaWindow *window)
|
MetaWindow *window)
|
||||||
{
|
{
|
||||||
|
COGL_TRACE_BEGIN_SCOPED (MetaDisplayNotifyWindowCreated,
|
||||||
|
"Display (notify window created)");
|
||||||
g_signal_emit (display, display_signals[WINDOW_CREATED], 0, window);
|
g_signal_emit (display, display_signals[WINDOW_CREATED], 0, window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "core/stack.h"
|
#include "core/stack.h"
|
||||||
|
|
||||||
#include "backends/meta-logical-monitor.h"
|
#include "backends/meta-logical-monitor.h"
|
||||||
|
#include "cogl/cogl-trace.h"
|
||||||
#include "core/frame.h"
|
#include "core/frame.h"
|
||||||
#include "core/meta-workspace-manager-private.h"
|
#include "core/meta-workspace-manager-private.h"
|
||||||
#include "core/window-private.h"
|
#include "core/window-private.h"
|
||||||
@ -275,6 +276,9 @@ meta_stack_add (MetaStack *stack,
|
|||||||
{
|
{
|
||||||
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
||||||
|
|
||||||
|
COGL_TRACE_BEGIN_SCOPED (MetaStackAdd,
|
||||||
|
"Stack (add window)");
|
||||||
|
|
||||||
g_return_if_fail (meta_window_is_stackable (window));
|
g_return_if_fail (meta_window_is_stackable (window));
|
||||||
|
|
||||||
meta_topic (META_DEBUG_STACK, "Adding window %s to the stack\n", window->desc);
|
meta_topic (META_DEBUG_STACK, "Adding window %s to the stack\n", window->desc);
|
||||||
@ -305,6 +309,9 @@ meta_stack_remove (MetaStack *stack,
|
|||||||
{
|
{
|
||||||
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
MetaWorkspaceManager *workspace_manager = window->display->workspace_manager;
|
||||||
|
|
||||||
|
COGL_TRACE_BEGIN_SCOPED (MetaStackRemove,
|
||||||
|
"Stack (remove window)");
|
||||||
|
|
||||||
meta_topic (META_DEBUG_STACK, "Removing window %s from the stack\n", window->desc);
|
meta_topic (META_DEBUG_STACK, "Removing window %s from the stack\n", window->desc);
|
||||||
|
|
||||||
/* Set window to top position, so removing it will not leave gaps
|
/* Set window to top position, so removing it will not leave gaps
|
||||||
|
@ -67,6 +67,7 @@
|
|||||||
|
|
||||||
#include "backends/meta-backend-private.h"
|
#include "backends/meta-backend-private.h"
|
||||||
#include "backends/meta-logical-monitor.h"
|
#include "backends/meta-logical-monitor.h"
|
||||||
|
#include "cogl/cogl-trace.h"
|
||||||
#include "core/boxes-private.h"
|
#include "core/boxes-private.h"
|
||||||
#include "core/constraints.h"
|
#include "core/constraints.h"
|
||||||
#include "core/core.h"
|
#include "core/core.h"
|
||||||
@ -947,6 +948,15 @@ meta_window_calculate_main_logical_monitor (MetaWindow *window)
|
|||||||
&window_rect);
|
&window_rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_window_manage (MetaWindow *window)
|
||||||
|
{
|
||||||
|
COGL_TRACE_BEGIN_SCOPED (MetaWindowManage,
|
||||||
|
"Window (manage)");
|
||||||
|
|
||||||
|
META_WINDOW_GET_CLASS (window)->manage (window);
|
||||||
|
}
|
||||||
|
|
||||||
MetaWindow *
|
MetaWindow *
|
||||||
_meta_window_shared_new (MetaDisplay *display,
|
_meta_window_shared_new (MetaDisplay *display,
|
||||||
MetaWindowClientType client_type,
|
MetaWindowClientType client_type,
|
||||||
@ -959,6 +969,9 @@ _meta_window_shared_new (MetaDisplay *display,
|
|||||||
MetaWorkspaceManager *workspace_manager = display->workspace_manager;
|
MetaWorkspaceManager *workspace_manager = display->workspace_manager;
|
||||||
MetaWindow *window;
|
MetaWindow *window;
|
||||||
|
|
||||||
|
COGL_TRACE_BEGIN_SCOPED (MetaWindowSharedNew,
|
||||||
|
"Window (new)");
|
||||||
|
|
||||||
g_assert (attrs != NULL);
|
g_assert (attrs != NULL);
|
||||||
|
|
||||||
meta_verbose ("attrs->map_state = %d (%s)\n",
|
meta_verbose ("attrs->map_state = %d (%s)\n",
|
||||||
@ -1171,7 +1184,7 @@ _meta_window_shared_new (MetaDisplay *display,
|
|||||||
|
|
||||||
window->id = meta_display_generate_window_id (display);
|
window->id = meta_display_generate_window_id (display);
|
||||||
|
|
||||||
META_WINDOW_GET_CLASS (window)->manage (window);
|
meta_window_manage (window);
|
||||||
|
|
||||||
if (!window->override_redirect)
|
if (!window->override_redirect)
|
||||||
meta_window_update_icon_now (window, TRUE);
|
meta_window_update_icon_now (window, TRUE);
|
||||||
|
@ -40,6 +40,7 @@
|
|||||||
|
|
||||||
#include "backends/meta-backend-private.h"
|
#include "backends/meta-backend-private.h"
|
||||||
#include "backends/meta-logical-monitor.h"
|
#include "backends/meta-logical-monitor.h"
|
||||||
|
#include "cogl/cogl-trace.h"
|
||||||
#include "core/boxes-private.h"
|
#include "core/boxes-private.h"
|
||||||
#include "core/meta-workspace-manager-private.h"
|
#include "core/meta-workspace-manager-private.h"
|
||||||
#include "core/workspace-private.h"
|
#include "core/workspace-private.h"
|
||||||
@ -359,6 +360,9 @@ void
|
|||||||
meta_workspace_add_window (MetaWorkspace *workspace,
|
meta_workspace_add_window (MetaWorkspace *workspace,
|
||||||
MetaWindow *window)
|
MetaWindow *window)
|
||||||
{
|
{
|
||||||
|
COGL_TRACE_BEGIN_SCOPED (MetaWorkspaceAddWindow,
|
||||||
|
"Workspace (add window)");
|
||||||
|
|
||||||
g_assert (g_list_find (workspace->mru_list, window) == NULL);
|
g_assert (g_list_find (workspace->mru_list, window) == NULL);
|
||||||
workspace->mru_list = g_list_prepend (workspace->mru_list, window);
|
workspace->mru_list = g_list_prepend (workspace->mru_list, window);
|
||||||
|
|
||||||
@ -380,6 +384,9 @@ void
|
|||||||
meta_workspace_remove_window (MetaWorkspace *workspace,
|
meta_workspace_remove_window (MetaWorkspace *workspace,
|
||||||
MetaWindow *window)
|
MetaWindow *window)
|
||||||
{
|
{
|
||||||
|
COGL_TRACE_BEGIN_SCOPED (MetaWorkspaceRemoveWindow,
|
||||||
|
"Workspace (remove window)");
|
||||||
|
|
||||||
workspace->windows = g_list_remove (workspace->windows, window);
|
workspace->windows = g_list_remove (workspace->windows, window);
|
||||||
|
|
||||||
workspace->mru_list = g_list_remove (workspace->mru_list, window);
|
workspace->mru_list = g_list_remove (workspace->mru_list, window);
|
||||||
|
Loading…
Reference in New Issue
Block a user