mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
window-tracker: Emit 'tracked-windows-changed' on title changes
This means the screen share window view gets updated also when the title
of a window changes. This is important since it often changes shortly
after mapping, which would otherwise go unnoticed by
xdg-desktop-portal-gnome.
An example is launching Files and it showing up as 'Loading..', or
launching a terminal, and it not showing the proper title (current
directory), but some place holder that is never visible on the
application window.
Adding it to the window tracker instead of in introspect.js itself is
for convenience - there is no per window signal tracking there, and it
already listens to the signal emissions about changed windows.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2578>
(cherry picked from commit a1d650ce27)
This commit is contained in:
parent
ef58bd082b
commit
5db40c1ead
1 changed files with 11 additions and 0 deletions
|
|
@ -524,6 +524,15 @@ on_wm_class_changed (MetaWindow *window,
|
|||
tracked_window_changed (self, window);
|
||||
}
|
||||
|
||||
static void
|
||||
on_title_changed (MetaWindow *window,
|
||||
GParamSpec *pspec,
|
||||
gpointer user_data)
|
||||
{
|
||||
ShellWindowTracker *self = SHELL_WINDOW_TRACKER (user_data);
|
||||
tracked_window_changed (self, window);
|
||||
}
|
||||
|
||||
static void
|
||||
on_gtk_application_id_changed (MetaWindow *window,
|
||||
GParamSpec *pspec,
|
||||
|
|
@ -554,6 +563,7 @@ track_window (ShellWindowTracker *self,
|
|||
g_hash_table_insert (self->window_to_app, window, app);
|
||||
|
||||
g_signal_connect (window, "notify::wm-class", G_CALLBACK (on_wm_class_changed), self);
|
||||
g_signal_connect (window, "notify::title", G_CALLBACK (on_title_changed), self);
|
||||
g_signal_connect (window, "notify::gtk-application-id", G_CALLBACK (on_gtk_application_id_changed), self);
|
||||
g_signal_connect (window, "unmanaged", G_CALLBACK (on_window_unmanaged), self);
|
||||
|
||||
|
|
@ -586,6 +596,7 @@ disassociate_window (ShellWindowTracker *self,
|
|||
|
||||
_shell_app_remove_window (app, window);
|
||||
g_signal_handlers_disconnect_by_func (window, G_CALLBACK (on_wm_class_changed), self);
|
||||
g_signal_handlers_disconnect_by_func (window, G_CALLBACK (on_title_changed), self);
|
||||
g_signal_handlers_disconnect_by_func (window, G_CALLBACK (on_gtk_application_id_changed), self);
|
||||
g_signal_handlers_disconnect_by_func (window, G_CALLBACK (on_window_unmanaged), self);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue