[Xfce4-commits] [xfce/xfwm4] 01/02: poswin: Use our own GdkWindow for scale
noreply at xfce.org
noreply at xfce.org
Sat May 4 12:38:10 CEST 2019
This is an automated email from the git hooks/post-receive script.
o l i v i e r p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository xfce/xfwm4.
commit 55da6ec536d328ab5e9a17e1aec64f675bf770c8
Author: Olivier Fourdan <fourdan at xfce.org>
Date: Sat May 4 12:33:13 2019 +0200
poswin: Use our own GdkWindow for scale
The poswin window may become unrealized, use our own instead.
Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
src/poswin.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/poswin.c b/src/poswin.c
index f262e24..bf80abb 100644
--- a/src/poswin.c
+++ b/src/poswin.c
@@ -112,7 +112,8 @@ poswinSetPosition (Poswin * poswin, Client *c)
gchar label[32];
gint x, y, px, py, pw, ph;
gint wsize, hsize;
- guint scale;
+ GdkWindow *gdk_window;
+ gint scale;
g_return_if_fail (poswin != NULL);
g_return_if_fail (c != NULL);
@@ -142,7 +143,7 @@ poswinSetPosition (Poswin * poswin, Client *c)
gtk_label_set_text (GTK_LABEL (poswin->label), label);
gtk_widget_queue_draw (GTK_WIDGET(poswin));
gtk_window_get_size (GTK_WINDOW (poswin), &pw, &ph);
- scale = gdk_window_get_scale_factor (gtk_widget_get_window (GTK_WIDGET (poswin)));
+ scale = gdk_window_get_scale_factor (myScreenGetGdkWindow (c->screen_info));
px = (x + (frameWidth (c) - pw * scale) / 2) / scale;
py = (y + (frameHeight (c) - ph * scale) / 2) / scale;
gtk_window_move (GTK_WINDOW (poswin), px, py);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list