kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=305d0ef93c50857d684d9bcab020658b0f6897c3

commit 305d0ef93c50857d684d9bcab020658b0f6897c3
Author: Kim Woelders <k...@woelders.dk>
Date:   Fri Oct 27 18:26:37 2017 +0200

    Fix focus after slide-in.
---
 src/slide.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/src/slide.c b/src/slide.c
index b0495a13..a12514f5 100644
--- a/src/slide.c
+++ b/src/slide.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2013-2014 Kim Woelders
+ * Copyright (C) 2013-2017 Kim Woelders
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to
@@ -83,7 +83,7 @@ typedef struct {
    int                 fx, fy, fw, fh;
    int                 tx, ty, tw, th;
    int                 mode;
-   char                warp;
+   int                 flags;
    char                firstlast;
 } ewin_slide_params;
 
@@ -113,11 +113,15 @@ _EwinSlideSizeTo(EObj * eo, int remaining, void *state)
           DrawEwinShape(ewin, p->mode, p->tx, p->ty,
                         ewin->client.w, ewin->client.h, 2, 0);
        EwinMove(ewin, p->tx, p->ty, MRF_NOCHECK_ONSCREEN | MRF_KEEP_MAXIMIZED);
-       if (p->warp)
+       if (p->flags & SLIDE_WARP)
          {
             EwinWarpTo(ewin, 1);
             FocusToEWin(ewin, FOCUS_SET);
          }
+       else if (p->flags & SLIDE_FOCUS)
+         {
+            FocusToEWin(ewin, FOCUS_EWIN_NEW);
+         }
      }
 
    return 0;
@@ -151,6 +155,8 @@ EwinSlideSizeTo(EWin * ewin, int tx, int ty, int tw, int th,
          }
        return NULL;
      }
+   if (!warp)
+      flags &= ~SLIDE_WARP;
 
    ewin->state.sliding = 1;
 
@@ -164,7 +170,7 @@ EwinSlideSizeTo(EWin * ewin, int tx, int ty, int tw, int th,
    p.th = th;
    p.mode = DrawEwinShapeNeedsGrab(mode) ? MR_OPAQUE : mode;
    p.firstlast = 0;
-   p.warp = warp;
+   p.flags = flags;
 
    if (speed < SPEED_MIN)
       speed = SPEED_MIN;

-- 


Reply via email to