PIP: Fix log spam (#1521)

This commit is contained in:
Leo 2023-02-12 22:16:18 +09:00 committed by GitHub
parent c69171b5c6
commit 37c3e8810b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 27 deletions

View File

@ -21,6 +21,7 @@
</description>
<issues>
<issue url="https://github.com/elementary/gala/issues/24">Workspace switching shortcuts don't work in Multitasking View</issue>
<issue url="https://github.com/elementary/gala/issues/1478">PiP: Log spam on elementary OS 7.0</issue>
</issues>
</release>

View File

@ -1,19 +1,8 @@
//
// Copyright (C) 2017 Adam Bieńkowski
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
/*
* Copyright 2017 Adam Bieńkowski
* Copyright 2023 elementary, Inc. <https://elementary.io>
* SPDX-License-Identifier: GPL-3.0-or-later
*/
public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
private int button_size;
@ -182,7 +171,7 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
resize_button.set_easing_duration (300);
resize_button.opacity = 255;
resize_button.set_easing_duration (0);
return true;
return Gdk.EVENT_PROPAGATE;
}
public override bool leave_event (Clutter.CrossingEvent event) {
@ -191,7 +180,7 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
resize_button.set_easing_duration (300);
resize_button.opacity = 0;
resize_button.set_easing_duration (0);
return true;
return Gdk.EVENT_PROPAGATE;
}
public void set_container_clip (Graphene.Rect? container_clip) {
@ -212,7 +201,7 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
private bool on_resize_button_press (Clutter.ButtonEvent event) {
if (resizing || event.button != 1) {
return false;
return Gdk.EVENT_STOP;
}
resizing = true;
@ -230,12 +219,12 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
resize_button.get_stage ().captured_event.connect (on_resize_event);
#endif
return true;
return Gdk.EVENT_PROPAGATE;
}
private bool on_resize_event (Clutter.Event event) {
if (!resizing) {
return false;
return Gdk.EVENT_STOP;
}
switch (event.get_type ()) {
@ -268,17 +257,17 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
break;
case Clutter.EventType.LEAVE:
case Clutter.EventType.ENTER:
return true;
return Gdk.EVENT_PROPAGATE;
default:
break;
}
return false;
return Gdk.EVENT_STOP;
}
private bool stop_resizing () {
private void stop_resizing () {
if (!resizing) {
return false;
return;
}
#if HAS_MUTTER42
@ -295,8 +284,6 @@ public class Gala.Plugins.PIP.PopupWindow : Clutter.Actor {
resizing = false;
update_screen_position ();
return true;
}
private void on_allocation_changed () {