[libwnck/wip/muktupavels/tasklist-hidpi: 6/7] tasklist: scale down window geometry to application pixels
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libwnck/wip/muktupavels/tasklist-hidpi: 6/7] tasklist: scale down window geometry to application pixels
- Date: Mon, 10 May 2021 15:31:48 +0000 (UTC)
commit e595a6239b5f7a505223257e3a6165ecac897f75
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Thu May 6 22:54:31 2021 +0300
tasklist: scale down window geometry to application pixels
libwnck/tasklist.c | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
index 95f062a..36b4877 100644
--- a/libwnck/tasklist.c
+++ b/libwnck/tasklist.c
@@ -2417,11 +2417,19 @@ tasklist_include_window_impl (WnckTasklist *tasklist,
if (tasklist->priv->monitor != NULL)
{
+ int scale;
GdkDisplay *display;
GdkMonitor *monitor;
wnck_window_get_geometry (win, &x, &y, &w, &h);
+ scale = gtk_widget_get_scale_factor (GTK_WIDGET (tasklist));
+
+ x /= scale;
+ y /= scale;
+ w /= scale;
+ h /= scale;
+
/* Don't include the window if its center point is not on the same monitor */
display = gdk_display_get_default ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]