mirror of
https://github.com/elementary/gala.git
synced 2024-10-05 19:27:25 +03:00
Merge branch 'master' into tintou/background-no-path
This commit is contained in:
commit
186d4f4f38
@ -25,6 +25,18 @@
|
||||
<update_contact>contact_at_elementary.io</update_contact>
|
||||
|
||||
<releases>
|
||||
<release version="7.1.1" date="2023-07-04" urgency="medium">
|
||||
<description>
|
||||
<p>Improvements:</p>
|
||||
<ul>
|
||||
<li>Updated translations</li>
|
||||
</ul>
|
||||
</description>
|
||||
<issues>
|
||||
<issue url="https://github.com/elementary/gala/issues/1700">PiP doesn't become visible by changing workspaces</issue>
|
||||
</issues>
|
||||
</release>
|
||||
|
||||
<release version="7.1.0" date="2023-06-26" urgency="medium">
|
||||
<description>
|
||||
<p>Improvements:</p>
|
||||
|
@ -71,14 +71,12 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
|
||||
set_pivot_point (0.5f, 0.5f);
|
||||
set_easing_mode (Clutter.AnimationMode.EASE_IN_QUAD);
|
||||
|
||||
var window = window_actor.get_meta_window ();
|
||||
unowned var window = window_actor.get_meta_window ();
|
||||
window.unmanaged.connect (on_close_click_clicked);
|
||||
window.notify["appears-focused"].connect (() => {
|
||||
Idle.add (() => {
|
||||
update_window_focus ();
|
||||
return Source.REMOVE;
|
||||
});
|
||||
});
|
||||
window.notify["appears-focused"].connect (update_window_focus);
|
||||
|
||||
unowned var workspace_manager = wm.get_display ().get_workspace_manager ();
|
||||
workspace_manager.active_workspace_changed.connect (update_window_focus);
|
||||
|
||||
clone = new Clutter.Clone (window_actor);
|
||||
|
||||
@ -318,8 +316,11 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
|
||||
return;
|
||||
}
|
||||
|
||||
var window = window_actor.get_meta_window ();
|
||||
if (window.appears_focused) {
|
||||
unowned var workspace_manager = wm.get_display ().get_workspace_manager ();
|
||||
unowned var active_workspace = workspace_manager.get_active_workspace ();
|
||||
unowned var window = window_actor.get_meta_window ();
|
||||
|
||||
if (window.appears_focused && window.located_on_workspace (active_workspace)) {
|
||||
hide ();
|
||||
} else if (!window_actor.is_destroyed ()) {
|
||||
show ();
|
||||
|
@ -795,21 +795,35 @@ namespace Gala {
|
||||
return (proxy in modal_stack);
|
||||
}
|
||||
|
||||
private HashTable<Meta.Window, unowned Meta.WindowActor> dim_table =
|
||||
new HashTable<Meta.Window, unowned Meta.WindowActor> (GLib.direct_hash, GLib.direct_equal);
|
||||
|
||||
private void dim_parent_window (Meta.Window window, bool dim) {
|
||||
unowned var ancestor = window.get_transient_for ();
|
||||
if (ancestor != null && ancestor != window) {
|
||||
unowned var win = (Meta.WindowActor) ancestor.get_compositor_private ();
|
||||
unowned var transient = window.get_transient_for ();
|
||||
if (transient != null && transient != window) {
|
||||
unowned var transient_actor = (Meta.WindowActor) transient.get_compositor_private ();
|
||||
// Can't rely on win.has_effects since other effects could be applied
|
||||
if (dim) {
|
||||
if (window.window_type == Meta.WindowType.MODAL_DIALOG) {
|
||||
var dark_effect = new Clutter.BrightnessContrastEffect ();
|
||||
dark_effect.set_brightness (-0.4f);
|
||||
transient_actor.add_effect_with_name ("dim-parent", dark_effect);
|
||||
|
||||
win.add_effect_with_name ("dim-parent", dark_effect);
|
||||
dim_table[window] = transient_actor;
|
||||
}
|
||||
} else if (win.get_effect ("dim-parent") != null) {
|
||||
win.remove_effect_by_name ("dim-parent");
|
||||
} else if (transient_actor.get_effect ("dim-parent") != null) {
|
||||
transient_actor.remove_effect_by_name ("dim-parent");
|
||||
dim_table.remove (window);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// fall back to dim_data (see https://github.com/elementary/gala/issues/1331)
|
||||
var transient_actor = dim_table.take (window);
|
||||
if (transient_actor != null) {
|
||||
transient_actor.remove_effect_by_name ("dim-parent");
|
||||
debug ("Removed dim using dim_data");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user