Compare commits

...

5 Commits

Author SHA1 Message Date
d7f799bfaf core: Only trigger MetaWorkspace::window-* on toplevel window types
Popups and other override-redirect windows are irrelevant to all listeners
of MetaWorkspace::window-*. Ignoring those windows will namely result in
less activity on ShellWindowTracker, less ShellApp::windows-changed
signal emissions and less AppMenuButton updates.

Reduces gnome-shell CPU activity while typing on the Epiphany addressbar,
as the pop up animation there results in a number of xdg_popup being
created and destroyed.

https://gitlab.gnome.org/GNOME/mutter/issues/556
2019-07-24 23:40:21 +02:00
09bab98b1e 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
2019-07-24 21:06:50 +02:00
aee8bfce3f core: Only notify on MetaWindow::user-time on actual changes
If the timestamp is the same, it doesn't make sense to update and we
don't do so. So it doesn't make sense to notify on the property either.

https://gitlab.gnome.org/GNOME/mutter/issues/556
2019-07-24 13:55:53 +02:00
92868182c9 build: Bump API version automatically each development cycle
Since the API version was added, we've bumped it at some point late-ish in
the cycle when enough changes had accumulated (but way after the first ABI
break). Automate that process by computing the API version automatically
from the project version:
With this commit, the new API version will be 5 for the remaining 3.33.x
releases and all 3.34.x stable versions; 3.35.1 will then bump it to 6 and
so forth.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/696
2019-07-23 22:37:54 +02:00
08a3cbfc6c clutter: Force an allocation on clone source if necessary
Since commit 0eab73dc, actors are only allocated when they are actually
visible. While this generally works well, it breaks - because of *course*
it does - ClutterClones when the clone source (or any of its ancestors)
is hidden.

Force an allocation in that case to allow the clone's paint to work as
intended.

https://gitlab.gnome.org/GNOME/mutter/issues/683
2019-07-23 01:38:38 +00:00
4 changed files with 28 additions and 7 deletions

View File

@ -252,6 +252,13 @@ clutter_clone_allocate (ClutterActor *self,
if (priv->clone_source == NULL)
return;
/* ClutterActor delays allocating until the actor is shown; however
* we cannot paint it correctly in that case, so force an allocation.
*/
if (clutter_actor_get_parent (priv->clone_source) != NULL &&
!clutter_actor_has_allocation (priv->clone_source))
clutter_actor_allocate_preferred_size (priv->clone_source, flags);
#if 0
/* XXX - this is wrong: ClutterClone cannot clone unparented
* actors, as it will break all invariants

View File

@ -6,7 +6,12 @@ project('mutter', 'c',
mutter_plugin_api_version = '3'
libmutter_api_version = '4'
split_version = meson.project_version().split('.')
# Automatically increase API version each development cycle,
# starting with 0 in 3.23.x
api_version = (split_version[1].to_int() - 23) / 2
libmutter_api_version = '@0@'.format(api_version)
# generic version requirements
fribidi_req = '>= 1.0.0'

View File

@ -1296,8 +1296,7 @@ _meta_window_shared_new (MetaDisplay *display,
window->transient_for->on_all_workspaces_requested,
window->transient_for->workspace);
}
if (window->on_all_workspaces)
else if (window->on_all_workspaces)
{
meta_topic (META_DEBUG_PLACEMENT,
"Putting window %s on all workspaces\n",
@ -7101,9 +7100,9 @@ meta_window_set_user_time (MetaWindow *window,
if (meta_prefs_get_focus_new_windows () == G_DESKTOP_FOCUS_NEW_WINDOWS_STRICT &&
window_is_terminal (window))
window->display->allow_terminal_deactivation = FALSE;
}
g_object_notify_by_pspec (G_OBJECT (window), obj_props[PROP_USER_TIME]);
g_object_notify_by_pspec (G_OBJECT (window), obj_props[PROP_USER_TIME]);
}
}
/**

View File

@ -372,7 +372,12 @@ meta_workspace_add_window (MetaWorkspace *workspace,
meta_workspace_invalidate_work_area (workspace);
}
g_signal_emit (workspace, signals[WINDOW_ADDED], 0, window);
if (window->type == META_WINDOW_NORMAL ||
window->type == META_WINDOW_DIALOG ||
window->type == META_WINDOW_MODAL_DIALOG ||
window->type == META_WINDOW_UTILITY)
g_signal_emit (workspace, signals[WINDOW_ADDED], 0, window);
g_object_notify_by_pspec (G_OBJECT (workspace), obj_props[PROP_N_WINDOWS]);
}
@ -393,7 +398,12 @@ meta_workspace_remove_window (MetaWorkspace *workspace,
meta_workspace_invalidate_work_area (workspace);
}
g_signal_emit (workspace, signals[WINDOW_REMOVED], 0, window);
if (window->type == META_WINDOW_NORMAL ||
window->type == META_WINDOW_DIALOG ||
window->type == META_WINDOW_MODAL_DIALOG ||
window->type == META_WINDOW_UTILITY)
g_signal_emit (workspace, signals[WINDOW_REMOVED], 0, window);
g_object_notify (G_OBJECT (workspace), "n-windows");
}