🔧 Use new is_maximized method
This commit is contained in:
+8
-2
@@ -133,8 +133,14 @@ export var Shader = GObject.registerClass({
|
||||
// This is not necessarily symmetric, but I haven't figured out a way to
|
||||
// get the actual values...
|
||||
const padding = (actor.width - actor.meta_window.get_frame_rect().width) / 2;
|
||||
const isFullscreen = actor.meta_window.get_maximized() === Meta.MaximizeFlags.BOTH ||
|
||||
actor.meta_window.fullscreen;
|
||||
let isFullscreen = actor.meta_window.fullscreen;
|
||||
|
||||
// is_maximized has been added in GNOME 49.
|
||||
if ( actor.meta_window.is_maximized) {
|
||||
isFullscreen |= actor.meta_window.is_maximized();
|
||||
} else {
|
||||
isFullscreen |= actor.meta_window.get_maximized() === Meta.MaximizeFlags.BOTH;
|
||||
}
|
||||
|
||||
this.set_uniform_float(this._uPadding, 1, [padding]);
|
||||
this.set_uniform_float(this._uForOpening, 1, [forOpening]);
|
||||
|
||||
Reference in New Issue
Block a user