CVS olicha: * Fixed IconMan geometries
CVSROOT:/home/cvs/fvwm Module name:fvwm Changes by: olicha 01/09/23 02:03:58 Modified files: modules: ChangeLog modules/FvwmIconMan: x.c Log message: * Fixed IconMan geometries -- 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]
Re: FvwmBanner shapes
On Fri, Sep 21, 2001 at 03:44:37PM -0400, Dan Espen wrote: Dominik Vogt fvwm-workers@fvwm.org writes: On Tue, Sep 18, 2001 at 08:48:31AM -0400, Dan Espen wrote: I think the 2.4.3 release should be built soon, but I'll stay out of this discussion now. Dan, could you again decide when the release should be built? This weekend seems like a good time. It seems good (now) for me too. One may check my IconMan geometry fix, but it should be ok in the average ... Regards, Olivier -- 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]
FVWM2 Xinerama patches
Hello - I have a suggestion for Xinerama, but I don't know enough about automake to provide a patch: we could use configure options telling fvwm2 where to look for the library and include files. Also related to Xinerama, here are better versions of some patches I posted before (now everything properly goes through the FScreen layer to calculate Xinerama screen coordinates.) We're upgrading from isolated multi-head displays to Xinerama, and with the following patches, we were able to keep the same geometry resources we use on separate DISPLAY's (:0.0, :0.1, :0.2, :0.N) and translate them to '*wmscreen: N' resources. FVWM2 looks very stable so far on our Linux/Solaris/HP-UX mix. Thanks a lot to all who worked on this. XINERAMA PATCH 1: Adds a new function to FScreen to convert global coords. XINERAMA PATCH 2: Adds a check for a *wmscreen resource. XINERAMA PATCH 3: Uses function in PATCH 1 to make USPosition windows obey StartsOnScreen Style/*wmscreen resource. XINERAMA PATCH 4: Uses PATCH 1 to cause window positions displayed while moving a window to be screen-relative whenever possible. I might not be good to put any of this in the 2.4.3 release, but I hope it is useful to someone. #4 probably needs a config file option associated with it to turn it on/off. Adding @N to the string it displays would make it nicer too. Please let me know if there's anything else needed to make these patches generally useful. Be seeing you, - Sidik -- 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]
FVWM2 Xinerama patch 1
diff -ru fvwm-snap-20010916/libs/FScreen.c fvwm-2.5.0-cfht/libs/FScreen.c --- fvwm-snap-20010916/libs/FScreen.c Sat Sep 15 01:00:05 2001 +++ fvwm-2.5.0-cfht/libs/FScreen.c Tue Sep 18 20:41:10 2001 @@ -528,6 +528,27 @@ return 0; } +/* Returns the screen of which (global_x, global_y) is a pixel, and + * returns the screen-relative (x,y) if x and y are not NULL. + */ +int FScreenGetScreenXY( + int global_x, int global_y, int *x, int *y) +{ + int screen = FindScreenOfXY(global_x, global_y); + + if (screen == 0) + { +if (x) *x = global_x; +if (y) *y = global_y; + } + else if (screen 0) + { +if (x) *x = global_x - screens[screen].x_org; +if (y) *y = global_y - screens[screen].y_org; + } + return screen; +} + /* Returns the specified screens geometry rectangle. screen can be a screen * number or any of the values FSCREEN_GLOBAL, FSCREEN_CURRENT, * FSCREEN_PRIMARY or FSCREEN_XYPOS. The arg union only has a meaning for diff -ru fvwm-snap-20010916/libs/FScreen.h fvwm-2.5.0-cfht/libs/FScreen.h --- fvwm-snap-20010916/libs/FScreen.h Fri Sep 14 01:00:08 2001 +++ fvwm-2.5.0-cfht/libs/FScreen.h Tue Sep 18 20:20:24 2001 @@ -44,6 +44,8 @@ void FScreenSetPrimaryScreen(int scr); /* Screen info */ +int FScreenGetScreenXY( + int global_x, int global_y, int *x, int *y); Bool FScreenGetScrRect( fscreen_scr_arg *arg, int screen, int *x, int *y, int *w, int *h); void FScreenGetResistanceRect( -- 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]
FVWM2 Xinerama patch 2
diff -ru fvwm-snap-20010916/fvwm/fvwm2.1 fvwm-2.5.0-cfht/fvwm/fvwm2.1 --- fvwm-snap-20010916/fvwm/fvwm2.1 Sun Sep 16 01:00:02 2001 +++ fvwm-2.5.0-cfht/fvwm/fvwm2.1Sat Sep 15 16:54:45 2001 @@ -5239,7 +5239,7 @@ .IR StartsOnDesk . For those standard Xt programs which understand this usage, the starting desk/page can also be specified via a resource (e.g., --xrm 'Fvwm.Page: 1 0 2'). +-xrm '*page: 1 0 2'). .I StartsOnPage in conjunction with .I SkipMapping @@ -5254,19 +5254,23 @@ A new window is placed on the specified Xinerama screen. The default is to place windows on the screen that contains the mouse pointer at the time the window is created. - -.I StartsOnPage -functions exactly like -.IR StartsOnDesk . +However, those windows which are not placed by FVWM (i.e., those with +a USPosition hint from a user specified geometry) are normally placed +in a position relative to the global screen. The +.I StartsOnScreen +style is also useful to cause these windows to be placed relative +to a specific Xinerama screen. For example: +.EX +Style * StartsOnScreen c +.EE +Would cause all windows, including those with their own geometry +to be placed relative to the current Xinerama screen rather than +the global screen. For those standard Xt programs which understand this usage, the starting desk/page can also be specified via a resource (e.g., --xrm 'Fvwm.Page: 1 0 2'). -.I StartsOnPage -in conjunction with -.I SkipMapping -is a useful technique when you want to start an app on some other -page and continue with what you were doing, rather than waiting -for it to appear. +-xrm '*wmscreen: c'). ('wmscreen' was chosen +because some applications already use '.screen' for other +purposes.) .I StartsOnPageIncludesTransients causes the diff -ru fvwm-snap-20010916/fvwm/add_window.c fvwm-2.5.0-cfht/fvwm/add_window.c --- fvwm-snap-20010916/fvwm/add_window.cSun Sep 16 01:00:02 2001 +++ fvwm-2.5.0-cfht/fvwm/add_window.c Sat Sep 15 20:38:13 2001 @@ -56,6 +56,7 @@ #include stdio.h #include libs/fvwmlib.h +#include libs/FScreen.h #include fvwm.h #include externs.h #include cursor.h @@ -587,6 +588,12 @@ SSET_START_DESK(*pstyle, SGET_START_DESK(*pstyle) + 1); } pstyle-flags.use_start_on_desk = 1; +} +if (GetResourceString(db, wmscreen, client_argv[0], rm_value) + rm_value.size != 0) +{ + SSET_START_SCREEN(*pstyle, FScreenGetScreenArgument(rm_value.addr, 'c')); + pstyle-flags.use_start_on_screen = 1; } if (GetResourceString(db, page, client_argv[0], rm_value) rm_value.size != 0) -- 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]
FVWM2 Xinerama patch 3
diff -ru fvwm-snap-20010916/fvwm/placement.c fvwm-2.5.0-cfht/fvwm/placement.c --- fvwm-snap-20010916/fvwm/placement.c Fri Sep 7 04:37:27 2001 +++ fvwm-2.5.0-cfht/fvwm/placement.cTue Sep 18 20:27:14 2001 @@ -922,6 +922,31 @@ /* the USPosition was specified, or the window is a transient, * or it starts iconic so place it automatically */ +if (SUSE_START_ON_SCREEN(sflags) flags.do_honor_starts_on_screen) +{ + int global_x = tmp_win-attr.x; + int global_y = tmp_win-attr.y; + + /* + * If StartsOnScreen has been given for a window, translate its + * USPosition so that it is relative to that particular screen. + * If we don't do this, then a geometry would completely cancel + * the effect of the StartsOnScreen style. + * + * So there are two ways to get a window to pop up on a particular + * Xinerama screen. 1: The intuitive way giving a geometry hint + * relative to the desired screen's 0,0 along with the appropriate + * StartsOnScreen style (or *wmscreen resource), or 2: Do NOT + * specify a Xinerama screen (or specify it to be 'g') and give + * the geometry hint in terms of the global screen. + */ + FScreenGetScreenXY(global_x, global_y, +tmp_win-attr.x, tmp_win-attr.y); + + tmp_win-attr.x += screen_g.x; /* Back to global coordinates, but */ + tmp_win-attr.y += screen_g.y; /* forced to the right screen now. */ +} + /* * If SkipMapping, and other legalities are observed, adjust for * StartsOnPage. -- 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]
FVWM2 Xinerama patch 4
diff -ru fvwm-snap-20010916/fvwm/move_resize.c fvwm-2.5.0-cfht/fvwm/move_resize.c --- fvwm-snap-20010916/fvwm/move_resize.c Fri Sep 7 04:37:27 2001 +++ fvwm-2.5.0-cfht/fvwm/move_resize.c Tue Sep 18 20:27:18 2001 @@ -457,11 +457,17 @@ { char str [100]; int offset; + int screen_x, screen_y; + /* + * Translate x,y into local screen coordinates, in case Xinerama is used. + */ + FScreenGetScreenXY(x, y, screen_x, screen_y); + if (Scr.gs.do_hide_position_window) return; position_geometry_window(eventp); - (void) sprintf (str, GEOMETRY_WINDOW_POS_STRING, x, y); + (void) sprintf (str, GEOMETRY_WINDOW_POS_STRING, screen_x, screen_y); if (Init) { XClearWindow(dpy, Scr.SizeWindow); -- 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]
FVWM2 cleanup patch
We've been using the fvwm-1.24r for years with the following patch to prevent clean-up problems when users log out. The problem was sometimes users start things from their window manager menus which are not intended to be daemons, but also do not launch any windows, or the windows do not respond to the right signals to clean up when fvwm2 exits. At the very least, we frequently were left with bogus processes still running, and in the worst cases, the X greeter would not restart. Maybe someone else understands this better, but simply having the window manager try to clean up all its child processes when it exits (not restarts) has worked quite well: diff -ru fvwm-snap-20010916/fvwm/fvwm.c fvwm-2.5.0-cfht/fvwm/fvwm.c --- fvwm-snap-20010916/fvwm/fvwm.c Fri Sep 14 01:00:07 2001 +++ fvwm-2.5.0-cfht/fvwm/fvwm.c Tue Sep 18 19:55:12 2001 @@ -1675,6 +1675,17 @@ */ ClosePipes(); + /* Any processes which FVWM started should also exit now, if they are + * still running in the same process group. Any program that wants to + * continue running after the user's window manager session is gone + * should create its own process group. + */ + signal(SIGHUP, SIG_IGN); + signal(SIGTERM, SIG_IGN); + kill(0, SIGHUP); + sleep(4); + kill(0, SIGTERM); + exit(0); } -- 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]