[mutter/wip/carlosg/avoid-app-updates: 2/2] core: Avoid consecutive workspace changes in window construction
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/avoid-app-updates: 2/2] core: Avoid consecutive workspace changes in window construction
- Date: Wed, 24 Jul 2019 12:11:19 +0000 (UTC)
commit f3744d21c13eff3658d6c03800292f66dc8bb7a2
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Jul 19 17:48:42 2019 +0200
core: Avoid consecutive workspace changes in window construction
We first set the workspace to the transient-for parent's, and then
try to set on the current workspace. If both happen, we double the
work on adding/removing it from the workspace, and everything that
happens in result.
Should reduce some activity while typing on the Epiphany address
bar, as the animation results in a number of xdg_popup being created
and destroyed to handle the animation.
https://gitlab.gnome.org/GNOME/mutter/issues/556
src/core/window.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/src/core/window.c b/src/core/window.c
index 163bbb840..f53c11897 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -1286,7 +1286,15 @@ _meta_window_shared_new (MetaDisplay *display,
*/
if (!window->override_redirect && window->workspace == NULL)
{
- if (window->transient_for != NULL)
+ if (window->on_all_workspaces)
+ {
+ meta_topic (META_DEBUG_PLACEMENT,
+ "Putting window %s on all workspaces\n",
+ window->desc);
+
+ set_workspace_state (window, TRUE, NULL);
+ }
+ else if (window->transient_for != NULL)
{
meta_topic (META_DEBUG_PLACEMENT,
"Putting window %s on same workspace as parent %s\n",
@@ -1296,15 +1304,6 @@ _meta_window_shared_new (MetaDisplay *display,
window->transient_for->on_all_workspaces_requested,
window->transient_for->workspace);
}
-
- if (window->on_all_workspaces)
- {
- meta_topic (META_DEBUG_PLACEMENT,
- "Putting window %s on all workspaces\n",
- window->desc);
-
- set_workspace_state (window, TRUE, NULL);
- }
else
{
meta_topic (META_DEBUG_PLACEMENT,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]