On Thu, Sep 11, 2014 at 11:44:30PM +0100, Dominik Vogt wrote:
> I'll push a partial fix for this shortly, but you should take a
> look at it and implement the missing bit.

Would you mind testing the following?  Thie seems to work OK for me, but
just want to check:

diff --git a/mvwm/focus.c b/mvwm/focus.c
index 3c9f093..5ff2859 100644
--- a/mvwm/focus.c
+++ b/mvwm/focus.c
@@ -1212,22 +1212,11 @@ void CMD_WarpToWindow(F_CMD_ARGS)
 {
        int val1_unit, val2_unit, n;
        int val1, val2;
-       MvwmWindow * const fw = exc->w.fw;
        struct monitor *m;
        int do_raise;
        char *next;
        char *token;
 
-       if (fw != NULL)
-       {
-               m = fw->m;
-       }
-       else
-       {
-               /*!!!used on an unmanaged window, we need to determine that
-                * window's monitor here instead of using the default */
-               m = monitor_get_current();
-       }
        next = GetNextToken(action, &token);
        if (StrEquals(token, "!raise"))
        {
@@ -1277,6 +1266,16 @@ void CMD_WarpToWindow(F_CMD_ARGS)
                        {
                                return;
                        }
+
+                       /* TA:  2014-09-11:  This window is unmanaged.  Since
+                        * mvwm won't have created a window for this, fw will be
+                        * NULL and hence no monitor information will be
+                        * present.  Since we already know the coordinates of
+                        * the unmanaged window, use those in determining the
+                        * monitor to use.
+                        */
+                       m = monitor_by_xy(wx, wy);
+
                        if (val1_unit != m->coord.w)
                        {
                                x = val1;

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)

Reply via email to