mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-12-04 04:11:38 +00:00
Safer way to add fixes to Clutter.Actor prototype (#327)
This commit is contained in:
+8
-2
@@ -174,16 +174,22 @@ if (version[0] >= 3 && version[1] < 34) {
|
||||
}
|
||||
|
||||
// Polyfill
|
||||
if (!Clutter.Actor.prototype.raise_top) {
|
||||
if (!Clutter.Actor.prototype.raise) {
|
||||
Clutter.Actor.prototype.raise = function raise(above) {
|
||||
const parent = this.get_parent();
|
||||
if (!parent)
|
||||
return;
|
||||
parent.set_child_above_sibling(this, above);
|
||||
}
|
||||
Clutter.Actor.prototype.raise_top = function raise_top() {
|
||||
}
|
||||
|
||||
if (!Clutter.Actor.prototype.raise_top) {
|
||||
Clutter.Actor.prototype.raise_top = function raise_top() {
|
||||
this.raise(null);
|
||||
}
|
||||
}
|
||||
|
||||
if (!Clutter.Actor.prototype.reparent) {
|
||||
Clutter.Actor.prototype.reparent = function reparent(newParent) {
|
||||
const parent = this.get_parent();
|
||||
if (parent) {
|
||||
|
||||
Reference in New Issue
Block a user