Enlightenment CVS committal

Author  : kwo
Project : e16
Module  : e

Dir     : e16/e/src


Modified Files:
        ewins.c ewins.h focus.c warp.c zoom.c 


Log Message:
Introduce EwinWarpTo().

===================================================================
RCS file: /cvs/e/e16/e/src/ewins.c,v
retrieving revision 1.213
retrieving revision 1.214
diff -u -3 -r1.213 -r1.214
--- ewins.c     19 Jan 2008 13:38:51 -0000      1.213
+++ ewins.c     19 Jan 2008 13:44:54 -0000      1.214
@@ -1806,6 +1806,19 @@
    EwinMove(ewin, xn, yn);
 }
 
+void
+EwinWarpTo(EWin * ewin)
+{
+   if (ewin == Mode.mouse_over_ewin)
+      return;
+
+   if (ewin->state.iconified)
+      return;
+
+   EXWarpPointer(EoGetXwin(ewin), EoGetW(ewin) / 2, EoGetH(ewin) / 2);
+   Mode.mouse_over_ewin = ewin;
+}
+
 typedef union
 {
    unsigned int        all;
===================================================================
RCS file: /cvs/e/e16/e/src/ewins.h,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -3 -r1.79 -r1.80
--- ewins.h     5 Sep 2007 19:12:55 -0000       1.79
+++ ewins.h     19 Jan 2008 13:44:54 -0000      1.80
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various 
contributors
- * Copyright (C) 2004-2007 Kim Woelders
+ * Copyright (C) 2004-2008 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
@@ -389,6 +389,8 @@
 void                EwinUpdateOpacity(EWin * ewin);
 
 void                EwinChange(EWin * ewin, unsigned int flag);
+
+void                EwinWarpTo(EWin * ewin);
 
 EWin              **EwinListTransients(const EWin * ewin, int *num, int group);
 EWin              **EwinListTransientFor(const EWin * ewin, int *num);
===================================================================
RCS file: /cvs/e/e16/e/src/focus.c,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -3 -r1.170 -r1.171
--- focus.c     19 Jan 2008 13:38:51 -0000      1.170
+++ focus.c     19 Jan 2008 13:44:54 -0000      1.171
@@ -399,11 +399,8 @@
 
    if (Conf.focus.warp_always)
       do_warp = 1;
-   if (do_warp && ewin != Mode.mouse_over_ewin)
-     {
-       EXWarpPointer(EoGetXwin(ewin), EoGetW(ewin) / 2, EoGetH(ewin) / 2);
-       Mode.mouse_over_ewin = ewin;
-     }
+   if (do_warp)
+      EwinWarpTo(ewin);
 
    RemoveTimerEvent("REVERSE_FOCUS_TIMEOUT");
    switch (why)
===================================================================
RCS file: /cvs/e/e16/e/src/warp.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -3 -r1.108 -r1.109
--- warp.c      29 Sep 2007 19:13:21 -0000      1.108
+++ warp.c      19 Jan 2008 13:44:54 -0000      1.109
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various 
contributors
- * Copyright (C) 2004-2007 Kim Woelders
+ * Copyright (C) 2004-2008 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
@@ -354,11 +354,7 @@
    if (Conf.focus.raise_on_next)
       EwinRaise(ewin);
    if (Conf.focus.warp_on_next)
-      if (ewin != Mode.mouse_over_ewin && !ewin->state.iconified)
-       {
-          EXWarpPointer(EoGetXwin(ewin), EoGetW(ewin) / 2, EoGetH(ewin) / 2);
-          Mode.mouse_over_ewin = ewin;
-       }
+      EwinWarpTo(ewin);
    if (Conf.warplist.warpfocused)
       FocusToEWin(ewin, FOCUS_SET);
 }
@@ -402,11 +398,7 @@
 
    EwinOpActivate(ewin, OPSRC_USER, Conf.warplist.raise_on_select);
    if (Conf.warplist.warp_on_select)
-      if (ewin != Mode.mouse_over_ewin)
-       {
-          EXWarpPointer(EoGetXwin(ewin), EoGetW(ewin) / 2, EoGetH(ewin) / 2);
-          Mode.mouse_over_ewin = ewin;
-       }
+      EwinWarpTo(ewin);
 }
 
 static void
===================================================================
RCS file: /cvs/e/e16/e/src/zoom.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -3 -r1.41 -r1.42
--- zoom.c      25 May 2007 22:40:47 -0000      1.41
+++ zoom.c      19 Jan 2008 13:44:54 -0000      1.42
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various 
contributors
- * Copyright (C) 2004-2007 Kim Woelders
+ * Copyright (C) 2004-2008 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
@@ -218,8 +218,7 @@
             if (zoom_mask_4)
                EDestroyWindow(zoom_mask_4);
             SwitchRes(0, 0, 0, 0, 0);
-            EXWarpPointer(EwinGetClientXwin(ewin), ewin->client.w / 2,
-                          ewin->client.h / 2);
+            EwinWarpTo(ewin);
             ESync();
             zoom_last_ewin = NULL;
          }
@@ -250,8 +249,7 @@
        EwinBorderGetSize(ewin, &bl, &br, &bt, &bb);
        EwinMove(ewin, -bl + x1, -bt + y1);
        FocusToEWin(ewin, FOCUS_SET);
-       EXWarpPointer(EwinGetClientXwin(ewin), ewin->client.w / 2,
-                     ewin->client.h / 2);
+       EwinWarpTo(ewin);
 #if 0                          /* Doesn't work as intended */
        XGrabPointer(disp, EwinGetClientXwin(ewin), True,
                     ButtonPressMask | ButtonReleaseMask |



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to