[Xfce4-commits] [xfce/xfwm4] 02/02: moveresize: Size increment depends on scale

noreply at xfce.org noreply at xfce.org
Sat May 4 12:38:11 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 0a41fec372cbb6e00ca56cb47ee9751ab8e9dd94
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Sat May 4 12:34:28 2019 +0200

    moveresize: Size increment depends on scale
    
    GTK would update the size increment to match the scale, so when using a
    scale 2x the size increment of all windows is set to 2 as well.
    
    As we use the size increment to decide whether to show the position and
    resize indicator window, we would end up showing it for all windows
    when scale is 2.
    
    Take the scale into account for size increment as well.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/moveresize.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/moveresize.c b/src/moveresize.c
index 30ec98e..e8196c0 100644
--- a/src/moveresize.c
+++ b/src/moveresize.c
@@ -1687,6 +1687,9 @@ clientResize (Client * c, int handle, XfwmEventButton *event)
     int w_orig, h_orig;
     Cursor cursor;
     gboolean g1, g2;
+#ifndef SHOW_POSITION
+    gint scale;
+#endif
 
     g_return_if_fail (c != NULL);
     TRACE ("client \"%s\" (0x%lx)", c->name, c->window);
@@ -1774,7 +1777,8 @@ clientResize (Client * c, int handle, XfwmEventButton *event)
 
     passdata.poswin = NULL;
 #ifndef SHOW_POSITION
-    if ((c->size->width_inc > 1) || (c->size->height_inc > 1))
+    scale = gdk_window_get_scale_factor (myScreenGetGdkWindow (screen_info));
+    if ((c->size->width_inc > scale) || (c->size->height_inc > scale))
 #endif /* SHOW_POSITION */
     {
         passdata.poswin = poswinCreate(screen_info->gscr);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list