Fix PiP positioning offset (#1507)

This commit is contained in:
Gran PC 2023-02-19 04:41:31 +01:00 committed by GitHub
parent 1ca12ac212
commit 2473752de3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,6 +79,12 @@ public class Gala.Plugins.PIP.Plugin : Gala.Plugin {
int point_x = x - (int)active.x;
int point_y = y - (int)active.y;
// Compensate for server-side window decorations
var input_rect = active.get_meta_window ().get_buffer_rect ();
var outer_rect = active.get_meta_window ().get_frame_rect ();
point_x -= outer_rect.x - input_rect.x;
point_y -= outer_rect.y - input_rect.y;
var rect = Graphene.Rect.alloc ();
rect.init (point_x, point_y, width, height);