Hi everyone, I did not feal comfortable with any of the provided window placement methods. I would like the windows to appear where the mouse pointer is because this is the place my eyes are concentrating on.
Even ManualPlacement is one click too much. The patch allows you to put "Style * MousePlacement" into your .fvwm2rc and you will never have to turn your head again when a new window shows up. diff -ru fvwm-2.5.10/fvwm/fvwm.h fvwm-2.5.10-pepe/fvwm/fvwm.h --- fvwm-2.5.10/fvwm/fvwm.h 2004-02-16 14:45:59.000000000 +0100 +++ fvwm-2.5.10-pepe/fvwm/fvwm.h 2004-08-27 00:12:11.633285840 +0200 @@ -467,8 +467,9 @@ #define PLACE_TILECASCADE 0x5 #define PLACE_CASCADE_B 0x6 #define PLACE_MINOVERLAP 0x7 -#define PLACE_MASK 0x7 - unsigned placement_mode : 3; +#define PLACE_MOUSE 0x8 +#define PLACE_MASK 0xF + unsigned placement_mode : 4; unsigned ewmh_placement_mode : 2; /* see ewmh.h */ #define WS_CR_MOTION_METHOD_AUTO CR_MOTION_METHOD_AUTO #define WS_CR_MOTION_METHOD_USE_GRAV CR_MOTION_METHOD_USE_GRAV diff -ru fvwm-2.5.10/fvwm/placement.c fvwm-2.5.10-pepe/fvwm/placement.c --- fvwm-2.5.10/fvwm/placement.c 2004-03-17 17:57:50.000000000 +0100 +++ fvwm-2.5.10-pepe/fvwm/placement.c 2004-08-26 23:31:00.000000000 +0200 @@ -984,6 +984,13 @@ fw, sflags, &screen_g, &xl, &yt, pdeltax, pdeltay, 1); flags.is_smartly_placed = True; break; + case PLACE_MOUSE: + if (False != FQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild, + &attr_g->x, &attr_g->y, &JunkX, &JunkY, &JunkMask)) + { + break; + } + /* fall through to tilecascade placement */ case PLACE_TILECASCADE: flags.is_smartly_placed = SmartPlacement( fw, &screen_g, fw->frame_g.width, fw->frame_g.height, diff -ru fvwm-2.5.10/fvwm/style.c fvwm-2.5.10-pepe/fvwm/style.c --- fvwm-2.5.10/fvwm/style.c 2004-02-16 14:45:59.000000000 +0100 +++ fvwm-2.5.10-pepe/fvwm/style.c 2004-08-26 23:34:29.000000000 +0200 @@ -3087,6 +3087,12 @@ FPS_RAISE_UNFOCUSED_CLIENT_CLICK( S_FOCUS_POLICY(SCC(*ps)), 1); } + else if (StrEquals(token, "MousePlacement")) + { + ps->flags.placement_mode = PLACE_MOUSE; + ps->flag_mask.placement_mode = PLACE_MASK; + ps->change_mask.placement_mode = PLACE_MASK; + } else if (StrEquals(token, "MaxWindowSize")) { int val1; Regards, Christoph -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]