1999-12-17 16:31:05 Shenghuo ZHU * decor.c (s_set_window_decor_x): Use decor reference. * add_window.c (AddWindow): Ditto. * add_window.c (DestroyScwmWindow): Set Scr.Hilite. Tue Dec 7 16:26:37 1999 Greg J. Badros * events.c (s_handle_pending_events): Do not dispatch events when still capturing the windows. Avoids possible deadlocks. Tue Dec 7 16:18:00 1999 Greg J. Badros * callbacks.c (scwm_safe_call1): Only warn when using call-interactively to invoke *named* procedures that do not have interactive specifications. * placement.c (PlaceWindow): Do not use a placement procedure when doing the initial capture of windows. Avoids a deadlock. Tue Dec 7 14:56:20 1999 Greg J. Badros * callbacks.c: Fix arg mismatch caught by scwmdoc. Tue Dec 7 11:16:48 1999 Greg J. Badros * events.c: Use FRAME_[XY]_VP(psw) in getting arguments for x_motionnotify_hook instead of using psw->frame_x. This makes nonant-selection work even when not at the (0,0) viewport. Tue Dec 7 08:27:51 1999 Greg J. Badros * events.c: pass 2nd arg to call_interactively. * callbacks.h, callbacks.c: Added 2nd arg (debug) to call-interactively. Sun Dec 5 17:31:48 1999 Greg J. Badros * add_window.c, events.c, image.c: Fix some unescaped quotes in SCWM_HOOK macro docstrings. Sun Dec 5 16:32:55 1999 Greg J. Badros * callbacks.c (s_call_interactively): Fix dumb bug of trying to free a literal string. Sun Dec 5 14:50:02 1999 Greg J. Badros * window.h, window.c: Added ScmArgsFromInteractiveSpec and document it (not very functional yet, but the infrastructure and some simple specifications are in place now). * callbacks.c: Make `call-interactively' use ScmArgsFromInteractiveSpec to build the argument list. Sun Dec 5 12:53:31 1999 Greg J. Badros * window.c, resize.c, miscprocs.c: Added interactive specifications to SCWM_IPROC macros. * scwm.h, scwm.c: Update scwm_make_igsubr to take the szInteractiveSpecification argument. * scwm-snarf.h (SCWM_IPROC): Pass along the interactive-specification to scwm_make_igsubr. * cursor.c, color.c: Fix const-warnings, adding GJB:FIXME:CONST to revisit later when guile's const-ness is better. Sun Dec 5 12:09:55 1999 Greg J. Badros * scwm.c (scwm_make_igsubr): Use sym_interactive from events.c's declaration of it, instead of a function-static one. * resize.c: Make rubber-band-resize and opaque-resize interactive. * events.c: Added 'interactive symbol. Use new call_interactively instead of scwm_safe_call0 when dispatching mouse/keyboard events. * callbacks.h, callbacks.c: Added `call-interactively' Sat Dec 4 12:33:57 1999 Greg J. Badros * *.c: Fix un-escaped double-quotes in docstrings. Fri Dec 3 13:19:29 1999 Greg J. Badros * scwm-snarf: Drop everything after $$$ so that the docstring extraction is not included. * scwm-doc-snarf: Added -- for extracting the docstrings from the last argument to the macro. * scwm-snarf.h, *.c, *.cc: Updated SCWM_*PROC and SCWM_*HOOK macros to have docstrings as last argument instead of as a comment just after the macro. Fri Dec 3 10:11:34 1999 Greg J. Badros * window.h (VALIDATE_ARG_WIN_ROOTSYM_OR_NUM_COPY): Check WINDOWP(arg) before VALIDWINP(arg) to avoid gh_cdr call on non-pair. Fixes a seg-fault bug in set-window-cursor!. Fri Dec 3 10:10:27 1999 Greg J. Badros * cursor.c: ws change-- eliminated some stylistic comments that are not used consistently throughout Scwm. Thu Nov 25 14:03:23 1999 Greg J. Badros * window.h, window.c: Added ScmWindowDelta(), ScwmWindowDeltaVP() to build XFORM objects for new multi-window animation stuff in c-animation.c. Also added FScmIsWindowDelta() to see if the arg is one of those created objects. Fixed typo bug caught by scwmdoc on window-visibility's FUNC_NAME. * constraint-primitives.cc: Added `cl-resolve-xforms', `cl-reset-dirty-windows' primitives. Set fInResolveHook to True while calling that hook so `animated-windows' can do the right thing. * add_window.c: Added fInResolveHook global variable. Tue Nov 23 15:08:18 1999 Greg J. Badros * window.c (mark_window): Use GC_MARK_SCM_IF_SET, and do not mark the mini_icon_image twice. * screen.h: ws change. * decor.c (mark_decor): Assert that fl->scmdecor is a back-pointer to the object being marked. Tue Nov 23 14:16:01 1999 Greg J. Badros * menu.c (SetPopupMenuPositionFromDecoration): Be sure that decoration popup menus stay on screen. Thanks to Tessa Lau for the bug report. * scwm.c: Default to resetting 0 segvs (instead of 100); guile-gtk is now not gratuitously segfaulting, so this resetting segvs is no longer useful as the default. Tue Nov 23 12:18:59 1999 Greg J. Badros * window.h: Added visibility field for tracking the current visibility of a window. * window.c: Added `window-visibility' procedure for returning symbol based on the tracked visibility field. * resize.c, move.c: Watch for visibility events during move/resize. * events.c: Update visibility field, and call hooks only when the frame window's visibility changes (not the client window) * add_window.c: Watch for VisibilityChangeMask events on frame, and initialize the new visibility field of windows. Tue Nov 23 09:16:36 1999 Greg J. Badros * xmisc.h,xmisc.c: Added SetXWindowGravity(..) * window.c: Mark other_properties only if set. Added some gravity code that is still #if 0-d out because it doesn't do the right thing. Inspired by (but very different from) Owen Taylor's suggestions regarding resizing frames on the wmspec list recently. * focus.c: Mark a formal as unused. * add_window.c: Remove unused extern Tue Oct 26 11:21:54 1999 Greg J. Badros * message-window.c: Avoid using pimg->mask if it is NULL. Fixes some X11 errors on startup. Mon Oct 25 12:23:02 1999 Greg J. Badros * message-window.c (MapMessageWindow): Do not use CWSaveUnder flag as that causes a race to be lost. Handle race gracefully when lost. Sun Oct 24 12:56:02 1999 Greg J. Badros * events.c: Fix docstring. Sun Oct 24 12:05:10 1999 Greg J. Badros * message-window.c (CreateMessageWindow): Added CWSaveUnder bit (no noticeable effect, but seems desirable). * events.c: Only require either X/Y change to do the XMoveResizeWindow, not also a width/height change. Fixes bug #12 reported by bkirby. Sat Oct 23 15:05:35 1999 Greg J. Badros * binding.c: ws change * events.c: Renamed send-key-press to `send-key', `send-button-press' to `send-button'. Added dx, dy arguments to `send-button'. Change suggested by E. Jay Berkenbilt -- thanks! Sat Oct 23 14:16:03 1999 Greg J. Badros * scwm.c: Do not decorate message-windows. Thanks to Dirk Hermann for the bug report. Fri Oct 22 17:18:20 1999 Greg J. Badros * window.c: Renamed `get-window-focus' to `window-focus-style' * events.c (HandleUnmapNotify): Clean up code a bit, and make iconifying work by at least doing the focus setting when we would have bailed out of the function really early. * add_window.c: Eliminate some code that's duplicated by HandleUnmapNotify; this assumes we get the UnmapNotify event before any DestroyNotify event. Fri Oct 22 15:54:23 1999 Greg J. Badros * events.c (HandleUnmapNotify): Only give pointer-window focus after an unmap of the focussed-window if the pointer-window is not click to focus. Fri Oct 22 15:46:13 1999 Greg J. Badros * scwm_msg.h: Added SCWM_EVENT_DEBUG_MSGS define controlling new DBUG_EVENT for better tracing of events. * events.c, focus.c: Avoid giving focus to a window that already has it (optimization, really). Move the code that rearranges the window list out of SetFocus() and put it into HandleFocusIn(). use WXGetPointerChild() instead of a less-obvious XQueryPointer call. Added trace debugging code using new DBUG_EVENT. * borders.c (SetBorderX): Be sure Scr.Focus (as well as Scr.Hilite) is set to the window that gets highlighted. Fri Oct 22 09:18:03 1999 Greg J. Badros * add_window.c, borders.c, events.c, focus.c, scwm.c, shutdown.c, window.c: Use False as second arg to XSync, not 0. * focus.c, shutdown.c: Use RevertToPointerRoot as third arg to XSetInputFocus, not RevertToParent * screen.h: Drop UnknownWinFocused since it seems superfluous. May break colormap stuff, but there's gotta be a more appropriate way to do this stuff. * add_window.c, events.c: Simplify some focus handling (no noticeable effect to me, but I could have broken something, of course). * colormaps.c (InstallRootColormap): Use psw, not tmp. (HandleColormapNotify) Drop test of Scr.UnknownWinFocused since that variable is now gone. Wed Oct 20 17:58:02 1999 Greg J. Badros * scwm.c (scwm_main): Handle SIGINTs always so that the focus is restored properly; change SCWM_CATCH_SIGINT to SCWM_RESET_ON_SIGINT Tue Oct 19 15:45:08 1999 Greg J. Badros * scwm.c: Added code from tguile-core.c (of hobbit-guile-1.3.4/unexec) to support --dump option which dumps a usable binary, but the state isn't yet correct. Use --enable-dump configure option to access it, and make symlink src/libunexec.a to the guile-hobbit unexec/libunexec.a file. * Makefile.am: link against @UNEXEC_LIB@ that a configure-time option controls. Tue Oct 19 09:02:21 1999 Greg J. Badros * message-window.c (s_message_window_set_image_x): Fix bug in message-window-set-image! when image is #f. Thanks E. Jay Berkenbilt for bug report. * window.inl: Do not add the boundary/border with for the MinFrame{Width,Height} since that results in too large of a frame. Maybe I shouldn't be adding them in MaxFrame* either. GJB:FIXME:: Mon Oct 18 10:34:27 1999 Greg J. Badros * Makefile.am (noinst_HEADERS): Added window.inl to list. * window.h: Remove inline prototypes, and replace with #include of window.inl * window.inl: Added -- includes all the inline functions from window.c, and is now #included at end of window.h * window.c: Move inline functions into window.inl * scwm-constraints.hpp, resize.c: Use new {Max,Min}Frame{Width,Height} functions. This should fix a bug in the display of wfcmgr windows that set their maximum client size that was being interpreted incorrectly as a maximum frame size. Mon Oct 18 09:31:55 1999 Greg J. Badros * message-window.c (s_message_window_set_image_x): Permit #f as image argument, and use it to turn off the image. Sun Oct 17 17:49:38 1999 Greg J. Badros * scwm.h: Added protos for scwm_make_(i)gsubr. * scwm.c: Do not catch SIGINTs unless SCWM_CATCH_SIGINT is defined. * events.h, events.c: Added fNoBlock parameter to NextScwmEvent since handle_pending_events must not block, and Pass fNoBlock to calls of NextScwmEvent(). Sun Oct 17 16:10:25 1999 Greg J. Badros * cursor.c: Use XC_right_ptr for menus by default. XC_sb_right_arrow (from last change) was the wrong one. Sun Oct 17 10:51:49 1999 * window.c: Use SCWM_IPROC for interactive procedures. Rename focus to `focus-window', iconify to `iconify-window', deiconify to `deiconify-window', iconified? to `iconified-window?', stick to `stick-window', unstick to `unstick-window', sticky? to `sticky-window?', window-shade to `shade-window', window-unshade to `unshade-window', window-shaded? to `shaded-window?' * scwm.c: Initialize scm_init_heap_size_factor if it is available (from my Guile patches, uncommitted still). Added scwm_make_igsubr for SCWM_IPROC. * scwm-snarf.h: Added SCWM_IPROC. * miscprocs.c: Use SCWM_IPROC for interactive procs. * cursor.c: Use XC_sb_right_arrow by default for the cursor in menus. * binding.c: Fix improper validation of args in set-mod-mask-numlock! and set-mod-mask-scrollock! Wed Oct 6 17:40:09 1999 Greg J. Badros * miscprocs.c (s_X_get_primary_selection): Fix some doc comment problems, bug in X-get-primary-selection. Wed Oct 6 09:21:02 1999 Greg J. Badros * binding.c (IsClick): Also grab ButtonPress and ButtonRelease events, and fix use of DBUG macro. Thanks E. Jay Berkenbilt for patch! Tue Oct 5 18:22:05 1999 Greg J. Badros * binding.c (IsClick): Make this grab the pointer so we actually see the motion events. This lets motion events fall out before waiting for the click timeout, and makes a noticeable nice improvement in the responsiveness of titlebar drags on motion events. Also reduce to sleep only 5ms (instead of 20ms) so shorter double-click intervals are handled more accurately. Mon Oct 4 23:05:19 1999 Greg J. Badros * window.h: Added fBorderWidthSet field * window.c (set_border_width_x): Set fBorderWidthSet. * add_window.c: Initialize fBorderWidthSet to False. Mon Oct 4 22:54:19 1999 Greg J. Badros * decorations.c (SelectDecor): Use fBorderWidthSet as a test about whether to allow changes to the boundary_width. * callbacks.c: Switch back to using the more long-winded scm_internal_stack_cwdr since I ran into an obscure and bizarre bug during testing select-window-interactively. Mon Oct 4 14:07:40 1999 Greg J. Badros * window.c (s_set_border_width_x): Only resize if psw->fFullyConstructed. This lets #:border-width be a hint, not a style. * decorations.c: Only tweak boundary_width in a couple places if it is currently < 0 (so #:border-width hints persist long enough to matter). * borders.h, borders.c: Move NO_SIDE_DECORATIONS_P and NO_TOP_BORDER_DECORATION_P into .h file from .c file since the former is used by window.c, too. * add_window.c: Initialize psw->boundary_width to -1 so that we can tell if a border hint was given. Sun Oct 3 15:41:18 1999 Greg J. Badros * window.c: Rename current-window-with-{focus,pointer} to just window-with-{focus,pointer} 1999-10-03 E. Jay Berkenbilt * resize.c (makemult): Always round down. (ConstrainSize): Always round down when making size a multiple of the client's resize increment. The old code rounded up if the pixel size was more than half way between two increments. This may give the wrong answer when resizing windows to fit within a given area (such as the display). Sat Oct 2 12:41:17 1999 Greg J. Badros * callbacks.c: Make error-hook call procs using the string error message instead of the list of throw arguments. Simplify scwm_handle_error to use scm_handle_by_message_noexit, and write to a string port to support new-style error-hook. Also simplify scwm_safe_apply. There's lots more stuff that can be ripped out once our base guile is 1.3.4. * events.c: Drop the assert in HandleDestroyNotify -- a gtk window closing caused pswCurrent to be set, so apparently it was possible to get a window object from a DestroyNotify. Sat Oct 2 11:09:50 1999 Greg J. Badros * events.c: Updated documentation for X-DestroyNotify-hook. Sat Oct 2 10:44:06 1999 Greg J. Badros * events.c (HandleUnmapNotify): Move g_lastwin_entered variable earlier. Make DestroyNotify try harder to get a window object, but assert that it never will, and instead call the hook on the X Id of the destroyed window since that might very well be all the information we can give. * window.h: Use VALIDWINP in VALIDATE_ARG_WIN_ROOTSYM_OR_NUM_COPY so that X-property-get does not seg fault on an invalid window. Use VALIDATE_ARG_WIN_COPY in VALIDATE_WIN_COPY, VALIDATE_ARG_WINVALID_COPY in VALIDATE_WINVALID_COPY. Probably some VALIDATE_WIN_COPY calls should be VALIDATE_WINVALID_COPY, but haven't exhaustively looked for these. Thanks to E. Jay Berkenbilt for the bug report! Sat Oct 2 00:07:10 1999 Greg J. Badros * window.h (DecorationYOffset, DecorationXOffset): Add protos for these. * window.c: Permit an unspecified width or height to mean leave unchanged. Added FIXME's re: psw->bw in Decoration[XY]Offset. * miscprocs.c: Added #if-0'd code about XtGetSelectionValue. * events.h: Added *pscm_configure_request_handled variable, EXTERN framework. * events.c: Added `X-ConfigureRequest-hook', call it and let it possibly hide the C handling if configure-request-handled variable is set to #t by a hook proc. Handle gravity properly in ConfigureRequest-s, so that, e.g., a font-size change in an xterm causes the window to change its size while respecting gravity and stay in a corner appropriately. * callbacks.c: Make scwm_run_hook save and restore pswCurrent (this was a problem at least one place). * add_window.h: Added EXTERN framework (unused). 1999-10-01 E. Jay Berkenbilt * miscprocs.c (s_X_fetch_bytes): added this function for cut buffer manipulation. (s_X_store_bytes): added this functino for cut buffer manipulation. Simply setting the X property seems insufficient for clearing the cut buffer. This code was basically stolen from gwm. Thu Sep 30 17:22:05 1999 Greg J. Badros * resize.c: Patched to make InteractiveResize use the current position of the pointer as an anchor so that the mouse no longer first needs to move outside the window before "catching" onto a part of the window frame to resize. Thanks to E. Jay Berkenbilt for tha patch! * resize.c: Use 0xaaaaaa instead of 37 for the initial rubberband mask. Thanks to Carl Witty for suggesting the value, and E. Jay Berkenbilt for raising the question. * placement.c (SetPswGravity): Change the gravity attribute of the window, not just the gravity hint. (Not clear that this has any effect... I certainly didn't notice anything). Wed Sep 29 23:04:46 1999 Greg J. Badros * window.c (s_move_window_to_desk): Return immediately if moving window to the desk it is currently on. * placement.c: Added some debug code. Call MovePswToCurrentPosition() after interactive placement to eliminate the jumping of the mapped window from 0,0 to its final place. * icons.c: ws change, drop some unused code that was #if 0. * add_window.c: ws change. Wed Sep 29 17:53:25 1999 Greg J. Badros * resize.h, resize.c: Added ComputeDeltaForResize() and use it in ComputePositionForResize(). Wed Sep 29 10:56:49 1999 Greg J. Badros * cursor.c (free_cursor): Return 0, not sizeof(*xp), since we did not use scm_must_malloc to allocate the memory. Wed Sep 29 10:05:45 1999 Greg J. Badros * add_window.c: Added some debugging code and DBUG_ADDWINDOW{,_VERBOSE} macros. Tue Sep 28 17:46:42 1999 Greg J. Badros * binding.c ("init_modifiers"): Do not warn about no scrollock, no numlock-- lots of "bug reports" re: this non-bug. * add_window.c: Do not display startup messages about correcting for restart_vp_offset; this works pretty well now. Tue Sep 28 16:34:29 1999 Greg J. Badros * color.c (color_mult): Fix > to >=. Thanks E. Jay Berkenbilt! Tue Sep 28 14:40:25 1999 Greg J. Badros * events.c: Fix uninitialized g_lastwin_entered. Thanks Marius Vollmer! Tue Sep 28 13:18:51 1999 Greg J. Badros * scwm.c: Update name and copyright. Tue Sep 28 09:53:40 1999 Greg J. Badros * face.c: Update `set-button-face!'s docs to refer to `set-left-button-face!' and `set-right-button-face!' * image.c: More fixes to avoid problems when libXpm is not present -- do not try to register that loaded if the primitive `load-xpm' was not defined. Tue Sep 28 08:27:16 1999 Greg J. Badros * scwm.c: Bug fix from Rusty Chris Holleman: use sigjmp_buf, not jmp_buf; this fixes the global-variables-changing corrupting bug on Solaris/SGI. Thanks! * scwm.h: Move some macros into scwm-guile.h * scwm-guile.h: Added. Various guile helpers for Scwm... was in scwm.h. * Makefile.am: Updated for above addition. * image.c: Do not guarantee that val_load_xpm is not SCM_UNDEFINED since `load-xpm' is now compile-time optional so that Xpm library is not necessary. * **.c: Replace SCM_DEFER_INTS, gh_defer_ints() with scwm_defer_ints() that calls SCM_REDEFER_INTS. Replace SCM_ALLOW_INTS, gh_allow_ints() with scwm_allow_ints that calls SCM_REALLOW_INTS. Remove the sandwiching around SCWM_NEWCELL_SMOB since that is no longer needed because the cdr is set before the ID is set in the car. Mon Sep 27 16:52:54 1999 Greg J. Badros * scwm.c: Use setjmp/longjmp on non-BSD -- just a trial test to see if sigsetjmp clobbers globals on Solaris/SGI but setjmp does not. * image.c: Use HAVE_LIBXPM to guard include of xpm.h, load-xpm primitive. * icons.c: Drop gratuitous include if xpm.h Mon Sep 27 15:25:45 1999 Greg J. Badros * menu.c: #ifdef out code if no XK_ISO_Left_Tab symbol (X11R5 -- e.g., Solaris -- does not have it). Reduces functionality a bit in that Shift-Tab won't go backwards in a menu for those users. * focus.c: ws change * callbacks.c: Added some debugging code, conditionally-compiled out. * miscprocs.c: Added scwm_run_test_hook_0, scwm_run_test_hook_1 iff SCWM_TEST_HOOK_PROCS is #defined. Mon Sep 27 08:49:10 1999 Greg J. Badros * scwm.c: Separate out ScwmReportX11Error function so it's easier to debug X11 errors/warnings. Sat Sep 25 12:32:21 1999 Greg J. Badros * scwm.c: Turn on backtraces w/ positioning by default (guile-1.3.2 broke this). Sat Sep 25 11:11:10 1999 Greg J. Badros * validate.h: Permit a value other than a symbol to escape a VALIDATE_ARG_SYM_USE_DEF so that the default can, e.g., be #f instead of a symbol (for later testing). * binding.c: Make `lookup-procedure-bindings' take a second argument, CONTEXT, to filter the list of bindings that are returned. Fri Sep 24 20:39:23 1999 Greg J. Badros * menu.c (s_popup_menu): Use 0 as the default for warp_to_index, since -1 now means "last menu item"; gratuitous commented example changes. Fri Sep 24 14:58:28 1999 Greg J. Badros * menu.c (PmiimMenuShortcuts): Let Shift-Tab go backwards in menus, and let that wrap from first to last, too. Fri Sep 24 09:23:05 1999 * validate.h: Added VALIDATE_ARG_INT_MIN (no _COPY). * callbacks.c: Make `add-timer-hook!' use msec, not usec. Thu Sep 23 15:34:27 1999 Greg J. Badros * menuitem.c (s_menuitem_properties): Return fIsForcedSubmenu * menu.c: Permit #t in warp-to-index to mean 1. Thu Sep 23 11:41:23 1999 Greg J. Badros * focus.c (SetFocus): Set psw->timeLastFocussed. * add_window.c: Initilalize psw->timeLastFocussed; * window.h: Added timeLastFocussed (X11 Time) for breaking ties between windows with same ttLastFocussed. * window.c: Added `window-last-focus-x-time', use timeLastFocussed as a tie breaker in compare_focus_time. * menu.h, menu.c: Move popup_menu prototype into beginning of menu.c since it is used only in menu.c. Change fWarpToFirst to an int warp_to so that items other than the first can be warped to. Add permit-alt-release-selection? to `popup-menu' primitive. Tue Sep 21 13:48:27 1999 Greg J. Badros * window.c: Added `decoration-size', Drop `resize-to', rename `resize-frame-to' to `resize-frame', now `resize-window' is implemented in Scheme in terms of resize-frame and decoration-size. Permit extra X,Y args to let resize-* do movements as well as resizes (for matching animated-resize-frame a bit better) * miscprocs.c: Make `set-handle-segv!' set fHandleSegv just so that the C variable is kept in synch with the actual status. Mon Sep 20 23:46:12 1999 Greg J. Badros * drawmenu.c (InPopupZone): Use /2, instead of *3/4 for InPopupZone to make the code match a change to draw-xpm-menu.c. Mon Sep 20 22:44:58 1999 Greg J. Badros * window.c: Added a missing ConstraintSize() call in SetScwmWindowGeometry to ensure that we do not ever resize a window to an incorrect size. E.g., when this happens to XEmacs, it immediately requests a proper size, and that gets ugly. * resize.c: Drop some extraneous code that called SuggestSizeWindowTo a second time in the interactive resizing main loop. Drop erroneous comment. Sun Sep 19 18:39:05 1999 Greg J. Badros * window.h: Added highlighted_nonant to ScwmWindow struct. * window.c: Use new redraw_border utility fn, use VALIDATE_ARG_WIN_COPY_USE_CONTEXT more. Added `set-window-highlighted-nonant!', `window-highlighted-nonant', `set-nonant-highlight-color!', `nonant-highlight-color' primitives. * util.h, util.c: Added redraw_border(). * scwm.c: Initialize Scr.nonant_highlight_color. * screen.h, screen.c: Added nonant_highlight_color to ScreenInfo struct, mark it. * borders.c: Honour psw->highlighted_nonant and draw it appropriately. * add_window.c: Initialize psw->highlighted_nonant (and added initialization of number_cmap_windows that appeared to be missing). Sun Sep 19 15:27:26 1999 Greg J. Badros * window.c, focus.c: Doc fixes. * scwm-constraints.cc: Added some debug messages, catch edit use exceptions to avoid an abnormal termination. Sun Sep 19 14:12:37 1999 Greg J. Badros * borders.c: added comment re: dynamic scoping in macro. * window.c: Added `window-decoration-ids', `set-window-id-background!'. Betters docs for other fns. Sun Sep 19 10:33:28 1999 Greg J. Badros * *.[ch]: MSFIX -> MS:FIXME::, FIXGJB -> GJB:FIXME:: Sun Sep 19 00:34:52 1999 Greg J. Badros * scwm.h: Use new-style SMOBs based on HAVE_SCM_MAKE_SMOB_TYPE_MFPE configure constant. * borders.c: Fix a macro to use do ... while(0) Sat Sep 18 12:31:03 1999 Greg J. Badros * xrm.c, shutdown.c, menulook.c, drawmenu.c, deskpage.c, cursor.c, constraint-primitives.cc, borders.c, binding.c: Include guile-compat.h * scwm.h, guile-compat.h: Move UNSET_SCM and GC_MARK_SCM_IF_SET into guile-compat.h (they are not scwm specific). * window.c: Add check on psw before dereferencing, add some braces to help make code more clear. * focus.c: Added `focussable-window?' primitive and use it to simplify some window focus stuff. Might have broken some relied-upon behaviour... will wait for bug reports (works fine in my usage pattern). Fri Sep 17 14:57:52 1999 Greg J. Badros * scwm-snarf: Permit spaces in guile-snarf output. Thanks Chris Holleman! Fri Sep 17 12:04:43 1999 Greg J. Badros * menu.c (MenuInteraction): Invoke the unhover action when a shortcut key selects a menu item and dismisses the menu. Thanks to bug report from E. Jay Berkenbilt. Wed Sep 15 14:51:36 1999 Greg J. Badros * events.c (HandleClientMessage): Fix bug in testing wrong sense of bool. Duh. This gets the gnome panel working pretty completely again. Tue Sep 14 13:02:10 1999 Greg J. Badros * scwm.c: Invert sense of switch -- now --document-formals, and by default they are undocumented. * events.c: Use scm_empty_hook_p, not FEmptyHook. (HandleClientMessage) Use PswFromAnyWindow, not PswFromWindow -- this fixes the spurious selection problem with gnome-hints when collapsing the gnome pager. Thanks Jay Belanger for bug report! * callbacks.h: Added proto for scm_empty_hook_p, drop it for FEmptyHook(). * callbacks.c: Drop FEmptyHook(), write scm_empty_hook_p for old guiles. Mon Sep 13 22:45:59 1999 Greg J. Badros * binding.c ("init_modifiers"): Drop the "Doing n XGrabKey calls..." message-- put in a DBUG macro. This message is mostly superfluous for the average user. Mon Sep 13 22:21:50 1999 Greg J. Badros * scwm-constraints.cc: Fix bug that resulted in resize hook not being invoked when constraint solver was not active. * callbacks.c: Update the number of args to error-hook -- there are 5. Mon Sep 13 13:27:37 1999 Greg J. Badros * scwm.c: Added --no-document-formals option to usage message. Mon Sep 13 12:58:39 1999 Greg J. Badros * winprop.c, module-interface.c, events.c: Use scwm_run_hook, not apply_hooks. * callbacks.h: Drop apply_hooks{,_message_only}, add scwm_run_hook{,_message_only} * callbacks.c: Move scwm_handle_error to later in the file, after defn of scwm_run_hook_message_only. Move WarnBadHook to earlier, and only ifndef HAVE_SCM_MAKE_HOOK Mon Sep 13 11:57:10 1999 Greg J. Badros * scwm.c: Added -N/--no-document-formals option to avoid the undefined quote (and save a bit of extra memory if user desires). Wed Sep 8 18:11:02 1999 Greg J. Badros * window.c: Renamed `window-class' to `window-class-hint' and `window-resource' to `window-resource-hint'. Implement old proc names in scheme using WM_CLASS property. * xproperty.c: Added ScmListOfStringsFromStringLen and use it in X-property-get so that properties that have a bunch of strings in a single property get a list of strings returned (e.g., WINDOW_CLASS). * focus.c: Added an extra guard to protect against a surprising seg fault. Wed Sep 8 14:01:13 1999 Greg J. Badros * scwm-snarf: Rewritten sed script by Ken Pizzini. Thanks Ken! Tue Sep 7 17:51:28 1999 Greg J. Badros * scwm-snarf: Use sed instead of awk, since vendor awk-s do not have sub/gsub commands. * events.c: Added a missing return statement. Tue Sep 7 15:11:19 1999 Greg Badros * scwm.c (scwm_make_gsubr): Only add documentation if we're using a recent guile-- I get a bug in guile-1.3 about `quote' being undefined when I load c-animation module. * events.c: Do not use cMotionHandlers -- just see if list becomes empty to turn off MotionNotify event selection. * callbacks.c: Added scm_empty_hook_p that should be provided by guile. Mon Sep 6 19:48:21 1999 * window.c (s_list_stacking_order): Document that this skips iconified windows, and add FIXME comment. Mon Sep 6 17:23:33 1999 * Makefile.am (EXTRA_DIST): added scwm-snarf. Mon Sep 6 17:07:14 1999 * scwm.c (scwm_make_gsubr): Added this proc for more sophisticated snarfing that saves a list of the formal parameter names. * scwm-snarf.h: More sophisticated snarfing of SCWM_PROC macros -- needs new scwm-snarf script. * scwm-snarf: The new script that does better snarfing of SCWM_PROC macros to preserve the argument list (when combined with macros in scwm-snarf.h, and scwm_make_gsubr in scwm.c). See also the new ../Makefile.common for the rules for building .x files Mon Sep 6 13:08:38 1999 * validate.h (VALIDATE_ARG_SYM_USE_DEF): Added this macro. * events.c: Use VALIDATE_ARG_SYM_USE_DEF in `send-button-press' to default to a 'click operation (as it used to behave) Sun Sep 5 21:25:13 1999 Greg J. Badros * guile-compat.h, guile-compat.c, events.c: #define gh_free, move make_output_strport, scm_strport_to_string here from events.c * system.h: Guard gh_free against redefinition since I want it defined in guile-compat.h, too. Sun Sep 5 13:20:00 1999 Greg J. Badros * menu.c (MenuInteraction): Permit the release of other modifier keys to end a menu selection to give support for Alt-Tab switching with modifiers other than Mod[12]Mask. Sat Sep 4 14:43:22 1999 Greg J. Badros * scwm-constraints.cc: Added a missing value from a return statement (Thanks John MacPhail!). Sat Sep 4 00:15:39 1999 Greg J. Badros * events.c: Added symbols 'press, 'release, 'desk-press, 'desk-release, 'desk-click (in addition to 'click) to be used for `send-button-press' primitive so it can be used to send the synthetic events for root-click proxying for GNOME. Clean up argument handling a bit. * binding.c: Fix bug in not initializing *pmodifier in FButtonToBnumModifiers(). * window.h: Added VALIDATE_ARG_WIN_ROOTSYM_OR_NUM_COPY_USE_CONTEXT macro. * scwm.c: Added comment re: E's event mask. * message-window.c: Added `message-window-id' Fri Sep 3 10:55:56 1999 Greg J. Badros * menu.h: Change DYNAMIC_MENU_P and DYNAMIC_SAFE_MENU to check scm_symbol_bound_p before using scm_symbol_binding since the latter will throw an error. This makes unbound symbols used as action items in menus error when they are clicked on, not when the window is popped up. (Dirk Hermann reported this as a bug). Thu Sep 2 17:53:14 1999 Greg J. Badros * window.c: Use ComputePositionForResize() in ResizeTo(). Use VALIDATE_ARG_INT_OR_UNDEF in convert_move_data(), and check for UNSET_SCM, not == SCM_BOOL_F. * validate.h: Added VALIDATE_ARG_INT_OR_UNDEF, some assignments for warning suppression (and a comment about why they're there). * resize.h, resize.c: Added ComputePositionForResize(). Thu Sep 2 15:38:58 1999 Greg J. Badros * binding.c: Only display warning message about unbound modifier once. Use FUNC_NAME in init_modifiers. Thu Sep 2 13:45:32 1999 Greg J. Badros * window.c: Added `select-window-done-hook', and call it. * scwm.c: Set basic_event_mask variable and use it or (it | MotionMask) for XSelectInput depending on whether there is a motion handler. * events.c: Added support for a MotionHandler, update comments. Added `add-motion-handler!', `remove-motion-handler!', `reset-motion-handler!'. * callbacks.h: Added SCWM_MAKE_HOOK macro. Delete old #define impls of calln_hooks in #if 0 (use inline defns in callbacks.c). * callbacks.c: Use scwm_run_hook, not scm_run_hook if HAVE_SCM_MAKE_HOOK. Write scwm_run_hook using scwm_safe_apply. This fixes bug where errors in hook procedures would terminate Scwm. Wed Sep 1 14:43:59 1999 Greg J. Badros * placement.c (SetPswGravity): Call XSetWMNormalHints so that gravity persists through Scwm restarts. Wed Sep 1 10:46:29 1999 Greg J. Badros * Makefile.am (noinst_HEADERS): Added scwm_msg.h Wed Sep 1 10:25:15 1999 Greg J. Badros * scwm.h: move scwm_msg stuff into scwm_msg.h so it can be included w/o all the other scwm.h stuff. * scwm.c: ws change. * scwm_msg.h: Added Tue Aug 31 08:51:10 1999 Greg J. Badros * window.c (s_show_titlebar): Call SetBorderX so that the border gets redrawn properly. * events.c (HandleFocusIn): Call window-focus-change-hook before the SetBorder call (so that any changes to the border by the hook are accomplished before redraw). Mon Aug 30 21:27:35 1999 Greg J. Badros * window.c (set_window_internal_title_height): Fixed for non-NW gravity windows. Mon Aug 30 20:19:34 1999 Greg J. Badros * Makefile.am (guile_snarfs): Added focus.x (added hook there). Mon Aug 30 20:16:17 1999 Greg J. Badros * window.c, virtual.c, icons.c, events.c, add_window.c, window.c: Use Bool as last (3rd) arg to SetFocus instead of 0/1. * focus.c: Added `window-focus-lost-hook'. Rename Fw local to psw for readability. Added init_focus() function, and use focus.x to create it (for initializing the hook-- first hook in file). * scwm.c: call init_focus(). Mon Aug 30 15:57:06 1999 Greg J. Badros * binding.c (init_modifiers): Only populate the mask_mod_combos[] with those that are non-zero. Switch warnings re: missing dubious modifiers to just INFO messages, and remark on the number of XGrabKey calls for window bindings. Added `ignore-dubious-modifiers?' getter, and update docs on `undo-all-passive-grabs' and `redo-all-passive-grabs' Mon Aug 30 12:18:21 1999 Greg J. Badros * scwm-constraints.cc (SuggestSizeWindowTo): Return a bool for whether the window size was changed. * scwm.c: Added commented out hack from Hubert Canon to work around weird sigsetjmp corrupting global variables bug. Mon Aug 30 12:10:06 1999 Greg J. Badros * window.h, scwm-constraints.h, add_window.h, add_window.c: Make SetScwmWindowGeometry return True iff the window was moved/resized, False otherwise. * resize.c: Use SuggestSizeWindowTo's return value for determining whether to call the hooks for a new position. * borders.c: Redraw the titlebar right after a XMoveResizeWindow -- this is a bit wasteful if no expose event is generated, but reduces flicker noticeably if the titlebar does need re-drawing. * window.c: FIX comment re: overkill of SetupFrame() call in ResizePswToCurrentSize. 1999-08-30 Robert Bihlmeyer * Makefile.am (INCLUDES): Explicitly mention include dir so that srcdir != builddir works. Mon Aug 30 10:20:25 1999 Greg J. Badros * Makefile.am (scwmpaths.h), scwm.c: Rename SCWMDIR to SCWMRCDIR Fri Aug 27 09:26:49 1999 Greg J. Badros * xmisc.c: Remove duplicate JunkChild, JunkRoot vars. * window.h: assign to cvar in macro (avoids compiler warning) * validate.h: Assign to pch in all paths of macro (avoid compiler warning) * scwm.c: comment out some unused variables (avoid warning) * cursor.h: Use EXTERN on *pscm_cursor... variables (avoid duplicate definitions). * callbacks.c: Reorder a bit to make calln_hooks all inline, and have them return values. Wed Aug 25 16:25:39 1999 Greg J. Badros * events.c (HandleScwmExec): Use initial length of 0 in make_output_strport -- the non-zero length apparently needs to be initialized and wasn't, resulting in a lot of garbage. Wed Aug 25 15:24:50 1999 Greg J. Badros * scwm.c (scwm_main): Fix typo bug in resetting restart_vp_offset_y twice, not restart_vp_offset_{x,y} * events.c: Do not care about return value of scm_set_current_{output,error}_port() when returning to old values. Wed Aug 25 14:05:02 1999 Greg J. Badros * scwm-snarf.h: Fix SCWM_GLOBAL_HOOK macro (had only fixed SCWM_HOOK macro before) to use HAVE_SCM_MAKE_HOOK Wed Aug 25 12:24:17 1999 Greg J. Badros * scwm.c: Drop the setting of *suppress-old-style-hook-warning*. * events.c: Rename get_strport_string to scm_strport_to_string, and define it only if guile does not already have it. (scwmexec protocol was broken using the old code). Wed Aug 25 00:13:26 1999 Greg J. Badros * scwm-snarf.h: Use HAVE_SCM_MAKE_HOOK to test for whether to use scm_make_named_hook() * module-interface.c, events.c: Fix number of arguments for various hooks (guile-1.3.2 hooks check these). Updated docs for those hooks. * callbacks.c: Use new run-hook if HAVE_SCM_MAKE_HOOK; leave old code in otherwise. Tue Aug 24 23:40:37 1999 Greg J. Badros * binding.h, binding.c: Added const modifiers to func_name parameter Tue Aug 24 14:17:19 1999 Greg J. Badros * binding.c: Added set-ignore-dubious-modifiers primitive to revert to the old (dumber) behaviour of treating all of the modifiers separately, even numlock/scrolllock. This can be useful for performance reasons. Tue Aug 24 13:52:04 1999 Greg J. Badros * binding.c (init_modifiers): Don't include 0 in mask_mod_combos array (wastes an XGrabKey call) and use c_mask_mod_combos to control how much of the array is initialized (currently always 7). Print warnings if unable to determine numlock_mask and/or scrollock_mask. Tue Aug 24 13:51:10 1999 Greg J. Badros * scwm.c: Fix very small memory leak in not freeing an X11 property after XGetWindowProperty. Sun Aug 22 17:15:58 1999 Greg J. Badros * binding.c: Use 0 == AnyButton as argument to XGrabButton/XUngrabButton instead of looping through all the buttons. Only call XGrabButton/XUngrabButton once with 0 or'd into the modifier if modifier is not AnyModifier. Use None for the cursor when grabbing buttons. Grab buttons on psw->frame, not psw->w (keys were doing it that way.. not sure why that's better, but keys do not work reliably if the grab is done on psw->w). Split remove_binding into remove_binding and remove_binding_from_list so that add_binding can call only the former and doesn't need to talk to the X server to XUngrab the previous binding. Sun Aug 22 15:21:14 1999 Greg J. Badros * binding.c: Use new-style binding context names in documentation, and eliminate the deprecated versions from the docs. Update a warning message to use `' to enclose new name of context. * add_window.c: Update initial comments, add (C). Sun Aug 22 11:39:49 1999 Greg J. Badros * window.c (window_pixel_size_to_client_units): Do not subtract-out the base_width/base_height if the width_inc/height_inc is 1. This fixes a bug whereby, e.g., gimp's main toolbar window had the size reported incorrectly when resizing the frame. It would report 0x0 when at its minimum size, now it properly reports its frame size. Sun Aug 22 11:33:16 1999 Greg J. Badros * guile-compat.c (scm_internal_cwdr_no_unwind): Reduce the leaking by about 75% (tested when doing focus switches and opaque moves of windows); process image still grows a bit, but it's better. Something else must be leaking too. All I did to eliminate the leak of 176 bytes per each call was explicitly scm_must_free the pRootContinuation, and always reset that field in the scm_rootcont object to NULL so the gc does not try to take care of it, too (and re-free already freed memory) Fri Aug 6 10:35:10 1999 Greg Badros * window.c (DeferExecution), resize.c (InteractiveResize), move.c (InteractiveMove): Added False arg to NoEventsScwmUpdate() to let that block (as it was doing anyway); Move the ms_sleep(10) into the #else clause of the NOT_MORE_RESPONSIVE since if the NoEventsScwmUpdate blocks, we don't need to sleep. * menu.c: Fix bug in menu-hover-delay-- was returning cmsPopupDelay, not cmsHoverDelay. * menu.c (MenuInteraction): Use True as arg to NoEventsScwmUpdate() so that it will not block, and we can call the hover/popup procs as we should. Thanks John Kodis for the bug report! Also finer-grain some of the debugging code. 1999-08-04 Jeff W. Nichols * binding.c: Fixed a bug in which a reference to the binding list was saved prior to calling remove_binding in add_binding. This caused a list loop when removing the first element in the binding list and put scwm into an infinite loop. 1999-08-02 Greg Badros * session-manager.c: Remove `SM-client-id' (was deprecated). Use `SM-register' instead 1999-08-01 Greg Badros * binding.h, events.c: Use PbndFromXXXX, not PBindingFromXXX.. * binding.c: Make remove_binding take a bnum_or_keycode argument instaed of both button and keycode arguments. Fix calls to it, calls to PBindingFromXXXX fns that have been renamed. Added new primitive `number-of-mouse-buttons'. Sat Jul 31 20:09:06 1999 Greg Badros * binding.c (remove_binding_keysym): Added this function as a helper to remove_binding and make the latter take a keycode not a keysym. This enabled easier writing of the new primitive `unbind-keycode' which was conspicuously missing. Sat Jul 31 19:31:22 1999 Greg Badros * miscprocs.c (s_get_mouse_event): Fix bug of using = instead of ==. Thanks -Wall -W! * scwm.h: Move ARG_UNUSED, ARG_IGNORE macros out into arg_unused.h, and include that file. * scwm.c: conditionally #include XTest.h. Fri Jul 30 16:15:33 1999 Greg Badros * placement.c: Simplify some over-parenthesization. 1999-07-27 Jeff W. Nichols * virtual.c: Modified viewport-position-change-hook to return two additional arguments, the delta x and y values from the previous viewport position. Tue Jul 27 10:49:12 1999 Greg Badros * virtual.c: Uncomment the C-level logic for the window focus on desk changes... it was more involved than I thought. Added an after_change_desk_hook for, e.g., changing the focussed window. Tue Jul 27 08:42:40 1999 Greg Badros * scwm.c (SigDoneSegv): Move the call to XSynchronize if debugging to earlier, and ifdef-out the XSetInputFocus to the NoFocusWin -- that stole focus way too soon, and I don't think Scwm should be messing with the user's focus at startup, anyway. Thanks Stephen Tell for noticing the negative effects my early July changes had. * virtual.c (changeDesks): Added some ifdeffed-out code for setting the focus to the current window on a change of desks. Better to use the change-desk-hook, if that works. 1999-07-26 Jeff W. Nichols * message-window.c: Values returned from message-window-position and message-window-size are placed in gh_int2scm or gh_double2scm converters as appropriate. Also modified message-window-size to return the current size of the message window, regardless of whether certain dimensions are set to auto-size. (Perhaps another method could be added to return which dimensions are autosizing) Mon Jul 26 12:19:57 1999 Greg Badros * icons.c (GrabIconKeys): Bug fix from Stephen Tell; only grab keys if its not a mouse binding. Sat Jul 24 22:29:22 1999 Greg Badros * window.c (get_window): Return #f if the car from select-viewport-position is not a window object (it now might be a window id). Otherwise all code that checks (if win ...) has to instead do (if (window? win) ...). Sat Jul 24 19:07:20 1999 Greg Badros * window.c: Simplify DeferExecution-- select-viewport-position was returning #f incorrectly for first constraint creation and it was due to some obsoleted code choosing to return #f instead of the selected window. * image.c: Added note re `clone-resized-image' in docs for `clone-scaled-image'. Sat Jul 24 13:25:12 1999 Greg Badros * scwm.h: Added def of struct _ImlibData before using it in an extern. Fri Jul 23 23:39:03 1999 Greg Badros * scwm.h: Added extern of imlib_data (now needed by image.c) * image.c, image.h: Rename SMOB image to scwmimage-- was having problems due to a global name conflict of imlib's free_image and scwm's SMOB free_image. Set imlib to use the default visual of screen; was getting BadMatch X11 errors on XCopyArea when drawing buttons on a Sun machine's Solaris display because imlib creates pixmaps at the best visual (by default) instead of the DefaultVisual which is used when creating the windows for the buttons. Fri Jul 23 21:48:05 1999 Greg Badros * callbacks.c (s_set_load_processing_frequency_x): Use /** instead of just /* so doc extractor notices the comment. * validate.h (VALIDATE_ARG_LISTNONEMPTY): use gh_pair_p, not gh_car to check if a list is not empty. Fixes seg fault reported by Francesco Tapparo. Tue Jul 20 08:23:24 1999 Greg Badros * callbacks.c (s_set_load_processing_frequency_x): Added `set-load-processing-frequency!' to control how many s-exps are read between load-processing-hook invocations. Tue Jul 20 08:21:19 1999 Greg Badros * validate.h: Duh. Use SCM_UNDEFINED to terminate a gh_list, not SCM_EOL. Fixes nasty-looking seg faults when errors are thrown. Mon Jul 19 15:25:07 1999 Greg Badros * binding.c: Only display warning message about unbound modifiers for modifiers that are actually unbound, not for every modifier given on a binding that contains an unbound modifier. Also, return #t on successful binding/unbinding of keys instead of SCM_UNSPECIFIED (was returning #f on errors, but need to be consistent). * resize.c (s_set_rubber_band_mask_x): Return SCM_UNSPECIFIED, not the passed in value. Sun Jul 18 17:28:51 1999 Greg Badros * Thanks to Stephen Tell for scwm/3 scwm/4 bugs re: building on HP/UX. * message-window.c: #include , and move include of message-window.h to first. * events.h, callbacks.h: Added #ifdef HAVE_SYS_SELECT_H to guard its inclusion. * events.c: remove inclusion of sys/select.h, since it includes events.h Sun Jul 18 16:39:45 1999 Greg Badros * binding.c: Added `undo-all-passive-grabs', `redo-all-passive-grabs', `undo-passive-grab', `redo-passive-grab' * events.c (HandleKeyEvent): Added USE_XALLOW_EVENTS cpp check for commenting out some code. Drop the use of XTest since that won't work anyway. * miscprocs.c (get_mouse_event,get_key_event): Return lists containing the string as the car, but the raw information in the cdr. Sun Jul 18 14:50:01 1999 Greg Badros * binding.c: Fix VALIDATE_... call for lookup-procedure-bindings to really work when passing #f or no arguments to return the list of all bindings. Sun Jul 18 13:45:59 1999 Greg Badros * events.c: Removed #if 0 from the HandleVisibilityNotify() event handler. Invoke new window-*obscured-hooks on these events. * add_window.c: Only display message about moving a window if a restart_vp_offset_x/y is nonzero. Sun Jul 18 01:41:54 1999 Greg Badros * add_window.c (AddWindow): Move the windows to their correct viewport (from last shutdown) later than before so that sticky windows are correctly identified. * binding.c (s_lookup_procedure_bindings): Permit #f as PROC to return all bindings (really simple generalization). Provide better warning regarding punctuation when a binding fails because of an unmatched keysym name. * scwm.c (SigResetLoop): UngrabServer, Pointer, Keyboard when resetting to the event handler. * miscprocs.c: Added `get-mouse-event'. Change `get-key-event' to look for a KeyPress of a non-modifier key, not a KeyRelease, so that I don't need to use a timer hook to test (and because it seems better that way, anyway-- it's probably going to be bound to a keystroke which needs to be released and we don't want the release event.) Sat Jul 17 23:04:49 1999 Greg Badros * xproperty.c (s_X_property_get): Fix bug in that GetXProperty was not returning NULL on failure (and `X-propert-get' was not checking the return value anyway). Gimp tickled this bug in that windows popped up then disappeared so quickly that the window was gone by the time the X-propert-get was done. Sat Jul 17 21:22:36 1999 Greg Badros * window.c (MovePswToCurrentPosition): Improve message about moving sticky window so it tells the correct new position. Sat Jul 17 19:04:06 1999 Greg Badros * binding.c: Replace binding_contexts and context_strings parallel arrays with an extended symnum struct that contains the string, too. Reorder the array so that depracated symbols are all at the end. Warn about deprecated symbols used in contexts, and suggest correct version. Make `lookup-mouse' return both the proc and the new immediate-proc. Added `lookup-procedure-bindings' and several helper functions to convert internal binding representation out to Guile lists. Added `keymask->string' for modifier conversions when there is no keycode (e.g., for the mouse bindings). Sat Jul 17 12:53:33 1999 Greg Badros * xmisc.h, xmisc.c (NFromXPropertyCardinal): Added this fn. * window.c: Move sticky windows off of the viewport back onto the viewport (but not to 0,0 like the old ifdef-fed out code did). Warn user that we did this via scwm_msg(ERR,..). * scwm.c, add_window.c: Use SCWM_VIEWPORT_OFFSET_X/Y Root window properties to correct for position of windows that were not on the viewport during a previous scwm termination (e.g., when restarting). Also use them to go back to that viewport at startup. Sat Jul 17 03:09:33 1999 Greg Badros * virtual.c (MoveViewport_internal): Added comment. * placement.c: Fix off-by-one bug in CleverPlacement -- was correcting for bw differences, but that seems wrong given that the algorithm's job is to figure out where the *frame* goes. * window.c (s_get_window): Fix bug -- was using select_p after copying the bool into a C boolean. Also was assumming that select_viewport_position() puts SCM_BOOL_F in car if a scheme window object was not selected -- now test the car with WINDOWP since a window id can be returned. * binding.c: Added `set-mod-mask-numlock!', `set-mod-mask-scrolllock!' for overriding the C algorithm, if necessary. * add_window.c: Fix off-by-one bug in setting frame_height that was resulting in un-titled windows shrinking by 1 pixel vertically at each restart. Sat Jul 17 02:08:08 1999 Greg Badros * binding.c: Only grab buttons when context is C_WINDOW. Ignore the various locks in PBindingFromMouse() as I do in PBindingFromKey(). Sat Jul 17 01:28:40 1999 Greg Badros * virtual.c (MoveViewport_internal): Fix bug in setting of XA_SCWM_VIEWPORT_OFFSET_X/Y -- give &Scr.Vx/y instead of the number itself. (Was causing segfaults, obviously). * scwm.c: Fix typo just like above in #ifdef-fed out AnnounceGnomeCompliancy(). * icons.c, focus.c, add_window.c: Do not call XGrabKey/XGrabButton; using binding.c's GrabKeyWithModifiersWin(), GrabButtonWithModifiersMaskXcPm(), UngrabButtonWithModifiersWin, etc. * binding.h, binding.c: Major clean up button/key grabbing stuff. Figure out what mask numlock and scroll-lock are, make bindings and Grabs for all 8 combinations of the various lock states so that bindings are independent of keyboard lock state. Fri Jul 16 17:56:59 1999 Greg Badros * xmisc.h, xmisc.c (Pixmap1DeepFromPixmap): Move this function here, from cursor.c * cursor.c: moved Pixmap1DeepFromPixmap to xmisc.c. * virtual.c: Set XA_SCWM_VIEWPORT_OFFSET_X, XA_SCWM_VIEWPORT_OFFSET_Y on root window in MoveViewport_internal so that they are always current. * scwm.h, scwm.c: Added XA_SCWM_VIEWPORT_OFFSET_X, XA_SCWM_VIEWPORT_OFFSET_Y atoms. Protect shape stuff with HAVE_SHAPE. Set some XTest globals from XTestQueryExtension * message-window.c: Improved `message-window-set-image!' to take fg, bg, and shaped? parameters, and permit them to be shaped windows. * icons.c, events.c, borders.c, add_window.c: Protect XShape fns w/ HAVE_SHAPE * events.c: Have commented out code using XTestFakeKeyEvent -- does the wrong thing since Scwm still grabs the key. Duh. * deskpage.c: Fix validate bug in set-desk-size!. Thanks Jay Belanger. Thu Jul 15 09:33:36 1999 Greg Badros * window.c (s_select_viewport_position): Return window id instead of #f if a window was selected. Now #f is returned only if the selection failed. (select-window is changed to provide old behaviour at that level of the API). Wed Jul 14 10:05:18 1999 Greg Badros * xproperty.h (VALIDATE_ARG_ATOM_OR_STRING_COPY): Added this macro. * xproperty.c: Use VALIDATE_ARG_ATOM_OR_STRING_COPY, other validate macros. * window.h: Added ttCreated field of struct ScwmWindow. * window.c: Fix some warnings; added `window-creation-time', updated docs on `window-last-focus-time' to remove mention of using X server times (they wrap pretty frequently -- added comment to that effect). * virtual.c: Fix warning by including "events.h" * shutdown.c, drawmenu.c, decorations.c, font.c, decor.c, cursor.c, borders.c, binding.h, binding.c: Fix warnings * scwm.c: Fix some warnings re: unsigned/signed comparisons. * screen.h: Make ClickTime an unsigned int for fixing warnings. * placement.h: Added proto for GravityFromSym(). * message-window.c: Require image object in `message-window-set-image!' (do not permit #f). Permit `message-window-set-position!' to use #f in a position argument to mean "no change" of that coordinate. * image.c: Fix warning by including "xmisc.h" * events.c: Include events.h * callbacks.c: Added `load-processing-hook', call it every five top-level sexps. Drop bogus arg to `reset-input-hook!' * add_window.c: Fix warnings, set psw->ttCreated when re-parenting. * Makefile.am: Use @PREFIX_INCLUDES@ in @INCLUDES@ Fri Jul 9 15:07:02 1999 Greg Badros * window.c: Fix order of arguments in calls to select_viewport_position; the cursor argument is now the third argument. * ICCCM.c: Generalize send-client-message to take a rest argument with up to 4 integers to fill the ClientMessage event's data.l[..] fields. Do complete error checking on the arguments. Fri Jul 9 09:13:29 1999 Greg Badros * resize.c (s_set_rubber_band_mask_x): Permit to be in range [0,+Inf]; 65535 was a poor choice before. Fri Jul 9 09:04:22 1999 Greg Badros * Makefile.am: Added -DGUILE_CPLUSPLUS_SNRF to arguments to guile-snarf when building .x from .cc files. This is only useful when using a patched version of snarf.h that adds a cast to the last argument to scm_make_gsubr when GUILE_CPLUSPLUS_SNARF is defined (that cast eliminates spurious warnings on those function calls). Fri Jul 9 08:58:24 1999 Greg Badros * window.c (select_viewport_position,get_window): Use VALIDATE_ARG_CURSOR_COPY_USE_KILLORCIRCLE to do the right thing with values #t and #f for the cursor (was getting run-time errors about uses of #t for the kill cursor) * scwm.c: Change the SigDoneSegv message to suggest running with --segv-just-stop or --segv-reset-count 0, and call scwm_msg only once instead of once per line. * resize.c: Permit rubberband mask in [0,65535], not just [0,255] * menuitem.h, menu.h: Added self field to Menu and MenuItem structures, a pointer back to the scheme object. Need this to be sure we can protect/unprotect the object so that they don't get gc-d when we're still using the guts of the objects from DynamicMenu and MenuItemInMenu instances. * menu.c: Initialize self fields, and use scm_protect_object/scm_unprotect_object to ensure menuitems and menus don't get gc-d while the menu is displayed. * cursor.h: Rename and fix VALIDATE_ARG_CURSOR_COPY_USE_NONE to VALIDATE_ARG_CURSOR_COPY_USE_KILLORCIRCLE Thu Jul 8 12:20:02 1999 Greg Badros * Makefile.am: Mon Jul 5 20:26:08 1999 Greg Badros * *.c, *.h: Updated copyrights to include 1999. * binding.c: Removed duplicate copy of "icon" (for C_ICON) in the binding_contexts array. Rename local variables in remove_binding (they were called temp and temp2). Added scm_unprotect_object() calls in remove_binding (and remove comment about them leaking since they shouldn't any longer-- not a big leak anyway, but this is better). Mon Jul 5 19:33:37 1999 Greg Badros * validate.h (VALIDATE_ARG_DBL_MIN_COPY): Added a missing SCM_EOL to a gh_list call. Mon Jul 5 19:28:24 1999 Greg Badros * events.c (HandleButtonPress): Call the ReleaseThunk (the immediate click procedure) right away and use its return value to determine whether to bother with the find_mouse_event_type garbage. * binding.h: Added comment w/ ReleaseThunk member of binding re: its use as an immediate click procedure for mouse bindings. * binding.c: Added immediate-proc argument to bind-mouse, and handle it. Also cleanup an old ifdef. Mon Jul 5 18:50:31 1999 Greg Badros * Makefile.am: Removed mention of complex.[ch] * binding.c: Moved IsClick() from obsoleted complex.c into here. * complex.c, complex.h: Removed -- moved their only function, IsClick(), into binding.c Mon Jul 5 17:24:51 1999 Greg Badros * events.c: Remove spurious unmatched SCM_REDEFER_INTS. These all need to be re-visited from scratch, I believe. Mon Jul 5 16:55:25 1999 Greg Badros * window.c: Clean up DeferExecution a bit -- fix its return value. Simplify some of it. Still a mess, but not as bad, perhaps. * xrm.c, xproperty.c, window.c, shutdown.c, resize.c, placement.c, module-interface.c, miscprocs.c, message-window.c, menulook.c, menu.c, image.c, font.c, face.c, deskpage.c, decor.c, color.c, callbacks.c, binding.c, ICCCM.c: Updated to use VALIDATE_XXXX macros more consistently. * image.c: Added `image-short-name' calling new SzNewImageShortName(). * cursor.h, decor.h, face.h, font.h, window.h, image.h: Added some VALIDATE macros * cursor.h, cursor.c: Added szName to scwm_cursor struct, and get it from the image object's SzNewImageShortName() fn. Update the print procedure to display a name if the cursor has one. * validate.h: Added more VALIDATE_XXX macros for procs, lists, half-ranges, etc. o * xproperty.h: Added VALIDATE_ARG_ATOM_COPY (now needs assert.h, too). Mon Jul 5 00:02:57 1999 Greg Badros * binding.c (s_keymask_keycode_to_string): Handle bad keycodes w/o segfaulting -- return #f. Sun Jul 4 22:56:39 1999 Greg Badros * window.h: Added psym to struct gravity_info_tag so I can map between symbols and X gravities, and the table. * window.c: Introduce gravity symbols, make ResizeTo honour the window gravity, added `window-gravity' and `set-window-gravity!'. Remvoed some #ifdef 0'd symbol definitions (no-top-border, no-side-borders, no-border). * validate.h: Added VALIDATE_ARG_DBL_COPY, VALIDATE_ARG_DBL_COPY_USE_DEF macros (for message-window) * placement.h, placement.c: Added sym_grav_XXX to grav_table array. Added SetPswGravity, GravityFromSym. * message-window.c: Updated doc string for message-window-set-position! -- it had arg description wrong, I think. Greatly simplify that procedure, too, by using VALIDATE macros. Sun Jul 4 21:36:47 1999 Greg Badros * Makefile.am: Added @XTST_LIB@ to link scwm_LDADD Sun Jul 4 21:21:13 1999 Greg Badros * window.h, window.c: Added fInPlace argument to set_window_internal_title_height. Make windows that are shaded have WM_STATE set to WithdrawnState (they were NormalState; it's conceivably that they should go to IconicState, but that implies to me that their icon is visible, which is not the case). * util.c, decor.c: Pass False to fInPlace for set_window_internal_title_height. * miscprocs.c: ws typo fix. * events.c: Honour fQuotingKeystrokes flag, but do only a send events sending of the key (it's a synthetic event). * binding.c: Added `set-quote-key-events!' and `quote-key-events?' to set fQuotingKeystrokes variable. Sun Jul 4 18:40:04 1999 Greg Badros * virtual.h, scwm.c, screen.h, events.c: Eliminate NON_VIRTUAL compile-time option. * events.c: Fix bug in xterm active icons whereby the xterm would send configure notify events that Scwm incorrectly interpreted as referring to the client window instead of as to the pixmap icon window (added a check to see if the event's window was icon_pixmap_w (used to only check for icon_w)). Thanks George Hansper for the bug report! * binding.c: Added list of contexts to the docs for bind-key, and xref for bind-mouse. * virtual.c: Fix bug in initializing the scroll-region variable that was causing edge enter events to appear to do nothing. Sun Jul 4 14:52:32 1999 Greg Badros * binding.c: Eliminate harmless compiler warning. * miscprocs.c (s_get_key_event): Do not change the event mask for Scr.NoFocusWin -- it already is watching for KeyRelease events, so let it be (bug was that I was resetting the mask, thus un-selecting events that should've been selected -- this made some bindings appear to not work, when actually X just wasn't passing on the event. * virtual.c: BroadcastIconInfo of icons on other desks so that they don't appear to move (since the Fvwm modues use viewport positions, they need to be told when the viewport location of an icon changes, which corresponds to when the viewport-offset changes). Also simplify handling of focus in changeDesks -- just call CoerceEnterNotifyOnCurrentWindow, and let the EnterNotify event do the right thing. Sat Jul 3 23:55:50 1999 Greg Badros * events.c: Simplify HandleButtonPress and HandleKeyEvent by using new PBindingFromMouse and PBindingFromKey fns. * binding.h, binding.c: Added PBindingFromKey, PBindingFromMouse; new primitives `lookup-key', `lookup-mouse' Sat Jul 3 20:56:38 1999 Greg Badros * binding.c (s_keymask_keycode_to_string): Doc string fix. Sat Jul 3 18:17:38 1999 Greg Badros * miscprocs.c (s_get_key_event): Got this primitive working, and eliminate its previous confusing arguments. * binding.c (SzKeysymForKeyCode, SzNewModifierStringForModMask, SzNewForModMaskKeyCode): Added new primitive `keymask-keycode->string' for getting a string for binding to a certain keymask and keycode. * binding.h: Added protos for new fns. Sat Jul 3 00:16:25 1999 Greg Badros * image.c: Added `image-size' for simpler, faster interface to a common case. Fri Jul 2 22:24:21 1999 Greg Badros * virtual.c: Rename global C variable from cpix_scroll_region to scroll_region to match scheme name of value. * image.c: Doc comment fix. Fri Jul 2 15:08:24 1999 Greg Badros * image.c (s_clone_scaled_image): Added `clone-scaled-image' primitive (when compiled with imlib) for resizing image objects. Fri Jul 2 10:03:11 1999 Greg Badros Various bugs and doc problems from documentation extractor: * window.c: Fix FUNC_NAME for any-id->win. * virtual.c: Added docs for scroll-region variable. * miscprocs.c: Rename X-connection-number to x-connection-number. * message-window.c: Fix args params to message-window-set-size! * image.c: doc fixes for `window->image'. * cursor.c: Fix args params to `create-pixmap-cursor' * callbacks.c: doc,args fix to `reset-input-hook!' Fri Jul 2 08:40:31 1999 Greg Badros * message-window.h, message-window.c: Drop the message field of scwm_msgwindow struct, and add a char *sz instead; just convert to C string on set-message! primitive, then don't do so much memory allocation and deallocation. Factor out MessageWindowWidth(), MessageWindowHeight() functions. Make C functions static as appropriate, clean up some stylistic issues. Still need to make msg windows permit multi-line messages. Thu Jul 1 22:58:29 1999 Greg Badros * message-window.c: Fix alignment bug-- use manual sizes if desired before computing the position. Thu Jul 1 22:40:07 1999 Greg Badros * message-window.h: Added macros: MSGWINDOW_IMAGE(), VALIDATE_ARG_MSGWINDOW{,_COPY}. Added scwm_msgwindow struct members width, height, and bg_image. * message-window.c: Added background images, manual sizing. Clean up lots of argument handling (use VALIDATE_* macros), many bug fixes, documentation improvements. Thu Jul 1 22:23:07 1999 Greg Badros * image.c: Added MakeScwmImageFromImlibImage() helper. Use it in load-imlib-image, and for new `window->image' primitive for capturing a window's contents as an image. Thu Jul 1 16:28:00 1999 Greg Badros * xproperty.c: Use new VALIDATE_ARG_WIN_ROOTSYM_OR_NUM_COPY macro for `X-property-set!' * xmisc.h, xmisc.c: Added XColorFromPixel(). * window.h, window.c: Added VALIDATE_ARG_WIN_ROOTSYM_OR_NUM_COPY macro, make sym_root_window extern in header, not in window.c * scwm.c: Suppress msg about runing w/ --segv-reset-count 0 if the reset count is zero. * image.c: Improve warning message. * cursor.h: Added VALIDATE_ARG_CURSOR macro * cursor.c: Added `set-window-cursor!' and `create-pixmap-cursor', along with helper Pixmap1DeepFromPixmap. Thu Jul 1 10:02:05 1999 Greg Badros * face.c, colors.c: Added fixme comments re: gradient stuff using colorname strings instead of color objects. Wed Jun 30 10:39:15 1999 Greg Badros * image.h: Added VALIDATE_ARG_IMAGE macro * guile-compat.c: Added a /* scope comment */ Tue Jun 29 16:25:05 1999 Greg Badros * session-manager.c: #ifdef out all code if HAVE_LIBSM_LIBICE is not defined. (Thanks Stephen Tell!) Tue Jun 29 15:56:23 1999 Greg Badros * message-window.c (free_msgwindow): Print better debug message if a window is visible when it is freed; it shouldn't be as shown windows are protect-ed from GC, and unprotect-ed from GC only after they are hidden. Also, only do the checks #ifndef NDEBUG, and call UnmapMessageWindow instead of the higher-level message_window_hide_x procedure. * syscompat.c (setenv): Added, for platforms w/o setenv-- uses putenv (and hence #includes ) Tue Jun 29 15:14:08 1999 Greg Badros * scwm.c (AnnounceGnomeCompliancy): Added GNOME_SUPPORT_IN_C conditional directive to permit announcing GNOME support more quickly than the Scheme module gnome-hints.scm version of it. Not sure if it's necessary yet, so leave it off by default. * guile-compat.c: Added comment about where the memory leak is occurring for Maciej to fix it. Sat Jun 26 13:36:25 1999 Greg Badros * xrm.c, xproperty.c, window.c, message-window.c, image.c, face.c, events.c, decor.c, color.c, callbacks.c, binding.c: Use gh_free, instead of FREE, to free gh_scm2newstr allocated memory. * virtual.c: New variable `scroll-region'. Only raise pan frames if they are going to be used (cut down on interactions with x2x keyboard/mouse multiplexer). * font.c: Added comment. * system.h: Added gh_free macro, DEBUG_C_ALLOC instrumentations. * scwm.h: Drop SCROLL_REGION-- use var in virtual.c, now. * menu.c: Only free pmd->pmenu->pchUsedShortcutKeys if non-null. * events.h, callbacks.h: Use sys/select.h, for AIX (Thanks Jeff Nichols!) * constraint-primitives.cc: Use ClSolver *, not ClSimplexSolver * as arg to ScwmClvChanged. * callbacks.c: Added `reset-input-hook!' Sun May 9 14:37:54 1999 Greg J Badros * events.c: Invoke X-PropertyNotify-hook even when the property is deleted. Sun May 9 09:45:57 1999 Greg J Badros * shutdown.c (restart): Fix FREE(sz) that was in error (harmlessly, but still wrong). Thanks Jim Blandy! Fri May 7 08:34:34 1999 Greg J Badros * color.c: Use float.h, not values.h, and DBL_MAX, not MAXDOUBLE. Thanks Bob Pepin. Tue May 4 16:50:54 1999 Greg J Badros * events.c (HandleScwmExec): Mis-bracketed last change... doh! Tue May 4 16:16:30 1999 Greg J Badros * events.c (HandleScwmExec): If first XGetWindowProperty fails, then do not keep trying -- reset saved_bytes_after to 0 so it will exit. Not sure if this takes care of the problem I am seeing or not... Tue May 4 13:04:06 1999 Greg J Badros * color.h: Added borrowed field to colors to mark those colors that are borrowed from other applications and should not be freed by Scwm with XFreeColors (was getting a BadAccess X error message). * color.c: Do not XFreeColors if sc->borrowed (avoid BadAccess X error). Set borrowed in ClosestColor. Mon May 3 21:04:59 1999 Greg J Badros * window.c: Added `any-id->window' for getting the window from any window id of an application. Especially useful for mapping from emacs frame id-s to the scwm window object. Mon May 3 19:51:53 1999 Greg J Badros * window.c: Fix order of arguments in typechecking macros (thanks scwmdoc!) Mon May 3 15:49:32 1999 Greg J Badros * *.[ch]: Clean up vim lines at ends of files so the close comment "*/" is on the following line. Mon May 3 15:14:00 1999 Greg J Badros * miscprocs.c: #ifdef out `get-key-event' since I never finished getting it working and it does not work yet. Sun May 2 18:22:37 1999 Greg J Badros * window.c: Added missing BroadcastConfig calls to set_window_highlight_{foreground,background}_x, set_window_{foreground,background}_x * color.c: Added missing BroadcastConfig call when redrawing the highlight window from a global highlight color change. Sun May 2 15:26:01 1999 Greg J Badros * window.h: Re-introduce SCWMWINDOW to just be an accessor, and make PSWFROMSCMWIN return NULL if the valid flag is 0. SCWMWINDOW is used only as an lvalue right now, and should probably stay that way. This and the below fix a nasty race condition that I was finally able to reproduce reliably while playing with tooltips for XEmacs. * window.c (ScwmSaveContextPsw): Introduce this fn as a partial layer of abstraction over the setting of ScwmContext. Make it store the scwm_window *, not the ScwmWindow*. This fixes a nasty, pervasive race condition. Update PswFromWindow and PswFromAnyWindow to return NULL if the window is no longer valid. * add_window.c, icons.c: Use ScwmSaveContextPsw. Sat May 1 17:49:50 1999 Greg J Badros * window.c: Fix `stick' primitive again-- need to have sticky set properly before changing the window's position. (convert_move_data) fixed bug in not returning *pStart[XY] in virtual coords. Sat May 1 14:27:43 1999 Greg J Badros * window.c: Fix `stick' primitive to not do the modular arithmetic. This way making windows move when stuck. * window.c,resize.c,move.c,menu.c: Added #ifndef NOT_MORE_RESPONSIVE for conditionally turning off calls to NoEventsScwmUpdate outside the main loop (in case it is a stability issue... not sure yet). Sat May 1 13:42:22 1999 Greg J Badros * callbacks.c (force_new_input_hooks): Should have used gh_pair_p, not gh_list_p in change below. Wed Apr 28 19:59:05 1999 Greg J Badros * callbacks.c (force_new_input_hooks): Be sure SCM-s are lists before dereferencing. Not sure that it's necessary, but it is safer. 1999-04-28 Robert Bihlmeyer * borders.c (SetShape): Correctly check for title bar presence. (SetTitleBar): Relieve title bar even when squashed. (SetupFrame): NW corner was misplaced. Tue Apr 27 20:46:42 1999 Greg J Badros * callbacks.c (scwm_handle_error): Ugly hack to avoid a throw in DEREF_LAST_STACK in a desperate attempt to squash one of the bugs that seems to happen at random times in the hopes that Scwm won't crash when I demo it to RMS tomorrow. Sun Apr 25 19:49:23 1999 Greg J Badros * scwm.c: Change the format for printing X11 errors (only if not Xmu library) * callbacks.c: Added some comments for Maciej in scwm_handle_error. Drop the return SCM_BOOL_F, so that the hooks get called. We need to improve error hook documentation and handling before Scwm-1.0; I'd like to be able to generate the backtrace from the procs in the error-hook. We could pass the string to the error hook, or we may need to pass the stack object to the hook procedures. Sun Apr 25 18:49:16 1999 Greg J Badros * scwm-constraints.hpp: Use ClsMedium-strength stay constraints for frame width/height instead of just perturbing the weight to be greater than the x/y position. Prefer moving to resizing. Requires CVS version of Cassowary Sun Apr 25 16:16:53 1999 Greg J Badros * menu.c: Fix bug in menu-properties -- was using gh_scm2int instead of scmint2scm in creating list to return. * drawmenu.c: Make the HLTextColor default to the menu text color when menu-hl-fg-color is #f -- it was using black in error. Wed Apr 21 19:22:56 1999 Greg J Badros * color.c (ClosestColor): Added this new function, and use it in ScmMakeColor. Just does full search with a closeness metric, only operates for 8 bit (or fewer) display (I cannot test elsewhere now). Wed Apr 21 18:00:55 1999 Greg J Badros * window.c: Only mark set scheme objects (could've extended the area where interrupts were disallowed, too). Use XCURSOR_* macros to access global cursor objects instead of XCursorByNumber. * scwm.c: Call CreateScmGlobalCursors. * add_window.c move.c, menu.c, icons.c, focus.c: Use XCURSOR_* macros to access global cursor objects instead of XCursorByNumber. * cursor.c, cursor.h: Define XCURSOR macros, pscm_cursor_ vars, CreateScmGlobalCursors(). Fix bug in get_scm_cursor_by_number -- return SCM_BOOL_F, not SCM_UNDEFINED. Wed Apr 21 16:35:47 1999 Greg J Badros * window.c, window.h: Update order of args to ensure_valid, get_window. Drop FIXMS comment about the reordering of the arguments (I hope we agree on what the order should be!) Wed Apr 21 15:48:03 1999 Greg J Badros * *.c, *.h: Added vim modeline to end of file. Wed Apr 21 15:10:16 1999 Greg J Badros * cursor.c, cursor.h: Added * Makefile.am: Added cursor.[ch], cursor.x as appropriate. * window.h, window.c: Dropped enum_cursor; added the various window decoration cursors to the window structure, and mark them. (GrabeEm) takes Cursor, instead of enum cursor, same with (DeferExecution), (select-viewport-position). Switch order of first two arguments for select-viewport-position; move the cursor argument to the third position (from first) for get-window. * resize.c, move.c, menu.c, icons.c, focus.c, events.c, drawmenu.c, binding.c, virtual.c: Use XCursorByNumber instead of the Scr.ScwmCursors array. * add_window.c (AddWindow): Initialize cursor objects of window struct when creating a window. * validate.h: Added VALIDATE_ARG_INT_RANGE_COPY * scwm.h: Added ARRAY_SIZE macro and #include cursorfont.h * scwm.c: Call init_cursor(), drop CreateCursors(). * screen.h: Drop ScwmCursors array. Wed Apr 21 14:37:44 1999 Greg J Badros * cursor.h, cursor.c: Cursor object support from Toby Sargeant. 1999-04-19 Robert Bihlmeyer * xproperty.c (X-property-set!, X-property-get, X-property-delete): Also accept window ids. (X-properties): New function that lists all properties on a window. Mon Apr 19 13:04:40 1999 Greg J Badros * window.c (DeferExecution): Use eventp->xbutton.[xy]_root, instead of just .[xy]. This should report viewport positions even in decorations of the frame for `select-viewport-position', but untested. Mon Apr 19 10:17:41 1999 Greg J Badros * move.c: Convert ints to SCM in call3_hooks. Duh. Fri Apr 16 14:49:04 1999 Greg J Badros * move.c (InteractiveMove): Call the interactive_move_new_position_hook consistently with viewport coordinates and document it as such (the last call was using virtual coords). * image.c (free_image): Don't dereference through si if it's NULL, other safety tests. (Modified from James LewisMoss's 2nd patch to add the free-ing). Untested since I'm building without imlib for a while. Fri Apr 16 12:26:07 1999 Greg J Badros * callbacks.c: Added accessors to timer-hooks, input-hooks. Can we ensure that these aren't changed from the Scheme level? They're useful for debugging, but are probably problematic if messed with. * add_window.c: Move the creation of the window object a little bit later. Fri Apr 16 12:24:09 1999 Greg J Badros * image.c (free_image): Call Imlib_free_pixmap, Imlib_destroy_image if USE_IMLIB. Thanks James LewisMoss. Thu Apr 15 19:24:28 1999 Greg J Badros * events.c: Added `handle-pending-events'; this lets delete-multiple-windows-interactively work like a charm since the killed window can be removed from the display. This procedure would let Scwm have the main thread of control in Scheme, instead of C (not an explicit goal, just an off-the-cuff observation about its power). * window.c: Doc fix. * menuitem.c: Export `menuitem?' primitive Thu Apr 15 12:59:23 1999 Greg J Badros * *.c: Drop SCM_SETGC8MARK calls in mark functions -- gc hands objects to us already marked (thanks Greg Harvey for pointing this out!) * scwm.h: Call SCM_SETCDR before SCM_SETCAR in SCWM_NEWCELL_SMOB -- a bit safer, and will be fine when gc is changed as Greg Harvey suggests it might be. Wed Apr 14 15:09:12 1999 Greg J Badros * Makefile.am: Build fixes: added scwm-screen-ci.hpp to cassowary_headers, validate.h to noinst_HEADERS 1999-04-13 Robert Bihlmeyer * events.c (HandlePropertyNotify): Remove unnecessary setting of window-context before calling X-PropertyNotify-hook. Mon Apr 12 14:41:45 1999 Greg J Badros * colors.c: Couldn't -> could not. * color.c: Small memory leak on an error condition (not responsible for the leak Sam Steingold is seeing). Mon Apr 12 12:21:14 1999 Greg J Badros * winprop.c: Use VALIDATE_ARG_WIN_COPY, VALIDATE_ARG_SYM. * window.h: Added fFullyConstructed field, make "valid" of scwm_window a bool. Added SET_VALIDWIN_FLAG macro to change the value, instead of overloading the use of VALIDWINP as a setter and a getter. * window.c: Use SET_VALIDWIN_FLAG, not VALIDWINP when setting. Move #define FUNC_NAME "literal_string" to *after* the opening curly brace of the function definition so etags doesn't get confused (same change as made below to lots of files). Added `window-fully-constructed?', `window-mapped?', and `window-map-pending?' window state predicates. Fix set_window_internal_title_height to not call MoveResizeTo when the window is not fully constructed. * add_window.c: Move GetWindowSizeHints, GetMwmHints, GetOlHints before before-new-window-hook is invoked. Set fFullyConstructed after window is fully constructed. The before-new-window-hook is the only place where window-fully-constructed? should return #f for a window. Various C functions should probably be sure they are operating on fully constructed windows (as set_window_internal_title_height does now, see above). Also the #define FUNC_NAME patch (see below). * validate.h: Added VALIDATE_ARG_SYM. * scwm.h: Drop extra semi-colon from GC_MARK_SCM_IF_SET macro def. Mon Apr 12 10:18:52 1999 Greg J Badros * session-manager.c, scwm.c, resize.c, menu.c, log-usage.c, icons.c, face.c, events.c, drawmenu.c, borders.c, Grab.c: Move #define FUNC_NAME "literal_string" to *after* the opening curly brace of the function definition so etags doesn't get confused. N.B., the SCWM_PROC macro is a special case that etags is taught to recongnize via a regexp so the usage of #define FUNC_NAME can remain the same there. Sun Apr 11 19:23:26 1999 Greg J Badros * add_window.c: Ensure psw->buttons is initialized to 0 when constructing new window object. * menu.c: Doc fix. * decorations.c: Just set ScwmWindow's nr_{left,right}_buttons to Scr.nr_{left,right}_buttons for now. Not sure if we even use this any longer. * borders.c: Make CLeftButtons, CRightButtons really return the right number (used for sizing the titlebar, perhaps among other things). But do *not* use CLeftButtons/CRightButtons for the upper bound of loops over buttons -- CLeftButtons/CRightButtons is how many buttons are to be shown on each side, not the highest button numbers that might be shown. * resize.c: #include util.h for ms_sleep. Sun Apr 11 17:27:36 1999 Greg J Badros * move.c, resize.c, window.c: add a ms_sleep(10) when looping calling NoEventsScwmUpdate() so it blocks a little bit; we really need a better blocking mechanism. * events.c: Do not run input hooks when the server is grabbed -- causes GTk+ windows to hang if manual placement is used. * Grab.h, Grab.c: Add and export CServerGrabs, new primitive `X-server-grabs'. Updated some docs, fix some possible future races. Sat Apr 10 20:30:03 1999 Greg J Badros * drawmenu.c: Biggish rewrite of the menuitem flexibility stuff I implemented too quickly yesterday. Added HLBGColor, HLTextColor to MenuDrawingInfo-s, drop TextColor and font. Move TextColor and font into MenuItemDrawinInfo struct, and have that have a BGColor value, too. Manage all the drawing and color setting -- this code has too much optimization in avoiding GC manipulation; it cannot be *that* expensive to mess with GCs. Get the height of an item right based on the items font size -- do not assume they'll all be the same height. * menu.h: Added scmHLBGColor, scmHLTextColor to menus-- does not seem to make sense to let the highlight color change on a per item basis. Also added fHighlightRelief to permit turning off relieving if the highlight colors are to be used exclusively for indicating the selected menu item. * menu.c: Mark new objects, provide getters/setters: `(set-)menu-highlight-colors(!)', `(set-)menu-highlight-relief(!/?)' * color.h: Added SAFE_COLOR_USE_DEF and DYNAMIC_SAFE_COLOR_USE_DEF macros since I was thinking 0 was a valid out-of-range value for Pixels (but it's not-- it's often black! duh!) Sat Apr 10 17:16:30 1999 Greg J Badros * events.c (HandlePropertyNotify): Call the X-PropertyNotify-hook on all property changes by pulling that code outside of the default clause of the switch, and out to just after the switch statement. Wierd setting of the window context before the hook invocation-- what's this all about? Added GJB:FIXME:MS: comment. Fri Apr 9 17:05:02 1999 Greg J Badros * menuitem.h, menuitem.c: added scmBGColor scmFGColor scmFont fields, and mark them and provide getter/setters for them. * drawmenu.c: Use the menuitem bg,fg color and font if they are set for each menuitem, otherwise use the menu defaults. (Similar changes to draw-xpm-menu.c). Fri Apr 9 12:14:38 1999 Greg J Badros * menuitem.c: Fix bug I just introduced. * menu.c: Make some code a bit more robust w.r.t. NULL ptrs. Fri Apr 9 10:56:30 1999 Greg J Badros * window.c: Fix typo in FUNC_NAME def. * validate.h: Added VALIDATE_ARG_PROC_* macros. * menulook.h: Added VALIDATE_ARG_MENULOOK_OR_SYM macro * menulook.c: Renamed menulook? to menu-look? for consistency. Added a bit more documentation to the Menu Looks concept. * menuitem.h: Added VALIDATE_ARG_MENUITEM* macros. * menuitem.c: Use VALIDATE_ARG_ macros to simplify funcs. * menu.h: Added VALIDATE_ARG_MENU_* macros * menu.c: Rename the menu_menu functions to only include "menu" once (corresponds to change in base.scm where, e.g., set-menu-font! is changed to set-default-menu-font!). Use VALIDATE_ARG_* macros to simplify funcs. Added set-menu-colors!, set-menu-font!, set-menu-side-picture!, set-menu-background-picture!, set-menu-extra-options!. Fixed bug w.r.t. a null pmiim getting used. * image.h: Added VALIDATE_ARG_IMAGE_* macros * font.h: Added VALIDATE_ARG_FONT_* macros * color.h: Added VALIDATE_ARG_COLOR_* macros * borders.c, events.c: Drop SQUASHED_TITLEBAR_P abstraction-- just access psw->fSquashedTitlebar directly (the macro was poorly named as it accessed a psw, not an SCM). Thu Apr 8 17:40:27 1999 Greg J Badros * window.h: Added tbar_right field since SetBorderX now needs it and it's computed in SetupFrame. BE SURE TO REBUILD ALL MODULES AFTER THIS CHANGE! * window.c: Comment an empty if conditional. Twiddle a shaded & squashed setup-frame parameter. * borders.h: Expose SetShapedTitlebar -- animated-window-unshade needs it. * events.c: ResizePswToCurrentSize when squashed titlebar and the window title changes (since the titlebar may need adjusting). * borders.c: Make squashed titlebars look a bit nicer-- uses the top side as just above the client area (instead of above the titlebar), gets the top-right corner correct, turns off relieving of the title bar, and sizes the shaped window appropriately. Also relieves the top side only from the end of the title bar over to the right. Should be no change for non-squashed-titlebar windows. Fix the shaped window for squashed titlebars to not include the window frame if the window is shaded. * resize.c: Resize properly when grabbing the NE corner of a squashed window. Also round when constraining the size to the client units, instead of truncating (better behaviour even for non-squashed windows). Sun Apr 4 01:04:42 1999 Carl R. Witty * events.c (HandleClientMessage): Add missing break. * face.c (add_spec_to_face_x): Allow a button style pixmap of 'mini-icon as well as 'mini-program-icon (as documented). Thu Apr 8 14:11:10 1999 Greg J Badros * borders.c, windows.c: Dropped some spurious "puts" calls (presumably from old debugging code from Maciej's set-window-property changes?) 1999-04-07 Sam Steingold * window.c ("set_squashed_titlebar_x!"): removed a spurious `printf'. 1999-04-07 Robert Bihlmeyer * session-manager.c (setSMProperties): Support xsm's broken idea of SmDiscardCommand. Wed Apr 7 17:40:14 1999 Greg J Badros * window.c (DeferExecution): make DBG msg into DBUG macro so it compiles away (i.e., remove some debug output). Wed Apr 7 10:32:01 1999 Greg J Badros * scwm.c (scwm_main): Handle SIGFPE, too * resize.c (ConstrainSize): Be sure to not divide by zero. Added some warning messages if we would have so we can better track down the cause of the problem. * events.c (HandleLeaveNotify): Remove unused variable. Wed Apr 7 07:48:44 1999 Greg J Badros * xmisc.h, xmisc.c: Added WxGetWindowParent(). * window.h, window.c: Added PswFromAnyWindow() to return the ScwmWindow * from any of the child windows of the frame or the frame (not just the frame itself as PswFromWindow() does). Added select_window_enter_hook, select_window_leave_hook and invoke them when top-level windows are entered and left during `select-window-interactively-no-message' * menu.c (MenuInteraction): Update c10ms_delays after the first time through the loop so that a 0 delay for hover/popup works. * events.c: Fixed window_enter_hook, window_leave_hook-- these hooks were incredibly broken as they got the enter/leave notify events on the frame decorations, too, and called the hooks too often. Now I watch only for enter events and call the leave hook when a new window or the root window is entered. This gives much more useful behaviour (I can't imagine anything relying on the old calling pattern, but this would break any code that did). Tue Apr 6 12:51:52 1999 Greg J Badros * *.[ch]: Use highlight instead of hilite or hilight. Mon Apr 5 15:29:23 1999 Greg J Badros * scwm.h: Added protos for newhandler_doreset, newhandler scwmgtkhelper.c and miscprocs.c both use them. * scwm.c: Move fHandleSegv into a global so it can be used by scwmgtkhelper.c. Also drop the SIGNAL_FOR_RESET abstraction-- it was done sloppily anyway. Fri Apr 2 13:52:05 1999 Greg J Badros * scwm.c: Added arg to option --segv-cleanup-and-stop, and rename to --segv-reset-count. Fix SigDoneSegv's message to talk about the proper name of the option. * binding.c: Permit CSM-Left, not just C-S-M-Left. (Motivated by its simplifying the fvwm2rc-to-scwmrc converter a tiny bit, but this is the right thing for now -- ultimately keys should be first-class). Thu Apr 1 19:18:39 1999 Greg J Badros * window.c (s_destroy_window): Do not permit destroy if the window leader matches gh_lookup("gdk-leader-window") which gets set in (app scwm gtk) module (once I decide to check that code in-- probably not until after guile-gtk-0.16 if that has my patch). * session-manager.h, session-manager.c: Remove interning of XA_WM_CLIENT_LEADER -- now done in scwm.h * scwm.h: Added extern Atom XA_WM_CLIENT_LEADER -- needed for destroy-window to protect gtk windows using their client-leader * scwm.c: Intern XA_WM_CLIENT_LEADER atom. Change fResetOnSegv from a bool to segvs_to_reset, a count of the number of segvs that will result in a result (permits looping segvs to dump core instead of doing really ugly things). * miscprocs.c: set-reset-on-segv! now takes an integer, not a bool. Added getter `reset-on-segv'. Added `X-connection-number'. Wed Mar 31 16:56:18 1999 Greg J Badros * */*.c: Use SCM_UNSPECIFIED, not SCM_UNDEFINED as the return value for side-effecting procs-- lots of latent bugs fixed! Use SCWM_WRONG_TYPE_ARG( instead of scm_wrong_type_arg(FUNC_NAME. * validate.h: Added string validation macros. * scwm.h, scwm.c: Fix char * args to const char *. Updated usage message for --nobacktrace option. Fixed short arguments, Added reset_signal_handler() and newsegvhandler() protos since miscprocs.c now uses them. Added -p/-P options to manage what to do with segvs. Do not do a newhandler_doreset(..) until after sigsetjmp has been called, and use newhandler_doreset for SIGINT, too. * miscprocs.c: Added `force-segv-for-testing!', `set-reset-on-segv!', `set-handle-segv!' primitives. * image.c: validate path_expand_image_fname args using new VALIDATE_ARG_STR* macros. * binding.h, binding.c: Added fShowError arg to FKeyToKeysymModifiers, honour it (`keysym->keycode' primitive shouldn't display warnings about bad keysyms as it can now be used to test validity of a keysym). Validate these procs args better. * shutdown.c: reset_signal_handler(SIGSEGV) before generating the segfault to get the backtrace after cleaning up. Tue Mar 30 20:09:59 1999 Greg J Badros * events.c: Fix bug that scwmdoc caught in argnumber on a VALIDATE call. * window.c, face.c: Added use of new scwmdoc-understood /*SCWM_VALIDATE*/ comment pointing out what the argument list is. This isn't perfect as it's redundant with the prototype, but it's a quick fix (and already helped me catch one bug in face.c. Also start using SCWM_WRONG_TYPE_ARG, instead of scm_wrong_type_arg when the function is FUNC_NAME. Tue Mar 30 19:35:06 1999 Greg J Badros * validate.h: Added -- contains VALIDATE macros for built-in types. * scwm.h: Remove COPY_* macros-- changed to VALIDATE_* macros and move to validate.h. Added ARG_IGNORE, ARG_UNUSED macros * window.h: Move VALIDATE_* macros to top, and comment them; added some new ones, remove old stuff. * color.h: Move VALIDATE_* macros to top, added VALIDATE_ARG_COLOR_COPY_USE_BLACK macro. * window.c: Use VALIDATE_* instead of COPY_*. Fix bugs in set_squashed_titlebar_x (psw was never set), squashed-titlebar (validate arg, just in case). Annotated unused formals with new ARG_UNUSED or ARG_IGNORE macro. * scwm-constraints.cc: Drop formal names when arg is unused (this is C++ so that's the right fix here) * winprop.c, shutdown.c, session-manager.c, scwm.c, screen.c, message-window.c, menulook.c, image.c, icons.c, font.c, face.c, drawmenu.c, decor.c, color.c, callbacks.c, borders.c, : Annotated unused formals with new ARG_UNUSED or ARG_IGNORE macro. * binding.c: Annotated unused formals with new ARG_UNUSED or ARG_IGNORE macro. (keysym_to_keycode) return #f for bad keysym. #ifdef out some unused functions. * Grab.c: use scwm_msg, not fprintf. * miscprocs.c, menuitem.c, menu.c, deskpage.c,: Annotated unused formals with new ARG_UNUSED or ARG_IGNORE macro. Use VALIDATE_*, not COPY_*. * winprop.h: ws change. Mon Mar 29 20:38:02 1999 Greg J Badros * window.h: Define and use VALIDATE_WIN_USE_CONTEXT, VALIDATE_ARG_WIN_USE_CONTEXT, VALIDATE_ARG_WIN macros (replacing VALIDATE, VALIDATEN, and nothing, respectively, with arg order reversed), all using implicit FUNC_NAME macro as function name. * scwm.h: Added SCWM_WRONG_TYPE_ARG macro using implicit FUNC_NAME macro as function name. * color.h: Define and use VALIDATE_ARG_COLOR to replace VALIDATE_COLOR (arg order is reversed, FUNC_NAME is implicit). Drop unused, unneed VALIDATE_COLOR_OR_UNDEFINED, VALIDATE_COLOR_OR_NONE. * *.c: Update to use macros as above. Fix several bugs, make WIN parameter optional where it wasn't and update docs to reflect WIN defaults to the window context in the usual way if not specified. Mon Mar 29 14:33:33 1999 Greg J Badros * window.c: Doc fix to get-window-highlight-colors. * scwm.c: Move init_image() to as late as possible to defer imlib loading when it is used (also image-support of any kind is totally optionally, and nothing earlier could depend on this). * message-window.c: Added Jeffrey Nichols to the (C), since this is largely his code. Renamed ResizeWindow to ResizeMessageWindow for disambiguation. Added `id->message-window' primitive as a last resort in case a message window has no easy way to get a hold of its object. hide message windows when they are freed -- leaving one up that's been garbage-collected would be bad. * events.c: Replace an assert(False) with a warning about an unhandled format in a client message. Sam Steingold tripped this assertion. * color.c: Have ScmMakeColor return BLACK_COLOR instead of SCM_BOOL_F -- this was part of the point of my earlier reworking of this code, but I must've gotten sidetracked. Now, e.g., adjust_brightness will always get a valid color back, even if it's not the best one. Mon Mar 29 11:28:40 1999 Greg J Badros * window.c, window.h, events.c, : rename window_context variable to scm_window_context, rename get_window_context C primitive to window_context. * window.c: Added `window-valid?'. Thanks Eli Barzilay for the suggestion! * session-manager.c: doc fix. * miscprocs.c: FUNC_NAME fix. * face.c: Added note to Maciej re: add_spec_to_face_x (related to a scwmdoc false positive). Mon Mar 29 10:30:17 1999 Greg J Badros * deskpage.c (s_set_edge_scroll_delay_x): Document as ms, not usec, and use COPY_INTEGER_WITH_DEFAULT_OR_ERROR for arg processing. (edge-scroll-delay): updated doc. Mon Mar 29 08:18:08 1999 Greg J Badros * binding.c (s_bind_key): Doc fix -- grammar + remove trailing extraneous \". Thanks Eli Barzilay! Sun Mar 28 20:09:38 1999 Greg J Badros * virtual.c (notify_edge_enter, leave): Fix bug 'east <-> 'west. Thanks Eli Barzilay! Sun Mar 28 20:08:02 1999 Greg J Badros * color.c: Separate make_color into ScmMakeColor, and argument processor. Have ScmMakeColor set an error status, but always return a legitimate color if it returns. Use ScmMakeColor from C code instead of make_color. Sun Mar 28 18:23:21 1999 Greg J Badros * window.c (DeferExecution): Call NoEventsScwmUpdate() in the local select-a-window event loop. Comment for the return values of convert_move_data. * resize.c, move.c: Call NoEventsScwmUpdate() in the local move/resize event loops. * menu.c: Call NoEventsScwmUpdate() in the local menu-interaction event loop. * events.h, events.c: Split new NoEventsScwmUpdate() function out of NextScwmEvent function so other event loops can call it. This makes scwm more responsive during those local event loops. E.g., timer hooks can get executed while a menu is popped up, or a window is being resized, etc. I expect some bugs will be exposed by this change, but it's the right thing, and we might as well fix those bugs now as they'll be a problem for the post-1.0 event rewrite. * scwm.c: Use sigsetjmp/siglongjmp to catch the SIGHUP signals more reliably for me (has setjmp behaviour changed in the new glibc?). Warn on signal returning SIG_ERR. * miscprocs.c: Added a scwm_last_timestamp. (Was for debugging, but very small and maybe worth having around). Fri Mar 26 14:21:06 1999 Maciej Stachowiak * scwm-snarf.h (SCWM_PROPERTY_HANDLER): New snarf macro. * window.c: Use it. Fri Mar 26 12:56:31 1999 Maciej Stachowiak * callbacks.h, scwm-snarf.h (SCWM_HOOK, SCWM_GLOBAL_HOOK): SCMW_HOOK now lives in scwm-snarf.h and is a proper magical snarf macro like SCWM_SYMBOL, SCWM_PROC, etc. This should reduce unnecessary redundancy in the source and improve consistency. * add_windows.c, borders.c, callbacks.c, constraint-primitives.cc,, deskpage.c, events.c, icons.c, image.c, module-interface.c, move.c, resize.c, shutdown.c, virtual.c, window.c, window.h, winprop.c: Move instances of SCM_HOOK to the tops of files, where they now belong. 1999-03-26 Maciej Stachowiak * window.c, window.h, events.c: Fix random brokenness from last checkin, handle squashed-titlebar as a window-property isntead of an object-property, and use set_property_handler to automagically redraw the window properly when the property changes. * winprop.c: Remove unnecessary debugging input. 1999-03-25 Robert Bihlmeyer * borders.c (SetShapedTitlebar): Would not detect window w/o title correctly. 1999-03-25 Maciej Stachowiak * winprops.c, winprop.h (set_property_handler): New function allows C code to intercept property changes and reads through `set-window-property!' and `window-property' for specific properties. If a property change is intercepted this way, the called setter is responsible for sending a property_change notification. * scwm.c: call init_winprops before init_window. * window.c: use set_property_handler for the 'sticky window property as an example. Thu Mar 25 17:57:09 1999 Greg J Badros * NOTE TO DEVS: Consider configuring with newish --enable-warnings option. I fixed lots of problems that this caught for me. (Option may be gcc-specific) * window.h: Added protos for Decoration{Width,Height}, comment for psw->buttons field. * window.c: Drop Root argument from RedrawOutlineAtNewPosition. Added `force-reset-window-frame!'. Update comment on `set-window-button!' since it's working a bit better, and force it to redraw, and simplify it a bit. * virtual.c, deskpage.c: Drop last arg from MoveViewport_internal, MoveViewport; fix some warnings. * session-manager.c: Fix warning re: unused var. * scwm.h: Added COPY_INTEGER_WITH_DEFAULT_OR_ERROR, COPY_INTEGER_OR_ERROR macros -- should use these more pervasively for error checking. * scwm.c: Added --no-backtrace option; rename "nonsense" unused params to "ignored"; drop unused var. * scwm-constraints.h, scwm-constraints.cc: Drop last arg (fGrab) from ChangeVirtualPosition. * resize.h, resize.c: Drop first arg (root) from RedrawOutlineAtNewPosition. Fix some uninit vars. Fix some doc strings. Fix bug: make InteractiveResize actually set its "out" parameters with the final width/height. * placement.c: Added missing return. * move.c: Use new RedrawOutlineAtNewPosition, RemoveRubberbandOutline with 1 fewer args. * menuitem.h, menuitem.c: Added fIsForcedSubmenu field, use it, print it, added submenu_p option to ctr. * menu.h, menu.c: Added cmsPopupDelay, cmsHoverDelay fields. Added setters, getters. Drop some #if 0 code. Fix bug in popup-delay not getting invoked if hover-delay was less than popup-delay. Fix bug in initial menuitem not getting selected until a mouse move, even if it was initially under the pointer (thanks to Warwick Harvey for this bug report). Have MenuInteraction return the menu item instead of the action. Honour fIsForcedSubmenu when doing popups, drawing of submenu arrow, etc. Drop redundant derefs of menu symbols (soon can drop menu symbol stuff altogether, probably). * icons.c: drop unused vars, minor code formatting. * guile-compat.c: drop unused var. * face.c: Added CONCEPT section for "Window Style" -- very brief placeholder for improvements to scwmdoc to extract the window style options. * events.c: #include , minor formatting, fix uninit var, add failure on missed switch. * decorations.c: drop unused code, minore formatting. * borders.h, borders.c: Added CLeftButtons, CRightButtons (now they just return Scr._nr_left/right_buttons, but they are used semi-appropriately and alternative untested definitions exist -- trying to get the button decoration behaviour more reasonable). Do not draw a button (and unmap it) if it is suppressed -- title bar still doesn't cover the hole. * binding.c: Drop some unused vars. * add_window.c: #include events.h, focus.h for their prototypes. Drop last arg from MoveViewport_internal, ChangeVirtualPosition. Fix bug in possibly calling XDeleteContext on None. Wed Mar 24 19:14:06 1999 Greg J Badros * color.c: Drop some #if 0 code in make-color; we perhaps should make failed color creations (when palette is full, e.g.) return a closest-match, or have a make-closest-color that does so. It'll be a pain to fix all the code that assumes make-color isn't going to throw. Tue Mar 23 11:36:04 1999 Greg J Badros * image.h, image.c: Use imlib if USE_IMLIB is set. This removes the load-xbm, load-xpm primitives, and replaces them with a new load-imlib-image primitive. That new primitive is then the only image loader registered by default. Patch from James LewisMoss. * scwm.c: Call init_image() later, after the display has been opened, since the new optional imlib code needs the display opened for its initialization. (Patch from James LewisMoss, though I removed the conditionals as the xbm/xpm init_image() works fine later, too). 1999-03-22 Robert Bihlmeyer * session-manager.c (setSMProperties): Add GsmPriority prop. (restoreWindowState): Would make most window start iconic erroneously. Mon Mar 22 18:57:23 1999 Greg J Badros * callbacks.h, callback.c: Added some extra prototypes, prepare for support for new hooks, but #if 0 it out. * scwm.c: Added back the setting of *suppress-old-style-hook-warning* since new hooks aren't close to right yet, and probably not worth supporting -- I fixed a bug in reset-hook! instead that was the root of my problems. Mon Mar 22 18:39:45 1999 Greg J Badros * *.[ch]: Clean up FIXGJB comments to use the new format * window.h, window.c, add_window.c, add_window.h: Remove fWindowListSkip, fCirculateSkip, fCirculateSkipIcon as these are no longer used. Move DestroyScwmWindow, window_close_hook into add_window.c. * util.c: Drop call_thunk_with_message_handler. * scwm.c: Do not use a static buffer size of 1024 for reporting M_FVWM_ERROR module messages-- dynamically allocate and FREE the buffer using the length as determined by the printing to stderr. * scwm-constraints.hpp: Increase the weight of stays for each window added. * scwm-constraints.h, scwm-constraints.cc: Added CassowaryCloseWindow. * resize.c, move.c: Have rubber-band-resize, opaque-resize return the new size of the window instead of unspecified. Have rubber-band-move, opaque-move return the new viewport position of the window instead of unspecified. * move.c: Drop old version of SnapCoordsToEdges. * miscprocs.h: Removed (no longer refer to recapture primitive from C code). * miscprocs.c: Remove wait-for-window primitive -- it's dangerous and worthless. * guile-compat.h: Drop #define of scm_make_vector Mon Mar 22 14:06:41 1999 Greg J Badros * winprop.c, window.c, virtual.c, shutdown.c, resize.c, move.c, image.c, module-interface.c, icons.c, events.c, deskpage.c, constraint-primitives.cc, callbacks.c, add_window.c: Fix calls to SCWM_HOOK macro to pass the additional argument. * callbacks.h: Add extra arg (the # of args) to SCWM_HOOK, and use scm_make_named_hook if HAVE_SCM_MAKE_HOOK. (i.e., handle new style Guile hooks -- new == >1.3) * scwm.c: Do not set! the *suppress-old-style-hook-warning* variable as new-style hooks are now properly handled (I hope, but largely untested). * menu.c: Fix documentation bug -- do not use in a doc comment as that is an sgml tag. 1999-03-21 Robert Bihlmeyer * window.c (s_restack_windows): Save one PSWFROMSCMWIN call. Fri Mar 19 15:09:18 1999 Greg J Badros * binding.c: Make context_strings global so it can be closer to its parallel array binding_contexts, and make frame-corners and frame-sides the preferred symbol names for those contexts ('corners and 'border are no longer usable, but few, if any, were using them). Added some docs to the Event Contexts concept, but they are horribly incomplete. Fri Mar 19 08:56:12 1999 Greg J Badros * add_window.c: Updated docs for the hooks. 1999-03-18 Robert Bihlmeyer * session-manager.c (doneSM): Check first. (initSM): Took registering with SM out. (SM-register): New scheme primitive that registers with the SM. (SM-client-id): Deprecated. Thu Mar 18 10:28:04 1999 Greg J Badros * events.c (HandleMapRequestKeepRaised): Restore pswCurrent's old value after invoking hooks. An attempt to fix bug Robert B. noticed when starting a gnome-panel. Thu Mar 18 09:05:15 1999 Greg J Badros * xrm.h, log-usage.c: Added include config.h Wed Mar 17 18:37:16 1999 Greg J Badros * scwm-screen-ci.hpp, scwm-constraints.hpp,scwm-constraints.cc, constraint-primitives.cc,: Include "Cl.h" and "cassowary_scm.hpp" from the $prefix/include directory, instead of from the cassowary build directory. Wed Mar 17 12:47:45 1999 Greg J Badros * window.c (DeferExecution): Added two extra args to return the location of the click selection. Moved the prototype closer to the beginning of the file. Replace `select-window' primitive with `select-viewport-position' primitive that returns the position of the click as well as the window selected. `select-window' is now a proc in base.scm. Replace calls to select_window C primitive with "gh_car(select_viewport_position(..))" to just return the window. Remove invocations of the invalid-interaction-hook from DeferExecution. Instead do that only in `get-window' if select-viewport-position returned #f for the window. * move.c: Added note to comment for Keyboard_shortcuts. Wed Mar 17 10:45:50 1999 Greg J Badros * virtual.c: Handle the EDGE_NONE case in notify_edge_enter, notify_edge_leave. Remove unused vars in HandlePaging. Wed Mar 17 10:45:16 1999 Greg J Badros * window.h: Added list_stacking_order prototype as this is used by the rebordering code. Tue Mar 16 16:38:55 1999 Greg J Badros * constraint-primitives.cc, scwm-constraints.cc, scwm-constraints.h, scwm-constraints.hpp, scwm-screen-ci.hpp: Renamed cassowary calls to match revised identifier names for cassowary/qoca API merge. Mon Mar 15 16:59:43 1999 Greg J Badros * scwm.c (SigResetLoop): Added a scwm_msg for when a reset-signal is received. Fri Mar 12 14:44:33 1999 Greg J Badros * window.c: Added DecorationWidth, DecorationHeight, DecorationXOffset, DecorationYOffset, ClientWidth, ClientHeight functions, and use them instead of inline math. Also introduce use of __inline__ (expands to nothing #ifndef __GNUCC__). Improve docs on window-size, window-frame-size to refer to each other. * shutdown.c: Use new XA_SCWM_RESTARTING, and set that property to "scwm-restart" before restarting scwm (done before run_restart_command because we must do it before the X connection is closed). Also replaced a use of inline with __inline__ since the former is a GNU CCism. * scwm.h: Added #define of __inline__ to nothing if needed. Added XA_SCWM_RESTARTING, update other extern Atom decls. * scwm.c: Added XA_SCWM_RESTARTING, removed extern XA_WM_PROTOCOLS (already done in scwm.h). Added SetRestartingGlobal() to check XA_SCWM_RESTARTING property (set just before run_restart_command). My WM_DESKTOP property is set on the root window even when Scwm is not restarting itself, but this reliably works for me. * resize.c: Convert dragWidth, dragHeight to application (client) window size before coverting to client units. Improve docs of interactive_resize_new_size_hook. * move.c: Doc update to interactive_move_new_position_hook * ICCCM.c: Drop an Intern that's guaranteed to already be done. * callbacks.c: Replace inline with __inline__ to remove dependence on GCC. Wed Mar 10 20:15:57 1999 Greg J Badros * binding.c (s_bind_key): Replace RELEASE_PROC in documentation with RELEASE-PROC (_'s in function args turn into dashes in documentation of the primitive) Wed Mar 10 19:58:09 1999 Greg J Badros * resize.c: Fix bugs in calls of interactive_resize_new_size_hook, interactive_resize_start_hook. The wrong numbers were being passed in. * constraint-primitives.cc: Updated for version >= .3 of Cassowary. Use ClVariable-s as handles instead of using pointers to ClVariable. 1999-02-28 Maciej Stachowiak * binding.c, binding.h: Allow release procedures with `bind-key' as with `bind-keycode'; provide `*-' prefix to key/mouse specs to indicate AnyModifier; provide some more intutitive aliases for several binding contexts: 'client-window, 'root-window, 'border and 'corners, as well as better names for the buttons, i.e. 'left-button-1, 'right-button-3, etc. * events.c: Make sure synthetic event key and mouse specs don't allow AnyModifier. * events.c: Make window-leve-hook pass the window as an argument. 1999-02-27 John Kodis * events.c (HandleEnterNotify): run window-enter-hook functions. (HandleLeaveNotify): run window-leave-hook functions. (init_events): set up the window-enter- and window-leave- hooks. 1999-02-11 Maciej Stachowiak * window.c: Added new primitive icon-size which takes a window and returns the size of the icon (including both the image and the icon title). * window.c: Fixed minor bug in `resize-to' in computation of size adjustment (only was broken for no-side-decoration windows). Also made sym_shaded and SendClientConfigurNotify have external linkage for the benefit of the c-animation module. 1999-02-10 Maciej Stachowiak * virtual.c (GenerateEdgeEvents): New function which checks the pan frame state and generates appropriate invocations of `edge-enter-hook' and/or `edge-leave-hook'. (HandleEvents): Invoke `edge-scroll-hook' when edge scrolling happens. This hook is temporary. (checkPanFrames): Always leave the pan frames mapped. * virtual.h: prototype GenerateEdgeEvents * events.c, move.c, resize.c: Vall GenerateEdgeEvents as appropriate. * borders.c: Fix all remaining visual glitches when using no-side-decorations, both mwm-border and regular. (As far as I can tell). 1999-02-09 Maciej Stachowiak * borders.c, colors.c, errors.c, window.c: Do not use gh_symbol2scm, instead declare appropriate sym_ variables wherever appropriate. * Makefile.am: Handle borders.x, errors.x * borders.c: Fix numerous visual inconsistencies when using `no-side-decorations'. Nearly all should be fixed, a handful remain in the case where both mwm-border and no-side-decorations are on. * xproperty.c (s_X_property_set_x): Deal apropriately with zero-length property values (D'oh!). Bug report from Sam Steingold. 1999-02-08 Maciej Stachowiak * virtual.c, window.c, window.h: Abstract out notification of new desk for a window; notify of new window for desk when moving sticky windows during a desk change. * winprop.c, winprop.h: New files, generic window property handling moved here. Notification of window property changes set up through `window-property-change-hook'. Eventually, notification will be smarter and it will be possible to register for notification on only a specific property or only a specific window. * window.c: Add change notification for `sticky', `shaded', `on-top' and `desk' window properties through `window-property-change-hook'. Others will be added over time. * scwm.c: Call init_winprop() * Makefile.am: Handle winprop.c, winprop.h, winprop.x 1999-02-08 Maciej Stachowiak * window.c (MovePswToCurrentPosition): Don't move windows that are sticky but off screen, the gnome panel actually wants to do that sometimes for some reason. * deskpage.c: Added `desk-size-change-hook'. * virtual.c: Added `viewport-position-change-hook'. * window.c: New hook `close-window-hook' invoked when a window closes for any reason. * events.c: Pass window (or 'root-window or #f if unrecognized) based on Event.xclient.window to client-message-hook. Fri Feb 5 20:39:37 1999 Maciej Stachowiak * binding.c (remove_binding): Ungrab key when removing a binding. Fixes some annoying bugs for me. This might trigger latent bugginess with respect to key bindings that exist separately for different contexts but I don't have time to fix that now (exists for mouse bindings too, it seems). 1999-01-30 Maciej Stachowiak * borders.c (SetBorderX): Do not try to draw when the border width is zero, to avoid certain visual glitces. * decorations.c (SelectDecor): Correct handling of "no titlebar" hints. * events.c: Add `X-MapRequest-hook' - various protocols require updates from various hints each time the window maps. 1999-01-27 Robert Bihlmeyer * session-manager.c (SavePhase): New variable. (saveYourself): Enter phase 1. (saveYourself2): Go from phase 1 to phase 2 on entry, reset phase on exit. (shutdownCancelled): Cancel save if phase 2 was not reached. Tue Jan 26 15:34:17 1999 Greg Badros * menulook.c, menu.c, ICCCM.c: Changed some doc comments. 1999-01-26 Sam Steingold * Makefile.am (noinst_HEADERS): do not use `+='. Mon Jan 25 17:36:52 1999 Greg Badros * window.c, window.h: Added window_pixel_size_to_client_units to support conversion to client units since that code is now needed by the resize hook as well as the `window-size' primitive (rewrote the latter to use it). * resize.c: Added args to interactive_resize_new_size_hook to support reporting position and client-unit sizes, as well as pixel sizes. * callbacks.c: Added scwm_safe_callN, callN_hooks for 4<=N<=7. Mon Jan 25 10:27:31 1999 Greg Badros * window.c (s_deiconify): Permit deiconify to be given a virtual position to deiconify the window to. This permits supporting a deiconify-to-current-viewport function * icons.c: Fixed a couple of comments. Sat Jan 23 16:35:02 1999 Greg Badros * xrm.c, xproperty.c, window.c, message-window.c, menulook.c, menuitem.c, menu.c, image.c, face.c, decor.c, color.c, callbacks.c, binding.c, ICCCM.c: Replace uses of iarg with literal numbers, and fixed numerous bugs of mismatching argument number and name. Sat Jan 23 10:48:39 1999 Greg Badros * menu.c (PopdownMenu): Only invoked the unhover-action if the hover action had been invoked. Fri Jan 22 15:52:10 1999 Greg Badros * menu.c (MenuInteraction): Added MENUSTATUS_NEWITEM_HOTKEY for hotkey-based newitem actions to use to differentiate between shortcut keys to select items and keys to just maneuver the menus Fri Jan 22 08:52:07 1999 Greg Badros * constraint-primitives.cc (s_scwm_set_master_solver_x): Added trailing "!" to scwm-set-master-solver!. Added `scwm-master-solver' procedure to avoid requiring access to a global variable from the simple-constraints module Thu Jan 21 12:06:19 1999 Greg Badros * icons.c: Added second arg (was-iconified?) to handlers called by iconify-hook and deiconify-hook. This lets the hook act only on changes in iconification state (avoids an infinite loop in kwm-emulation by setting an iconified X property which causes iconification, which causes the re-setting of the property, and so on. Wed Jan 20 10:45:49 1999 Greg Badros * message-window.c (s_make_message_window): Move FIXME comment out of doc comment so doc extract warning disappears. Tue Jan 19 13:11:46 1999 Greg Badros * events.c: Added X-root-PropertyNotify-hook and invoke it as appropriate. This provides some missing low-level support for managing communication w/ kwm modules. * menu.c: Added fMenuHotkeysActivateItems, set-menu-hotkeys-activate-item! menu-hotkeys-activate-item? primitives, and honour them when handling shortcut keys during menu-interaction "mode". Permit XK_space to activate a menu item, too. Default behaviour has changed so that the keypress activates the item (ala fvwm2, Win95, etc.). Thanks Juha Pohjalainen, Sam Falkner for the feedback leading to this change. Mon Jan 18 20:13:54 1999 Greg Badros * ICCCM.c (s_send_client_message): Added send-client-message primitive to permit KWM-like (and probably gnome-like) client messages to be sent from the scheme level. Added init_ICCCM() since this is the first primitive ICCCM exports * events.c (HandleClientMessage): Add and invoked client_message_hook-s * callbacks.h, callbacks.c: Added FEmptyHook() predicate for use when the preparation of args for the hook is expensive * Makefile.am, scwm.c: Added ICCCM.x, call init_ICCCM() from initialization code. * xproperty.c (X-get-property, X-set-property!): permit atoms (longs) to be used for the name, instead of only allowing strings. Mon Jan 18 13:05:21 1999 Greg Badros * window.c, message-window.c, menu.c, constraint-primitives.cc, callbacks.c: Fixed some doc warnings; correct some mistaken uses of iarg++ (used in conditionals so they did not always execute) * binding.h: Drop field "Action" from struct Binding, add ReleaseThunk for the key release event * binding.c: (add_binding) Correct bnum_or_keysym to bnum_or_keycode, use release_proc too; (GrabButtons) Drop test of BINDING->Action since that field is now gone; (keysym_to_keycode) added; (bind_keycode) added -- lower level interface to key bindings that permits specifying release procedures; (mod_mask_shift, mod_mask_control) added -- these were missing and are needed for completeness * icons.c: Drop test of BINDING->Action since that field is now gone * events.h, events.c: Added HandleKeyRelease(), generalize HandleKeyPress to HandleKeyEvent, drop checks of BINDING->Action (I eliminated that field) Fri Jan 15 14:14:05 1999 Greg Badros * decor.c, screen.c, face.c (print_XXX): Use scwm_ptr2scm instead of gh_int2scm or gh_long2scm -- abstracts out the size of a pointer to fix problems with 64-bit machines. * scwm.h (scwm_ptr2scm): Added this macro to abstract out the size of a pointer -- for now just use long. Fri Jan 15 10:43:21 1999 Greg Badros * menu.c (MenuInteraction): Guard derefs of pmiim in case no item is yet selected-- fixes bug reported by Sam Falkner whereby bringing up a menu via a keyboard shortcut and immediately pressing resulted in a core dump. Thanks Sam! 1999-01-14 Todd Larason * session-manager.c (doneSM, setSMProperties): Split variable declaration and initialization to make non-gcc compilers happy. Standard C only allows constants in initialization functions. Thanks to Sam Falkner for the good bug reports. Mon Jan 11 08:36:14 1999 Greg Badros * scwm.c: Added newhandler_doreset(..) and SigResetLoop(..) to use setjmp/longjmp to make SIGHUP signals cause Scwm to revert to the main event loop. A software-hung Scwm (e.g., in an infinite loop of scheme code) can be reset by using "kill -1 [scwm-process-id]". Not for ordinary use, but is incredibly handy in emergencies. Mon Jan 11 22:34:52 1999 Maciej Stachowiak * xrm.c: Added proper copyright notice. Sat Jan 9 11:29:40 1999 Greg Badros * window.h, window.c: Use const char * for func_name arg of ensure_valid and convert_move_data (gives warnings on guile-1.3, but the warnings are guile's fault, not ours). Also rename subr, func to "func_name" to make more clear the argument is for error messages Wed Jan 6 07:59:03 1999 Greg Badros * scwm.c (scwm_main): Added missing parenthesis inside an evaluated string #ifdef HAVE_SCM_MAKE_HOOK. Thanks Shuji Narazaki! 1999-01-05 Robert Bihlmeyer * add_window.c: Forgot to check for SM before including session-manager.h. Thanks to Stephen Tell for the report. Sun Dec 27 13:55:09 1998 Maciej Stachowiak * placement.c, placement.h, add_window.c: Unify desk selection with window placement, so windows starting on other desks will not necessarily trigger a desk switch. Expose the default desk selection algorithm (which does still always switch) as `place-on-default-desk'. This area probably needs more work later. * guile-compat.c (scm_internal_cwdr_no_unwind): Temporarily add this version of scm_internal_cwdr which does not unwind existing winders. * callbacks.c: Use scm_internal_cwdr_no_unwind in place of scm_internal_cwdr throughout. This allows `dynamic-wind's to safely be wrapped around calls to primitives that make callbacks or invoke hooks. Mon Dec 21 07:32:28 1998 Maciej Stachowiak * icons.c (AutoPlace): Stop treating sticky windows differently for purposes of icon placement. I'm not sure what the old code was trying to do, but what it was actually ending up doing was definitely wrong. Thanks to Arturo Perez for reporting this bug and Albert L. Ting for clarifying the problem. Sat Dec 12 00:09:50 1998 Carl R. Witty * color.c (Shadow and Highlight Factors): New concept doc. * Grab.c (s_X_ungrab_server): Rewrite doc. * xproperty.c (s_X_property_set_x): Rewrite doc. * window.c (s_window_deletable_p): Rewrite doc. (s_window_shade): Typo fix in doc. (s_window_size_hints): Typo fix in doc. * miscprocs.c (s_wait_for_window): Update doc. * window.c (s_set_window_context_x): Rewrite doc. (s_get_window): Rewrite doc. * color.c (s_set_hilight_foreground_x, s_hilight_foreground, s_set_hilight_background_x, s_hilight_background): Rewrite docs. * face.c (s_set_face_flag_x): Update doc. * scwm.c (scwm_main): Typo fix in comment. * window.c (s_window_property): Typo fix in doc. * deskpage.c (s_set_edge_move_threshold_x): Rewrite doc. * window.h, window.c, resize.c, borders.c, add_window.c: Eliminate the fMaximized window flag. (Nothing ever set this flag to True.) * placement.c (s_smart_place_window, s_clever_place_window, s_random_place_window, s_default_placement_proc): Update docs (basically, add cross-referencing). (PlaceWindow): Add FIXME comment. 1998-12-13 Robert Bihlmeyer * Makefile.am (guile_snarfs): Snarf "session-manager.c". * session-manager.c (SMerror): New static variable. (restoreWindowState): Do nothing if SM is not active. (SM-client-id): New primitive. (SM-error-message): New primitive. (initSM): Include snarfed stuff. Don't emit warning, save it in SMerror. * shutdown.c: Properly include "session-manager.h". 1998-12-10 Sam Steingold * scwm.c:499: fixed #ifdef capitalization. Sun Dec 6 02:50:53 1998 Maciej Stachowiak * scwm.c (scwm_main): Make sure to supress guile hooks on old-style hooks from newer post-1.3 snapshots. * window.c (un_keep_on_top): Call KeepOnTop after changing the flag, in case this window was on top of other kept-on-top windows. * events.c (HandleVisibilityNotify): Remove the body of this function except the debugging message. Raising kept-on-top windows on VisibilityNotify events is not helpful, and it caused an annoying problem with menus which was reported by Craig Struble Sat Dec 5 18:34:53 1998 Maciej Stachowiak * window.c (FocusOn): Do not attempt to snap to the window's viewport position, change to its desk, or move it. There are separate primitives to do all those. * message-window.c, message-window.h: add shadow_color and hilight_color fields to the message_window structure, and preallocate these when setting the background color, so we don't crash on interactive moves if the colors can't be allocated. * message-window.c (init_message_window): #include "message-window.x", not "msgwin.x". Sat Dec 5 12:27:43 1998 Greg Badros * borders.c: Fix bug whereby GET_DECOR was assumed to return an image; it can return #f, which was causing a seg fault when trying to dereference #f to get the IMAGE object (triggered by sds.scwmrc when images are missing). * resize.c: Remove unused fOpaque variable in rubber_band_resize. * events.c: #include virtual.h for prototype of raisePanFrames() Sat Dec 5 11:51:45 1998 Greg Badros * message-window object support -- implemented by Jeff W. Nichols * message-window.c, message-window.h: Added -- code from move.c, resize.c that now supports multiple message-windows objects as SMOBs * window.c: Rename select-window-interactively to select-window-interactively-no-message since message-windows are now more at the scheme level. select-window-interactively is defined in base.scm, now. Clean up `convert_move_data' -- it had unused variables and an error message that was unneeded. * scwm.c: Added MsgWindowContext and ExposeWindowProcContext for message-window support and generalized expose procedures. Call init_message_window, and eliminate the global message window (that support is at the scheme level now). * screen.h: Drop the MsgWindow field of struct ScreenInfo -- they are first class scheme objects now. * resize.h, resize.c: Elimnate CreateMessageWindow, set-message-window-attributes!, set-message-window-position!, display-message!, message-window-mapped?, DisplaySize. Drop C-level support for displaying resize sizes. Be sure to call new-size-hook once at the beginning of resizes (after start-resize hook) * move.h, move.c: Eliminate DisplayMessage, MapMessageWindow, UnmapMessageWindow, DisplayPosition. Generalized code is now in message-window.c * menu.c: Move "global" vars back into scheme module with pre-define-module hack to avoid initialization order dependencies (thanks Craig Struble!) * icons.c: Added FIXME comment * events.h, events.c: Added ExposeWindowProcContex extern, ExposeProc typedef for generalized expose event handling to support re-drawing message window objects. Use the expose proc in HandleExpose if one is attached to the window. * Makefile.am: Added message-window.c, .x, .h * window.h: Added prototype for convert_move_data * xproperty.c (X_property_delete_x): Remove unused local var, "value" 1998-12-04 Todd Larason * add_window.c: grammar fix * binding.c: documentation clarification * callbacks.c: grammar fix in documentation * color.c: doc fixes * decor.c: code simplification, merge InitScwmDecor into decor2scm * events.c: minor doc fix * deskpage.c: doc fix, standardize on 'virtual coordinate' and 'viewport coordinate' * face.c: fix typo in comment * font.c: grammar fix to documentation * icons.c: remove an obsolete comment, mark another as probably obsolete * image.c: minor doc fixes * miscprocs.c: doc fixes, change name of argument to set-click-delay! from usec to msec to reflect actual resolution * move.c: doc fix * placement.c: doc fixes, information on placement procedures * window.c: lots of doc fixes * xproperty.c: "It's a window system named X, not a system named X Windows" All of the above are from Carl R. Witty Thanks much! Fri Dec 4 21:57:39 1998 Maciej Stachowiak * menu.c: Gross hack alert - temporarily declare some variables from C to avoid the nasty "before the module declaration" trick. This should be fixed when we have a sounder plan for dynamic menu styles. * scwm.c (scwm_main): Initialize menulook and drawmenu functions before menu, so the latter can initialize a Scheme variable to drawmenu_menu_look. Thu Dec 3 01:43:49 1998 Maciej Stachowiak * move.c (interactive_move, rubber_band_move, opaque_move): `interactive-move' removed from here and replaced with `rubber-band-move' and `opaque-move'. * resize.c (interactive_resize, rubber_band_resize, opaque_resize): `interactive-resize' removed from here and replaced with `rubber-band-resize' and `opaque-resize'. 1998-12-03 Todd Larason * scwm.c (scwm_main): call init_icons() to initialize the icon hooks * menulook.c: documentation additions from Carl Witty - Thanks Carl! * menuitem.c: documentation fixes from Carl Witty * menu.c (PmdPrepopFromPmiim): If the action for a menu item is not a popup menu, but the hover trigger is, popup that menu (InitializeMenuItemInMenu): draw the popup arrow if either action or hover is a menu * icons.c: add iconify_hook and deiconify_hook, call them in the obvious places (init_icons): new function, to initialize the new hooks * Makefile.am (guile_snarfs): add 'icons.x' Thu Dec 3 01:43:49 1998 Maciej Stachowiak * xproperty.c (X_property_delete_x): Added new primitive (X-property-delete! WIN NAME) to go with the others. 1998-11-30 Robert Bihlmeyer * move.c (moveLoop): Restore original position when bailing out. * resize.c (InteractiveResize): Restore original size/position when bailing out. * add_window.c (AddWindow): psw->fTitle may already be 0 through SM, handle that. Tue Nov 24 08:17:06 1998 Greg Badros * window.c (s_get_window_context): Add FIXME note regarding the acceptable doc-extraction warning (window_context cannot be the C name of the window-context function because it is a variable) 1998-11-24 Robert Bihlmeyer * borders.c, events.c, scwm.c, scwm.h, xproperty.c: Changed all occurances of Boolean to Bool to avoid future confusion. Mon Nov 23 17:33:51 1998 Greg Badros * move.c (moveLoop): Added a couple of casts to round reals to integers, and use unsigned int instead of int; all changes that quiet warnings for me. Sat Nov 21 14:45:43 1998 Greg Badros * move.c (moveLoop): Use gh_int2scm in calling the interactive_move_new_position_hook so scheme objects are passed; the raw integers were being passed before in error. 1998-11-21 Robert Bihlmeyer * borders.c (SetupFrame): Add a little bit more padding to the right end of squashed titlebars. * session-manager.c (writeWindow): Clamp title_height to 0 if !fTitle. Fri Nov 20 02:18:26 1998 Maciej Stachowiak * scwm.c: Make some `static' functions have extern linkage so the scwmgtkhelper module can get at them. Tue Nov 17 18:03:44 1998 Maciej Stachowiak * Grab.c, add_window.c, borders.c, constraint-primitives.cc, drawmenu.c, events.c, face.c, icons.c, image.c, log-usage.c, menu.c, resize.c, scwm-constraints.cc, scwm-constraints.hpp, scwm.c, session-manager.c, window.c: Eliminate use of the gcc-specific __FUNCTION__ construct. Mon Nov 16 17:41:54 1998 Maciej Stachowiak * resize.c (set_message_window_attributes_x): Allocate shadow and hilight colors here. move.c:(DisplayMessage): Don't allocate them here. * screen.h: Add msg_window_hilite and msg_window_shadow fields. screen.c: Protect them. scwm.c: Initialize them. * Makefile.am: Make sure all headers are in noinst_HEADERS; put generate_scm_init_funcs in EXTRA_DIST. 1998-11-16 Robert Bihlmeyer * add_window.c: Forgot to include "session-manager.h". (AddWindow): StartDesk handling moved after `restoreWindowState' call. * session-manager.c (writeWindow, readWindow): Save/load icon position. (restoreWindowState): Restore icon position. Restoring of desk nr and iconification now really works. 1998-11-15 Robert Bihlmeyer * session-manager.c (getWindowClientId): wmhints may be NULL. Sun Nov 15 00:48:48 1998 Maciej Stachowiak * scwm-constraints.h: Fix bogus parenthesization in definitions of FRAME_X_VIRT and FRAME_Y_VIRT. * shutdown.c: Pass restarted? boolean argument to shutdown hooks; do not switch to viewport 0,0. * scwm.c (RestoreWithdrawnLocation): Do not attempt to move windows to the current viewport, ever. This can be done in a shutdown hook. (Reborder): Release the windows in the reverse of the stacking order. This way, the windows do not change stacking order when you restart scwm, or exit it and run it again. Sat Nov 14 14:50:06 1998 Maciej Stachowiak * window.c (restack_windows): Make restack_windows not lose on an empty list. Fri Nov 13 15:03:15 1998 Greg Badros * scwm.h (SCWM_NEWCELL_SMOB): Remove extraneous trailing semi-colon in macro definition 1998-11-12 Robert Bihlmeyer * move.c (moveLoop): Values for DisplayPosition now take into account that the window could be iconified. Tue Nov 10 10:48:38 1998 Greg Badros * scwm.h (REGISTER_SCWMSMOBFUNS): Protect REGISTER_SCWMSMOBFUNS macro with do { .. } while (0) Tue Nov 10 10:47:19 1998 Greg Badros * menulook.c (s_copy_menu_look): Rename original_menulook to original_menu_look so it matches the docstring ORIGINAL-MENU-LOOK Tue Nov 10 10:16:05 1998 Greg Badros * events.c (HandleMapRequestKeepRaised): Call raisePanFrames to try to fix the long-standing fvwm2 bug regarding the virtual panning windows at screen edges sporadically not working when a netscape communicator window is at the edge of the screen. Thanks Hideki Sakurada. 1998-11-09 Robert Bihlmeyer * session-manager.c (STATE_FILE_SERIAL): New macro. (saveYourself2): Put it at the beginning of the state file. (loadMyself): Ignore state files with different serial. Use __FUNCTION__ instead of FUNC_NAME in all places. * window.c (FlagsBitsFromSw): Two typos fixed. (PswUpdateFlags): New function, inverse of `FlagsBitsFromSw'. * window.h: Prototype it. * session-manager.c: Use these functions to save/restore various window flags. Also save the desk nr - restoring it does not yet work. * resize.c (InteractiveResize): Display FRAME_WIDTH/FRAME_HEIGHT in message window, as `FXGetWindowSize' returns wrong values in rubberband mode. * move.c (moveLoop): Display FRAME_X_VP/FRAME_Y_VP in message window, as `FXGetWindowTopLeft' returns wrong valuse in rubberband mode. * window.c (compare_focus_time): New function. (list-focus-order): Did not work. Reimplemented. Sat Nov 7 15:41:21 1998 Maciej Stachowiak * decor.c (set_window_decor_x): Use SetBorderX instead of SetBorder to guarantee redraw. 1998-11-02 Robert Bihlmeyer * session-manager.h (XA_WM_CLIENT_LEADER): New variable. * session-manager.c (initSM): Initialize it. (hton32, ntoh32): Removed. (writeI32, readI32): Use `ntohl' and `htonl' instead. (readI32): Return 0 on EOF. (getWindowClientId): New function. (writeWindow): Use it. Write out width/height of client window instead of frame. (readWindow): Return NULL on EOF. (restoreWindowState): Actually implemented. (loadMyself): Would load only the first record. * add_window.c (AddWindow): Call to `restoreWindowState' moved up. * menu.c (print_menu): But using SAFE_MENUITEM is wasteful, use MENUITEM_P instead. Tue Oct 27 22:59:31 1998 Maciej Stachowiak * window.c: Remove optional arguments for animation and/or moving pointer from move-window, window-shade, un-window-shade; rename un-window-shade to window-unshade; remove set-animation! and extern declarations assorted variables holding animation parameters. Add convert_move_data which abstracts converting the arguments passed into a move into a form usable by C, with error checking, so animated-move-window can reuse this code; make move-window use it. * move.c, move.h: Remove prototypes and declarations for AnimatedMoveWindow, AnimatedShadeWindow, and assorted variables holding animation parameters. Tue Nov 10 10:48:38 1998 Greg Badros * scwm.h (REGISTER_SCWMSMOBFUNS): Protect REGISTER_SCWMSMOBFUNS macro with do { .. } while (0) 1998-10-27 Todd Larason * menu.c (print_menu): be careful not to crash when printing a menu with no title 1998-10-27 Robert Bihlmeyer * add_window.c (AddWindow): Call `restoreWindowState'. I hope this is the right location to do it. * session-manager.c: Legalese added. (hton32): New macro, puts 32-bit-quantity into network byte order. (ntoh32): New macro, inverse to `hton32'. (SMWindowData): New type. (SMData): New variable. (writeI32, readI32, writeString, readString, writeWindow, readWindow, statefile, loadMyself): New functions. (saveYourself2): Renamed from `saveYourselfPhase2Proc'. Actually save to the state file. (saveYourself, shutdownCancelled, saveComplet, die): Removed redundant `Proc' suffix from the name. (setSMProperties): Don't shorten SmProgram. Add new SmCurrentDirectory so that restart/clone can actually work. Add new SmDiscardCommand that removes state file. (initSM): Initialize XA_SM_CLIENT_ID. Call `loadMyself' if we were reincarnated. (restoreWindowState): New function. Yet empty. * session-manager.h: Prototype it. (XA_SM_CLIENT_ID): New variable. * xproperty.c (X-property-set!): assert(0) impossible case. Give up on error. (X-property-get): Return #f in impossible case. * xproperty.c (GetXProperty): New function. (X-property-get): Use it. * xproperty.h: Prototype it. * scwm.c (InitUserData): Initialize user, home to NULL. * events.c (NextScwmEvent): Remove debug message. * system.c (xgetcwd): New function. * system.h: Prototype it. * session-manager.c (doneSM): Do nothing unless we're connected. Would segfault because `SmcSetProperties' needs SmcProp**, not SmProp*. The segfault was catched and `doneSM' was called again ... nasty! 1998-10-24 Robert Bihlmeyer * scwm.c: Move `main_prog_t' from here ... * guile-compat.h: ... to here. * window.c (get-window-focus): New primitive. * Makefile.am (noinst_HEADERS): Removed a nother reference to mwmcom.h that I missed before. Thu Oct 22 14:23:44 1998 Maciej Stachowiak * scwm.c: Remove scwm_gh_enter and scwm_gh_launch_pad defintions. guile-compat.c, guile-compat.h: Move them here; if guile has scm_load_startup_files, do not actually define them, just #define scwm_gh_enter as gh_enter. Thu Oct 22 05:43:45 1998 Maciej Stachowiak * color.h: Fix a bunch of color validation/access macros; add VALIDATE_COLOR_OR_UNDEFINED. 1998-10-22 Robert Bihlmeyer * decorations.c: Remove reference to unused mwmcom.h. 1998-10-22 Robert Bihlmeyer * session-manager.c (doneSM): New function to cleanly exit session. * session-manager.h: Prototype it. * shutdown.c (Done): Use it. 1998-10-20 Robert Bihlmeyer * scwm.c (InitUserData): UserHome was not set in all cases. * miscprocs.c (user-name, user-home): New primitives, providing access to UserName and UserHome, respectively. 1998-10-19 Robert Bihlmeyer * scwm.h (CLIENT_ID_STRING): Split into two versions: CLIENT_ID_STRING (without dashes), CLIENT_ID_OPT_STRING (prefixed with two dashes). * session-manager.c (setSMProperties): Don't copy old client-id options from g_argv into RestartCommand/CloneCommand. Added a RestartStyleHint. Program property now contains only the basename. Use CLIENT_ID_OPT_STRING where appropriate. SmcSetProperties used "&props" which was plain wrong - use "props" instead. 1998-10-18 Todd Larason * menu.c (s_make_menu): validate image items with IMAGE_OR_SYMBOL_P instead of IMAGE_P * image.h: added DYNAMIC_IMAGE_P, IMAGE_OR_SYMBOL_P and DYNAMIC_SAFE_IMAGE * drawmenu.c (PaintMenuItem, PaintDynamicMenu, ConstructDynamicMenu): use DYNAMIC_SAFE_IMAGE instead of SAFE_IMAGE 1998-10-17 Todd Larason * menulook.c (s_copy_menu_look): add doc string * menu.c (SzFirstItemFromPmd): include only if SCWM_DEBUG_MSGS is set (PmiimFromPmdShortcutKeypress): #if 0 - this isn't used right now (MenuInteraction): added a griping comment about an earlier change; more thought needs to go into abstracting menu feel, in addition to menu look 1998-10-16 Todd Larason * menu.h: remove unused PfnConstructDynamicMenu typedef * drawmenu.c (ConstructDynamicMenu): remove pmd->{x,y} initialization; neither needed nor appropriate here * draw-pie-menu.c: removed; moved to modules/pie-menu * Makefile.am: remove commented-out pie-menu references Thu Oct 15 08:04:47 1998 Greg Badros * add_window.c (AddWindow): Set psw->fl before calling before_new_window_hook so that psw is in a valid state for GC while the code runs. Thanks Lieven Marchand for backtrace! 1998-10-15 Robert Bihlmeyer * session-manager.c (setSMProperties): Include all normal options and updated --client-id in RestartCommand. userID now comes from global UserName. (initSM): Use SmcId/SmcNewId instead of old oldSessionId/newSessionId. * session-manager.h: Use *_IMPLEMENTATION scheme. Removed oldSessionId, newSessionId, sessionProg. (SmcId): New variable - set by --client-id option. * scwm.h (CLIENT_ID, CLIENT_ID_STRING): New constants. (UserName, UserHome): New variables. * scwm.c (InitUserData): New function that initializes the above two. (main): Call it. (scwm_main): New option '--client-id' for session management. Handle it, update usage message and inline docs. * scwm.h, scwm.c: Use *_IMPLEMENTATION scheme. * events.c (NextScwmEvent): Change #ifdef from SM to HAVE_LIBSM_LIBICE which is used everywhere else. Sun Oct 11 17:13:58 1998 Greg Badros * scwm.c (RestoreWithdrawnLocation): If scwm-no-move-windows-on-exit is defined and not #f, then don't position all windows to be in the current viewport when exiting. This makes windows stay where they were if you restart scwm right away. To do this better, we could store a "scwm-position" property with each window so that we could move all the windows onto the viewport when exiting, and if scwm is the window manager that restarts, it could know to move them back to where they were before the exit. Sun Oct 11 16:29:34 1998 Greg Badros * move.c (DisplayMessage): Fail more gracefully if cannot allocate colors for the display message window. Fall back to White and Black pixel values. Sat Oct 10 10:30:19 1998 Greg Badros * virtual.c (init_virtual): Added change-desk-hook, and call it with the new and old desks when the desktop changes * scwm.c: Invoke init_virtual() to add the change-desk-hook var. * events.c: Added window-focus-change-hook, and call it when the focus changes (for auto-raise, e.g.) Thu Oct 8 12:42:25 1998 Greg Badros * resize.c (s_set_message_window_position_x): Document X-ALIGN and Y-ALIGN. * menulook.c (menulook?) : Document the proc. (copy_menu_look) Remove dummy variable, add some braces for readability, warning elimination. * menu.c: Permit SCM_BOOL_F menuitems w/o giving Bad menu item warning. Fix some doc strings to have ending periods for synopsis sentence. Added prototype for ConstructDynamicMenu (instead of #includeing "drawmenu.h" * drawmenu.c: Document scwm-menu-look variable. * constraint-primitives.cc: Use PswFromClvPv instead of a static_cast to get at the windows in cl_windows_of_constraint * color.c: Fix mis-edit in not renaming FUNC_NAME macro of not_menu_background. Should these "not_menu..." things get obliterated or do we still rely on them somewhere? Todd says: yes we use them for icon and window backgrounds and borders -- they need to get their colors from somewhere else before the code can be killed 1998-10-07 Todd Larason * menu.h: scmMenuTag added to Menu; pmiimTitle added to DynamicMenu * menu.c: menu title support; not yet used by any menulook. (MenuInteraction): don't unselect/popdown when the pointer moves off of all menus; something like this is needed for shaped menus, where there may be root window showing between the two menus of a popup pair, and doesn't seem too bad for other cases. * drawmenu.c (PaintMenuItem): don't move text over by an extra MENU_ITEM_PICTURE_EXTRA_HORIZ_SPACE - this space should only be given if a side image exists, and it's already included in cpixLeftPicWidth (ConstructDynamicMenu): don't add an extra MENU_ITEM_RR_SPACE to pmd->cpixWidth - the space for the left is already taken into account. 1998-10-06 Todd Larason * draw-xpm-menu.c: moved to modules/xpm-menus * scwm.c (InitVariables): menu_font removed; MenuColors renamed NotMenuColors (scwm_main): init_draw_xpm_menu removed (scwm_main): MenuColors renamed NotMenuColors (init_scwm_load_path): SCWM_BIN_LOAD_PATH added to %load-path * screen.h: MenuColors renamed NotMenuColors; MenuRelief renamed NotMenuRelief; MenuStippleColors removed * screen.c (mark_screen): menu_font and menu_look removed * menulook.h: MENULOOK_OR_SYMBOL_P, DYNAMIC_MENULOOK_P and DYNAMIC_SAFE_MENULOOK added * menulook.c (make_menulook_internal): new, most of the functionality of the old make_menulook (s_set_menu_look): removed (make_menulook): use make_menulook_internal (s_copy_menu_look): new function; copies the vtable from an existing menulook, with a new name and possibly new extra list * menu.c (s_make_menu): arguments reordered, and bg_color, text_color, stipple_color and font made mandatory; picture-align argument renamed side-picture-align; scmMenuLook set to SCM_BOOL_F instead of Scr.menu_look - the normal scwm look will be used unless it's set explictely; (s_set_menu_menu_look_x): new (NewDynamicMenu): allow scmMenuLook to be a symbol or an object, or invalid; if invalid, use ConstructDynamicMenu to get the normal scwm look * icons.c (CreateIconWindow): MenuColors renamed NotMenuColors; being used here as background and border colors for icons * font.c: protected_fonts removed; the icon font is protected through the Scr structure, and the menu font is gone; set-menu-font! and menu-font removed * drawmenu.c (PscwmFontForMenuItem): use scmFixedFont as a last-ditch default font, instead of Scr.MenuFont (init_drawmenu): no longer set Scr.menu_look; each menu has a menulook setting, and the standard ConstructDynamicMenu is explicitely used if the per-menu setting isn't valid * color.c: reset_menu_relief and calls to it removed; the menuing code handles its own relief creation; {set-,}menu-{foreground,background} renamed {set-,}not-menu-{foreground,background}; Menu{Colors,Relief} renamed NotMenu{Colors,Relief}; MenuStippleColors and {set-,}menu-stipple-colors removed; protected_colors shortened (it should probably be removed) * add_window.c (AddWindow): Menu{Colors,Relief} renamed NotMenu{Colors,Relief}; they're being used here for window text, shadow, relief and background colors * Makefile.am: draw-xpm-menu.[cx] removed; @x_ldflags@ moved from _LDADD to _LDFLAGS; scwm_LDFLAGS includes -export-dynamic; SCWM_BIN_LOAD_PATH added to scwmpaths.h 1998-10-05 Todd Larason * move.c (moveLoop): call the interactive-move-new-position hook with properly schemified arguments Mon Oct 5 12:25:21 1998 Greg Badros * scwm.c: Added KeyReleaseMask to the event mask used on the root and NoFocusWin windows * menu.c: Added KeyReleaseMask to the mask used in getting events from a menu; Permit XK_Tab to be used for advancing to the next menu item, and set fPermitAltReleaseToSelect when it is so used. Watch for KeyRelease events, and let Meta/Alt releases select the current item if fPermitAltReleaseToSelect is true. Changes largely inspired by patch from Paul Sheer. * focus.c (SetFocus): Set ttLastFocussed when a window receives the focus. * add_window.c (AddWindow): Init ttLastFocussed to current time when a window is added. * window.h: Added ttLastFocussed field to ScwmWindow * window.c: Added `window-last-focus-time', `list-focus-order' (latter from Paul Sheer) * callbacks.c: struct cwssdr_data's handler field is now a scm_catch_handler_t, not an SCM (eliminates warnings) Mon Oct 5 09:02:26 1998 Greg Badros * window.c, image.c, font.c, color.c: Use gh_make_vector instead of scm_make_vector * menu.c: Eliminate warning about unused variable that is used in debug-only code. Fix assignment to pmenu->scmFont that immediately got undone -- now makes the default font object for menus be Scr.menu_font instead of SCM_UNDEFINED or SCM_BOOL_F * move.c: Minor indentation change * draw-xpm-menu.c: Fix the header to say "By Todd Larason" -- had the old header from my menuing code (via copy and use). * guile-compat.h: Added comment about scm_make_vector HAVE_SCM_MAKE_VECTOR_3_ARGS not being needed any longer Fri Oct 2 15:31:38 1998 Greg Badros * menu.c (MenuInteraction): Use pmd->pmdv... not pmiim->pmd (pmiim is NULL at start of this fn) * drawmenu.c (SetPopupMenuPositionFromMenuItem): Comment out unused var pmdiNew (eliminates warning) * drawxpm-menu.c: #include "drawmmenu.h", add return type to InitGCs(), add parens to disambiguate && and || in same expression, and comment out unused var pmdiNew (all to eliminate warnings) 1998-10-01 Todd Larason * menu.c (menu_properties): added scmSideAlign and removed for now scmMenuLook (make_menu): removed menu-look from the documentation for now Thu Oct 1 04:51:55 1998 Maciej Stachowiak * callbacks.c: Use scm_internal_stack_catch instead of scm_internal_lazy_catch to effectively roll our own. This will have worse performance bu works around the bug/limitation in scm_internal_cwdr which causes occasional crashes with the previous version. 1998-10-01 Todd Larason * scwm.c (scwm_main): init_menulook, init_drawmenu and init_draw_xpm_menu added; drawmenu_init_gcs removed * screen.h: menu_look added to Screen struct * screen.c (mark_screen): mark menu_look object * menulook.c,menulook.h: New files, for a new 'menulook' type, encapsulates menu look & feel. set-menu-look! primitive for settingi current menu look * menuitem.h (MenuItemInMenu_tag): menulook-specific MenuItemDrawingInfo pointer added; scwm-style information moved to drawmenu.c's MenuItemDrawingInfo struct * menu.h: all the menu drawing specific information removed. scmStippleColor and scmMenuLook added; MenuDrawingVtable added to DynamicMenu struct; window, location and size moved from MenuDrawingInfo struct to DynamicMenu struct * menu.c: include "menulook.h" instead of "drawmenu.h". scmStippleColor and scmMenuLook menu attributes added. drawing-style specific code modularized through the menulook type. MIS_Grayed menu item status supported. * drawmenu.h: drawmenu_init_gcs and no longer correct comment removed * drawmenu.c: modularized, more separated from menu.c. defines all the drawing structures and creates `scwm-menu-look' to represent this menu look. drawmenu_init_gcs removed. * Makefile.am: draw-xpm-menu[cx], menulook.[ch], drawmenu.x added Tue Sep 29 11:18:25 1998 Greg Badros * xmisc.h: Fix name of prototype for SetGCBg (was SetGCFb) * scwm.c: #include "drawmenu.h" for drawmenu_init_gcs fn * resize.c, move.c: Use actual size/position of window for the message display (in case the solver doesn't permit the suggested resize/move). * color.c: Remove some unused variables to eliminate warnings. 1998-09-27 Todd Larason * draw-pie-menu.c: Lots of changes to bring it up to date with the current drawmenu.c, and to fix bugs with the larger spacing; the 'real' spacing works out nicely to avoid some work. This still doesn't actually do pies, and still isn't used at all, but this is a better starting place for additional work than the previous version. * drawmenu.c (PaintSideImage): Align the side image properly if it completely fits and it's bottom aligned. (ConstructDynamicMenu): enable background images 1998-09-26 Todd Larason * drawmenu.c (MakeGCs): only recompute the relief and shadow colors if the background color or the highlight/shadow factors have changed since the last menu display * scwm.c (scwm_main): renamed menu_init_gcs to drawmenu_init_gcs * screen.h: remove menu GCs * menu.h: move scmSideAlign up with the other side image items; remove menu_init_gcs * menu.c (s_make_menu): correct small mistake in make-menu documentation. remove menu_init_gcs (now in drawmenu.c as drawmenu_init_gcs) * icons.c (DrawIconWindow): Don't use the MenuGC; still uses the MenuColors though, which it shouldn't. * generate_scm_init_funcs: allow multiple '-'s in file names * font.c (s_menu_font): don't bother updating the menu GC font; the drawmenu code does it anyway * drawmenu.h: drawmenu_init_gcs added * drawmenu.c: moved all the Menu GCs from the Scr structure to here, and regularized how they're set up; moved menu_init_gcs here ad drawmenu_init_gcs * color.h: Added adjust_pixel_brightness, menu_hilight_factor_val and menu_shadow_factor_val * color.c: Added adjust_pixel_brightness; like adjust_brightness, but works on X Pixels not SCM color objects. Made menu_hilight_factor_val and menu_shadow_factor_val external. Removed all references to the menu GCs. Sat Sep 26 20:33:07 1998 Greg Badros * scwm-constraints.hpp: Make max/min size constraints take decoration sizes into account (since the client specifies sizes for the client window, and the constraints are on the frame size). Still not perfect since the decoration sizes aren't exposed as constraint variables, but this is an improvement. 1998-09-24 Todd Larason * Grab.c, ICCCM.c, add_window.c, binding.c, borders.c, callbacks.c, color.c, colormaps.c, colors.c, complex.c, decor.c, decorations.c, deskpage.c, drawmenu.c, errors.c, events.c, face.c, guile-compat.c, icons.c, image.c, log-usage.c, menu.c, menuitem.c, miscprocs.c, module-interface.c, move.c, placement.c, resize.c, screen.c, scwm.c, session-manager.c, shutdown.c, string_token.c, syscompat.c, system.c, util.c, virtual.c, window.c, xmisc.c, xproperty.c, xrm.c: All headers are now #included in the following order: config.h, system headers, X headers, guile headers, .h, other scwm headers, dmalloc.h. Every module includes its corresponding .h file. * binding.h, borders.h, color.h, colors.h, decor.h, decorations.h, face.h, font.h, image.h, menu.h, menuitem.h, move.h, resize.h, screen.h, scwm.h, virtual.h, window.h, xmisc.h: header files in the order given above, and headers added to allow scwm headers to be included independantly of one another. * window.h, window_fwd.h: typedef struct ScwmWindow ScwmWindow in window_fwd.h; guard typedef in window.h against window_fwd.h's. * add_window.h, binding.h, colormaps.h, move.h, xmisc.h: remove #define ScwmWindow mechanism for using window_fwd.h; now all handled by window.h and window_fwd.h Thu Sep 24 12:03:45 1998 Greg Badros * move.c (InteractiveMove): Reset have_orig_position after testing it. Thanks Hideki Sakurada! * add_window.c: Fix docs for before-new-window-hook, since that is now *not* used for window-styles (but I left the hook in in case there are other generally useful things to do at that phase of window setup -- might get removed later). 1998-09-24 Todd Larason * decor.c: properly add extra height to title bars when a decor is attached to a window * add_window.c, color.c, decor.c, font.c, image.c, menu.c, placement.c, screen.c: Standardize header_IMPLEMENTATION and location Wed Sep 23 16:53:18 1998 Greg Badros * add_window.c: Added a before-place-new-window-hook for the window style to use, and call that hook before calling PlaceWindow. Fixes placement off by 6 pixels (or so, depending on border width) bug * placement.c: Separate out some debugging code for ease of interrogation under gdb * decorations.c: Use -- instead of long-winded decrement 1998-09-23 Todd Larason * window.c (s_set_border_width_x): Save old gravity adjustment before changing border width; the resize adjustment wasn't taking gravity into account * decor.c (s_set_window_decor_x): use set_window_internal_title_height to resize titlebar, not ResizeTo; this fixes the shrinking-xterm-on-restart problem for me, and looks like the right thing to do Wed Sep 23 11:03:41 1998 Greg Badros * window.c: (GrabEm) only try the XGrabPointer 5 times instead of 1000. * placement.c: Use FXGetWindowTopLeft to initialize the orig_x, orig_y before placing a window interactively. Fixes bug whereby interactive placement had the rubberband way offset from the pointer in "xmessage -center 'hello'" * move.h, move.c: Added WFrameOrIcon to return the top-level X window for a psw, and use that fn in InteractiveMove. Do not call the invalid-interaction-hook when a grab fails in the move -- still not really working correctly with xmag as the interactive-placement will fail (the grab fails because xmag does the grab first) * icons.c, borders.c: Added braces to disambiguate dangling else * color.h: Fix VALIDATE_COLOR, VALIDATE_COLOR_OR_NONE to use the do while (0) idiom * Grab.c: Update docs for X-grab-server, X-ungrab-server to note that the primitives are undefined at startup. 1998-09-22 Todd Larason * xproperty.c: Removed X-atomic-property-set-if-unset! * scwm.c (scwm_main): call init_Grab() along with other init functions * Makefile.am: Added Grab.c to guile-snarfs * Grab.c: Added X-grab-server and X-ungrab-server to implement with-grabbed-server. Mon Sep 21 10:08:29 1998 Greg Badros * move.c (Keyboard_shortcuts): Permit XK_KP_* to be used when moving and resizing. Thanks to Tim Phipps (fvwm2-based patch). * menu.c (PmiimMenuShortcuts): Permit XK_KP_Enter as a synonym for XK_Return. Thanks to Tim Phipps (fvwm2-based patch). Sat Sep 19 12:04:53 1998 Greg Badros * window.c: Use UNSET_SCM in ensure_valid so #f can be used too to skip an optional argument. * shutdown.c: Ungrab the server, and reset the cursor at exit. * module-interface.c (marshal_fvwm2_iconify_info, marshal_fvwm2_config_info): Test the WIN argument directly for being a window instead of using VALIDATE -- it doesn't make sense to permit interactive selection for these primitives. Fri Sep 18 15:47:34 1998 Greg Badros * scwm.c (ResetScwmexecProtocol): Added, and invoke it, in case XA_SCWMEXEC_REQWIN property is set on root at startup of scwm (and refers to a bad window) * move.c (AnimatedMoveWindow): Do not do anything if the move is to the current location (from another Tim Phipps fvwm2 patch of my code in that project) 1998-09-18 Todd Larason * xproperty.c: Added X-atomic-property-set-if-unset! * xmisc.c (DrawSubImage): Offset the clip origin so masked images drawn at non-0,0 position are masked properly. * scwm.c (InitVariables): Intialize msg_window_{x,y}{,_align} items. * screen.h: Added msg_window_x, msg_window_y, msg_window_x_align, msg_window_y_align. * resize.c: Added interactive-resize-start-hook, interactive-resize-new-size-hook and interactive-resize-finish-hook. (s_set_message_window_position_x): Added set-message-window-position!. (InteractiveResize): reordered startup procedure to allow interactive-resize-start-hook to be called with useful arguments before message window is mapped * move.c: Added interactive-move-start-hook, interactive-move-new-position-hook and interactive-move-finish-hook. Map message window at position set by msg_window_{x,y}{,_align}, not always the center of the screen. * callbacks.h: Added call3_hooks. * callbacks.c: Added scwm_safe_call3 and call3_hooks to support 3-argument hooks Thu Sep 17 15:51:48 1998 Greg Badros * window.c: Make stick use FRAME_[XY]_VP even though slightly redundant, make icon-position use ICON_[XY] accessor macro * scwm.c: Drop reparenting debug message * module-interface.c (BroadcastIconInfo): Undo last change to this -- should use ICON_[XY]_VP, not _VIRT. * icons.c: Use ICON_[XY]_VIRT instead of icon_[xy]_loc in CreateIconWindow. Pass ICON_[XY]_VP to CreateIconWindow, instead of icon_[xy]_loc * add_window.c: Pass ICON_[XY]_VP to CreateIconWindow, instead of icon_[xy]_loc * events.c: Use ICON_[XY]_VP instead of icon_[xy]_loc Thu Sep 17 12:08:23 1998 Greg Badros * events.c: Added X-DestroyNotify-hook and X-UnmapNotify-hook. Thu Sep 17 09:10:19 1998 Greg Badros * window.c: Added set-window-context!, window-context to support `with-window' macro * window.c: Fix FIsPartiallyInViewport to use x+width && y+height, not the other way around. Thanks Todd Larason! * scwm.c (RestoreWithdrawnLocation): Use FRAME_Y_VP, not FRAME_X_VP for xwc.y when undoing gravity adjustments. Thanks Todd Larason! * module-interface.c (BroadcastIconInfo): Use ICON_[XY]_VIRT, not _VP when broadcasting icon positions (so sticky icons show up on the current desk. * events.c (HandleConfigureRequest): Use FRAME_[XY]_VP, not FRAME_[XY] Wed Sep 16 15:54:33 1998 Greg Badros * scwm.h: Move struct ScwmWindow up before RestoreWithdrawnLocation prototype * scwm.c (scwm_main): Make --version print the szRepoLastChanged string, too. Wed Sep 16 15:30:39 1998 Greg Badros * xmisc.h, xmisc.c: Move RestoreWithdrawnLocation into scwm.c * window.h, window.c: Prototype for FIsPartiallyInViewport and make it not static, since scwm.c now uses it in RestoreWithdrawnLocation. Use FRAME_[XY] instead of accessing the fields directly. * shutdown.c: Pass a fRestart bool to Reborder() * scwm.h, scwm.c: Have Reborder take a bool to pass along to RestoreWithdrawnLocation, move RestoreWithdrawnLocation to scwm.c from xmisc.c; Improve RestoreWithdrawnLocation so that it uses FIsPartiallyInViewport * image.c: Check if val_load_{xpm,xbm} are not defined, and if so give a build error message (a common build problem is the .x files being empty -- this catches it and reports a much more useful error message before aborting). Tue Sep 15 17:08:20 1998 Greg Badros * window.c (MovePswToCurrentPosition): Check for not-visible sticky windows and move them back on screen w/ warning (only ifndef NDEBUG) * events.c: Use WIN_VP_OFFSET_[XY] in handling ConfigureNotify events -- fixes bug whereby drags in pager mis-moved the window, and whereby "xv" started up in the top-left viewport always (it actually moved there pretty quickly after the ConfigureNotify came in) Tue Sep 15 13:37:36 1998 Greg Badros * menu.c: Use XLookupString to convert a key event into a string when looking up menu shortcuts so that keypad numbers can be used in a menu. Scwm-ified version of Tim Phipps's patch to my fvwm2 menu code. Tue Sep 15 09:30:45 1998 Greg Badros These changes all by Todd Larason -- thanks Todd! * xmisc.c, xmisc.h: Added DrawSubImage as a generalization of DrawImage, and make DrawImage call DrawSubImage * menu.h: Added scmSideAlign field * menu.c: Added side-align option to make-menu, and honour it. * face.c: Make top and bottom global symbols, since the menuing code now uses them. * drawmenu.c: Improve PaintSideImage to take an align argument, 'top, 'center, or 'bottom; Use DrawSubImage to draw it. Mon Sep 14 10:42:49 1998 Greg Badros * icons.c (AutoPlace): Use ICON_[XY]_VP, ICON_VP_OFFSET_[XY], ensure sticky icons stay on screen using some older previously-ifdeffed out code. Mon Sep 14 09:34:39 1998 Greg Badros * window.c: Added comments to MovePsw[Icon]ToCurrentPosition * menu.c (make_menu): Give a better warning message when list_of_menuitems is empty Sun Sep 13 18:47:12 1998 Greg Badros * virtual.c (changeDesks): Call one or the other of MovePswIconToCurrentPosition or MovePswToCurrentPosition based on iconification state -- only one fvwm2 module packet should be sent, and we'll call the other when iconification state changes anyway. * scwm.c (InitVariables): Use scm_permanent_object to protect the scm for Scr.DefaultDecor so that it does not get FREEd (it is statically allocated) Thanks Craig Struble! * decor.c: Remove reduandant FREE of SCWMDECOR(obj)->tag. Thanks Craig Struble! Sun Sep 13 12:52:03 1998 Greg Badros * window.h: Drop FocusOn's 2nd argument * window.c: Added GetWindowVirtualCenter(), GetSnappedViewportPositionFor() to factor some repetition. Simplify FocusOn, WarpOn to use them. No longer re-snap the viewport on every FocusOn (now only when window is not partially visible) * virtual.c: Update Icon position in changeDesks always * move.c: Use ICON_VP_OFFSET_[XY] when moving icons interactively * module-interface.h, module-interface.c: Added BroadcastIconInfo() to send icon position for M_ICONIFY and M_ICON_LOCATION packets * menu.c: Added proto for InvokeUnhoverAction to avoid warnings * icons.c: Call BroadcastIconInfo instead of the repetitive Broadcast call with all args inline; Call MovePswToCurrentPosition in DeIconify in case it was out of position (might not update when not visible) * events.c: Call BroadcastIconInfo instead of the repetitive Broadcast call with all args inline Sun Sep 13 10:41:23 1998 Greg Badros * window.c (window-frame-border-width, window-title-size): Added these new primitives Sun Sep 13 09:26:17 1998 Greg Badros * decor.h: Updated comment about DECORUNREF (not unsafe when mismatched any longer) * scwm.c (InitVariables): strdup("default") for the default decor to get rid of memory bug trying to FREE a statically-allocated string literal Sat Sep 12 13:45:27 1998 Greg Badros * virtual.c (changeDesks): Call MovePsw*ToCurrentPosition on change of desks before mapping. (MoveViewport_internal) only call one of MovePswIconToCurrentPosition or MovePswToCurrentPosition depending on whether psw->fIconified Fri Sep 11 15:43:46 1998 Greg Badros * resize.c (hide_message): XFlush after unmapping * menu.c: Fix bugs in hover/unhover hook calling, use scwm_safe_call0_sym instead of call_thunk_with_message_handler (_sym suffix means it calls DEREF_IF_SYMBOL first to permit bindings to symbols still) * util.c: ifdef-out call_thunk_with_message_handler -- menuing code was last to use it, and now that uses scwm_safe_call0 or scwm_call0_hooks * util.h: removed prototype for call_thunk_with_message_handler * virtual.c (MoveViewport_internal): Added BroadcastConfig call for the non-moved windows (those on other desks) to keep them at appropriate places (fixes bug Craig Struble reported). Fri Sep 11 11:44:43 1998 Greg Badros * menu.c (make_menu): Do not permit empty menus; (print_menu) verify that pmeu->scmMenuItems is NIMP before using gh_car on it Fri Sep 11 11:26:53 1998 Greg Badros * window.c (move_window): Fix to use WIN_VP_OFFSET_[XY] as a correction for viewport->virtual and v.v. Fri Sep 11 09:39:30 1998 Greg Badros * xrm.c: Merge the X server database, the .Xdefaults* files, and the application resource file, as an Intrinsic app would. Thus, (X-resource-get "Scwm.aSetting") will look up that resource in the users' Xdefaults or xrdb-added settings. Keep this "system" database separate from the Scwm-controlled database, and permit the latter to be written using `X-resource-database-save'. Added IntegrateNewResourceManagerProperty to be called when the root RESOURCE_MANAGER property changes so that the new values are seen right away (not integrated yet, though) * xrm.h: Added for IntegrateNewResourceManagerProperty() proto * window.h, window.c: Added move_finalize_virt, and have move_finalize call it. Move-window now calls move_finalize_virt so those windows do not jump around. * events.c: Call IntegrateNewResourceManagerProperty() when XA_RESOURCE_MANAGER property changes on the root window (not tested yet) * add_window: Clean up the command line resource parsing stuff for better integration and separation from xrm.c features Thu Sep 10 15:57:53 1998 Greg Badros * window.c (FIsPartiallyInViewport): Added this function, and use it. Remove old debugging code, #ifdef out some questionably no-op code, and use FRAME_[XY]_VP instead of FRAME_[XY] in some places; also use move_finalize to bring a window into the current viewport, instead of MoveTo (former uses viewport positions) * scwm.c: Do init_xrm after XrmInitialize so that it can merge databases * scwm-constraints.h: Added ICON_[XY]_VIRT, invert FRAME_[XY]_VIRT's fSticky test -- sticky windows need to have their Scr.V[xy] added Thu Sep 10 11:02:16 1998 Greg Badros * window.c: Use FRAME_[XY]_VP in SetupFrame call; make move_finalize use viewport coordinates, not virtual, and add WIN_VP_OFFSET_* into passed in x,y before passing to virtual-coord based functions. * events.c: Use FRAME_[XY]_VP in SetupFrame call of HandleMapNotify(); improve debug message for that. * virtual.c: Broadcast the M_NEW_PAGE before moving the windows (cuts flicker in the pager) * placement.c: Use FRAME_[XY]_VP and ICON_[XY]_VP throughout placement functions so that they work again * module-interface.c: Fix synopsis sentences in docs, improve comment regarding ommitted field in config info marshalling Wed Sep 9 15:16:21 1998 Greg Badros * scwm.c: Initialize buttons2grab using XSERVER_MAX_BUTTONS * focus.c, add_window.c, binding.c: Use XSERVER_MAX_BUTTONS, not 3 * resize.c: Fix FUNC_NAME bug in message_window_mapped_p Wed Sep 9 14:18:18 1998 Greg Badros * resize.c: Added display-message, hide-message, message-window-mapped? primitives for exposing the MessageWindow more directly (i.e., the little single-line window that shows the position/size during interactive move/resizes). May go away when GTk is usefully usable, but too easy to do to leave undone. Wed Sep 9 12:48:43 1998 Greg Badros * scwm.c (scwm_main): Call initSM() much later, so that it happens after processing of options Wed Sep 9 09:35:39 1998 Greg Badros * shutdown.c (Done): Use w_for_scwmexec_response and reset the output, error, and reply properties for the scwmexec protocol when shutting down * scwm.c: Initialize w_for_scwmexec_response to None * events.h: Added global w_for_scwmexec_response * events.c: Set and reset w_for_scwmexec_response so that it's set during the eval of the requested expression in case Done needs to reply to the requesting window (on `quit' or segfault) Wed Sep 9 09:29:25 1998 Greg Badros * Makefile.am: Added use of @SM_LIB@, now expanded by configure.in, so that -lSM -lICE will get added to the link command Tue Sep 8 14:08:53 1998 Greg Badros * move.c (moveLoop): Stop using Scr.fMWMMenus. Tue Sep 8 10:45:27 1998 Greg Badros * constraint-primitives.c: Be sure not to violate the width/height increment of a window when resizing -- this was causing XEmacs to request multiple new (corrected) sizes after the cassowary-controlled resizing had occurred; Fixes the assymetry between directly resizing a window (where the ConstrainSize call always was made) and the resizing of a window by Cassowary (where the call is now made by this fix) * window.c: In debug msg, give name of window that configure events are sent to. * virtual.c (MoveViewport_internal): Don't move windows not on the current desk * scwm.c: FIXGJB on a comment re: a fixed length string * screen.h: Comment out the fMWMMenus flag * miscprocs.c: Drop set-menu-mwm-style!, menu-mwm-style. * resize.c: Some formatting + comment change * move.c: Use True, not 1 for a bool * events.c, borders.c: Use DBG, not dbg in DEBUG_RESIZE macro invocations. Mon Sep 7 12:25:39 1998 Greg Badros * face.c: Fix face specifications documentation markup so it's warning free. * scwm.c: Added run-time command-line options documentation Mon Sep 7 10:21:19 1998 Greg Badros * scwm.h: Added SCWM_VAR_INIT macro for when vars have values to initialize to -- SCWM_VAR now only takes two arguments, the c name and the scheme name * scwm.c: Fix init_scwm_load_path to use new SCWM_VAR so it works -- caused %load-path to be broken before which resulted in not finding scwm modules * menu.c, image.c: Use SCWM_VAR_INIT appropriately. * image.c: Fix multiple free of c_fname/c_name in path_expand_image_fname (thanks for report, Carl Witty!) Sun Sep 6 15:36:11 1998 Greg Badros * scwm.c: Clean up init_scwm_load_path, fix /* to /** comments after SCWM_VAR_READ_ONLY macros Sun Sep 6 14:28:05 1998 Greg Badros * scwm.h: Added SCWM_VAR and SCWM_VAR_READ_ONLY macros * scwm.c: Use SCWM_VAR, SCWM_VAR_READ_ONLY * menu.c: Use SCWM_VAR * image.c: Use SCWM_VAR, rename loc_ prefix to pscm_ prefix as the macros enforce; Turn image_not_found_hook into a real hook, and erase ad-hoc InvokeHook1 function. * events.c: Remove some obsolete comments re: send_key_press Sun Sep 6 13:23:15 1998 Greg Badros * Makefile.am: Fix source and header targets to not duplicate cassowary files, and to include scwm-snarf.h Sun Sep 6 13:06:54 1998 Greg Badros * window.c, shutdown.c, module-interface.c, events.c, constraint-primitives.c, callbacks.c, add_window.c: Use SCWM_HOOK instead of old SCWM_DEFINE_HOOK, and move the documentation to a bare /** comment immediately following the SCWM_HOOK macro. This is the new documentation format for hooks. extract-docs has been updated, too, and now checks for coincidence of C and scheme hook names (providing a warning on mismatch -- caught 1 bug!) * callbacks.h: Rename SCWM_DEFINE_HOOK to SCWM_HOOK, make more robust, and do not expand the macro if SCWM_EXTRACT_COMMENTS is defined (since the macro is a lexical cue to the extractor) * scwm.c, menu.c, image.c: Mark vars and read-only vars with VAR and RO-VAR comments (temporary until macro-based construct) Sat Sep 5 13:26:05 1998 Greg Badros * window.c: Mark new SCM variables, fix the mark code for a bug in requiring the decor to be set. Clean up set_window_property_x. * constraint-primitives.cc: #include callbacks.c inside the extern "C" block; added scwm-resolve-hook and call it. * add_window.c: Defer interrupts while initializing the new window struct (just in case) Fri Sep 4 19:01:55 1998 Greg Badros * screen.h, scwm.c: Add schscreen field of struct ScreenInfo and initialize it. * screen-ci.hpp: Store the scheme-level screen object with the viewport position and pointer position cl variables. Now all cl-variables have an attached scheme objects (via _pv) * scwm-constraints.hpp: Added PswFromClvPv, PclvFromClvPv to get at an attached ScwmWindow * or ClVariable * from a pclv->Pv(). Store Psw's via their schwin field (their scheme level window object, instead of their C "ScwmWindow *"). * constraint-primitives.cc: Call the callback attached to the changed-proc property of any scheme cl-variable. Call is made when the variable is changed -- still need a callback on the resolve after all the changes are made. Fixed various bugs in screen_clv_* primitives * add-window.c: Create the scheme window to attach to Psw before calling CassowaryInitClVarsInPsw since the latter attaches the _pv's to that scheme object * window.c: clean up a doc comment. * miscprocs.c: Fix name X_rotate_cut_buffers (capitalize the X) Fri Sep 4 12:28:33 1998 Greg Badros * window.c (stick, unstick): Sandwich SuggestMoveWindowTo-s between CassowaryEdit.. EndEdit; also add FIXGJB: rename comments regarding API renaming of some functions Fri Sep 4 11:58:33 1998 Greg Badros * session-manager.h: Fix multiple-inclusion guard, and include config.h * Makefile.am: separated out the session_manager_srcs so that the session manager support is only built if libSM and libICE are found Fri Sep 4 10:02:18 1998 Greg Badros * window.h: Added {WIN,ICON}_VP_OFFSET_{X,Y} to use instead of Scr.Vx, Scr.Vy to account for sticky windows appropriately. * window.c: Use FRAME_[XY]_VP instead of FRAME_[XY] in SendClientConfigureNotify. Improve docs on "stick" command. * placement.c: Added debug code commented out * move.c, resize.c, icons.c, borders.c: Use {WIN,ICON}_VP_OFFSET_{X,Y} * miscprocs.c: Improve docs for refresh. * add_window.c: Simplify a nested conditional Fri Sep 4 08:46:43 1998 Greg Badros * deskpage.c (display_size): Added note about display-width, display-height vars that base.scm sets 1998-09-03 Robert Bihlmeyer * xproperty.c (X_property_set_x): Would always make TYPE equal to NAME. Thu Sep 3 15:26:58 1998 Greg Badros * placement.c, window.h: Change name of struct _gravity_info to struct gravity_info_tag since leading underscores are (at least) partially reserved for the implementation Thu Sep 3 14:26:35 1998 Greg Badros * session-manager.h, session-manager.c: Added -- for session manager support -- derived from IceWM's session manager support * Makefile.am (cassowary_srcs): added session-manager.[ch] * scwm.c: #include session-manager.h and call initSM() if HAVE_LIBSM_LIBICE * events.c: Rename XNextEvent_orTimeout to NextScwmEvent; watch fd IceSMfd if it was initialized, and call IceProcessMessages when a message is received * miscprocs.c, events.h: Rename XNextEvent_orTimeout to NextScwmEvent * xrm.c, xmisc.c, syscompat.c, shutdown.c, module-interface.c, menuitem.c, menu.c, log-usage.c, image.c, guile-compat.c, getopt1.c, getopt.c, drawmenu.c, draw-pie-menu.c, callbacks.c: Add footer with Emacs local variable settings for C mode indentation Thu Sep 3 09:51:23 1998 Greg Badros * window.c (focus, warp-to-window): Improve documentation to mention that the target window is not raised Wed Sep 2 17:10:55 1998 Greg Badros * window.h: Added Hi{Relief,Shadow,Text,Back}Color members of struct ScwmWindow * window.c: Mark new members of struct ScwmWindow. Added `get-window-colors', `get-highlight-window-colors', `set-window-highlight-foreground!', `set-window-highlight-background!' * borders.c: Use new fns PixelHi{Text,Back}FromPsw for selecting the color for a highlighted window -- those fns use the new per-window highlight colors, or fall back to the decor settings if no per-window highlight color is specified (ie, they are #f) * add_window.c: init new members of struct ScwmWindow Wed Sep 2 13:11:47 1998 Greg Badros * window.c (window-icon-shaped?, window-shaped?): Added new primitives. Also fixed some uses of strings instead of FUNC_NAME as args to VALIDATE* utility routine * miscprocs.c (X-rotate-cut-buffers, elapsed-time): Added new primitives. * color.c (make-reversed-color): Added new primitive, use invert_color helper. Wed Sep 2 10:42:45 1998 Greg Badros * xproperty.c: Update the docs -- mention 'root-window for X-property-get, and use e.g. "value" instead of VALUE when referring to the list of items returned (arguments are in uppercase and are marked up differently). Wed Sep 2 09:53:29 1998 Greg Badros * window.c: Use FRAME_[XY]_VP in SetScwmWindowGeometry, SetScwmWindowPosition; also for calls to SetupFrame, RedrawOutlineAtNewPosition. Fixed comment of resize-to (does *not* include window decoration size). Added comments re: viewport vs. virtual positionness * scwm-constraints.cc, borders.c, add_window.c: Added comments re: viewport vs. virtual positionness * resize.c: Add Scr.V[xy] to drag positions in resizing, add comments re: viewport vs. virtual positionness Tue Sep 1 16:28:49 1998 Greg Badros * move.c: Updated docs to clarify virtual positionness * scwm-constraints.h: Added FRAME_[XY]_VIRT, document _VP suffix to mean viewport position (since it's a bit ambiguous, unfortunately) * window.c: Rename move_to to move_window, and make it use virtual coords. Fix animated moves to use virtual coords. Fix ResizePswToCurrentSize to use FRAME_[XY]_VP. Updated some docs. Tue Sep 1 14:26:53 1998 Greg Badros * Makefile.am: Added cassowary_headers, and use it to add to noinst_HEADERS * xmisc.h, xmisc.c: Added FXIsWindowMapped() * window.h, window.c: Added MovePswIconToCurrentPosition(), use FRAME_X_VP, FRAME_Y_VP in MovePswToCurrentPosition. Make stickiness result in changes to the real position of the window, since now windows store their virtual position, and are converted to viewport positions at a pretty low level (when positioned using MovePsw* functions) * virtual.c: Simplify MoveViewport_internal, since now windows do not need to be moved directly -- less work needs to be done since windows store their virtual position instead of their viewport position. * scwm-constraints.h: Added FRAME_[XY]_VP, ICON_[XY]_VP macros * scwm-constraints.cc: Make CassowarySetCValuesAndSolve() call MovePswToCurrentPosition when the solver is not in use. * move.c: Use MovePswIconToCurrentPosition() instead of multiple XMoveWindow calls. Correct for Scr.V[xy] in pointer position in moveLoop. Use rubberband for initial placement even when Cassowary is on. * module-interface.c: Use FRAME_[XY]_VP, ICON_[XY]_VP in the marshalling functions * icons.c: Use MovePswIconToCurrentPosition, and use virtual coords in AutoPlace (instead of viewport coordinates). * events.c: Clean up positioning of icon_w and icon_pixmap_w so that the latter is the thing that icon_[xy]_loc refers to. 1998-09-01 Robert Bihlmeyer * xproperty.c (string_to_X_atom, X_atom_to_string): New primitives. Mon Aug 31 14:05:09 1998 Greg Badros * window.h, window.c, color.c, callbacks.c: Remove ifdef-d out code. Mon Aug 31 13:09:50 1998 Greg Badros * xproperty.c: #include errors.h for warning * xmisc.c: Remove #if 0'd code, and unused vars * virtual.c, move.c, complex.c: #include util.h for warning * util.h: Add prototype for ms_sleep, and #include screen.h for ScwmDecor definition * screen.h: Rename multiple-inclusion guard to SCREEN_H__ 1998-08-31 Robert Bihlmeyer * window.c (s_window_id): Handle 'root-window. * xproperty.c: X properties are no longer SMOBS. Two functions `X-property-set!', and `X-property-get' now deal with them. The old interface is gone. Fri Aug 28 16:58:40 1998 Greg Badros * move.c, menu.c, complex.c, window.c, virtual.c: Use new ms_sleep instead of usleep. * util.c: Write ms_sleep to call usleep and possibly sleep (if for more than 1 second) * syscompat.h, syscompat.c: Fix prototype and defintion for usleep -- was treating arg as milli instead of micro seconds. Thanks Perry E. Metzger! Fri Aug 21 13:14:12 1998 Greg Badros * ALL, scwm.h: Replace SCM_DEFER_INTS with gh_defer_ints(), SCM_ALLOW_INTS with gh_allow_ints(), SCM_CAR with gh_car, SCM_CDR with gh_cdr, scm_listify with gh_list, scm_cons with gh_cons, most SCM_SETCDR with gh_set_cdr_x, most SCM_SETCAR with gh_set_car_x, scm_apply with gh_apply. Use SCWM_NEWCELL_SMOB for getting a new cell and initializing the car and cdr (since SCM_SETC[AD]R need to be used on a fresh cell for now since guile's scm_set_car which gh_set_car_x calls does assertion checking) Thu Aug 20 16:58:52 1998 Greg Badros * events.c (HandleButtonPress): Clean up redundant cond'l on pswCurrent, and begin to try to get fClickToFocusPassesClick to permit immediate action when on decorations and border even when #f Thu Aug 20 15:57:22 1998 Greg Badros * ALL, errors.h: Fix some C-portability problems with DBUG and DBUG_RESIZE macros. Now double-quote at call site, and give the DBG stream argument as first arg. Replace scwm_error's number-based system w/ string based system until we decide to do this the right way. Thu Aug 20 14:41:28 1998 Greg Badros * borders.c (SetupFrame): Call UnsetShapedTitlebar if !fSquashedTitlebar, and add that routine. * util.c: Remove #ifdef-d out call to SetTitleBar in redraw_titlebars that seemed redundant. Thu Aug 20 13:50:38 1998 Greg Badros * scwm.c (scwm_main): Use scm_setlocale, #include X11/Xlocale if X_LOCALE is set, and initialize locale support for X with XSupportsLocale() and XSetLocaleModifiers(). Thanks S. Senda! Thu Aug 20 12:16:34 1998 Greg Badros * scwm.c: Rewrite one line description of Scwm: A highly dynamic and extensible X11 window manager embedding guile scheme. * icons.c: Change AutoPlace behaviour for fStickyIcon -- do not put on same page in center of the window -- use non-sticky icon code instead. * window.c: Remove RaiseWindow calls from FocusOn and WarpOn. Thanks Danius Michaelides! Fri Aug 14 20:40:17 1998 Greg Badros * window.c: Remove FIXDOC comment: Yes: WIN's gets marked-up correctly with the perl extract-docs (not sure about the guile version -- it's worth testing) * face.c: Convert the Face Flags and Face Specification Flags into DocBook tables from plain text. Fri Aug 14 19:28:13 1998 Greg Badros * deskpage.c: Use tag instead of (the latter is not a DocBook tag -- I made it up a ways back because I was too lazy to look up the right markup) Thu Aug 13 11:56:46 1998 Greg Badros * resize.c: Added DBUG code for ConstrainSize * add_window.c: Do not add in psw->bw to frame_width, frame_height (was causing windows to grow in size on decorating). This reverts an earlier change which was thought to be necessary but was fixed by making ConstrainSize round instead of truncate. Thu Aug 13 11:17:12 1998 Greg Badros * placement.c: Fix bug reported by re: interactive placement not moving the window to the current pointer position initially. Thu Aug 13 10:03:08 1998 Greg Badros * window.c, move.c: Use (possibly) shaded height in ResizePswToCurrentSize, SetScwmWindowPosition, InteractiveMove * virtual.c, deskpage.c: Do not use bogus 10000 special number in FNeedsPaging (patch from Robert Bihlmeyer); use #f instead for s_set_edge_scroll_delay_x Wed Aug 12 18:07:23 1998 Greg Badros * scwm.c, module-types.h: Rename M_ERROR macro to M_FVWM_ERROR (conflict with a solaris header file) * binding.c: Remove some unused variables * syscompat.h: #include for usleep Wed Aug 12 17:26:30 1998 Greg Badros * move.c: Added Todd Larson's patch * window.c: Let move-to take #f for X or Y to mean don't move along that coordinate. Wed Aug 12 14:59:21 1998 Greg Badros * window.c: Added resize-frame-to which does what resize-to used to do, and made resize-to's size talk about the client window size; also added window-frame-size with old behaviour and make window-size return four values, instead of just two -- 3rd and 4th are size in resize increments. * resize.c: Rewrite makemult as a function, and make it round, instead of truncate * placement.c: Do not call SetupFrame from PlaceWindow -- let it get called later in HandleMapNotify. * add_window.c: Be sure to initialize psw->xboundary_width and psw->bw properly before calling ConstrainSize. Add psw->bw into psw->initial size estimates for the frame Wed Aug 12 09:22:35 1998 Greg Badros * color.c: Invert gh_number_p tests in various type checking to permit numbers. Thanks Dale Smith! Tue Aug 11 18:45:33 1998 Greg Badros * window.c, borders.c, borders.h, placement.c: Removed SendEvent argument from SetupFrame, and its calls. * borders.c: Added some debug code, and unmap decoration windows that are not supposed to be mapped Mon Aug 10 17:45:55 1998 Greg Badros * window.c: Added SendClientConfigureNotify fn, and call it from MovePswToCurrentPosition and ResizePswToCurrentSize (instead of having the code in SendClientConfigureNotify inline in SetupFrame). Rename local var w to cpix, since w implies an X-Window to me. * scwm.c: Added error checking after opening of display in if (!single) branch * resize.c: Use psw->xboundary_width instead of psw->boundary_width for width of the window * borders.c: Move the SendClientConfigureNotify code into function by that name in window.c (from SetupFrame). Added macro to check 'no-side-decorations property, and honour it by using xboundary_width instead of boundary_width, as appropriate. (This is not yet a debugged feature -- unhighlighted windows do not display properly, and the top boundary decoration sidebar should probably be dropped when side-decorations are dropped (just letting the titlebar serve as the top boundary decoration) * window.h: Added xboundary_width field of struct ScwmWindow, and use it in GRAV_X_ADJUSTMENT macro 1998-08-13 Robert Bihlmeyer * deskpage.c (s_set_edge_scroll_delay_x): Change calling convention. usec == #f now means that scrolling is prohibited. Warn whenever old usage of usec is detected. * virtual.c (FNeedsPaging): "Scrolling prohibited" is now signalled with a negative time. Fri Aug 7 20:04:44 1998 Greg Badros * Makefile.am: Added changed.c, log-usage.c, log-usage.h. changed.c is automatically managed by the CVSROOT/loginfo admin file on the server, using the make-repo-date-file from utilities/dev/make-repo-date-file. Note that after a commit, devs will need to "cvs update changed.c" to make changed.c correct * log-usage.c, log-usage.h: Added, defined SendUsagePacket() function * miscprocs.c: Added scwm-version-date primitive to give the string in changed.c. * scwm.c (scwm_maybe_send_thankyou_packet): Add this function, have it call SendUsagePacket() from log-usage.c, and call the function after run_startup_hook() is invoked. Can set SCWM_DO_NOT_LOG_USAGE environment variable to turn off, and must set thank-scwm-authors-with-usage-note to #t for any packets to leave user's machine Fri Aug 7 18:03:29 1998 Maciej Stachowiak * window.c: Rename list-windows-in-stacking-order to list-stacking-order; make it list each window only once (previous version gave one instance for each of main window, icon and icon title). Fri Aug 7 10:43:43 1998 Greg Badros * scwm.c: create scmFixedFont global object to use in a last-ditch need for a font; fix unrelated compiler warning * font.h, font.c: Added global scmFixedFont which should always be initialized and contain the fixed font * drawmenu.c: Patched PscwmFontForMenuItem to use FONT() instead of completely wrong (scwm_font *) cast. Thanks Craig Kaplan! * borders.c: Unmap the side windows if their width/height would be zero. Fixes problems I noticed with robbe.scwmrc's barebones decor * scwm-constraints.cc: Use resolve() form instead of resolve(..) for changing virtual position so that it works with nested edits. Thu Aug 6 22:04:48 1998 Greg Badros * resize.c, move.c: Remove ifdefs around the code to manage changing the virtual screen w/ cassowary since I now have nestable beginEdits; Fix SnapCoordsToEdges to remove some errors that Tom Larason brought to my attention (and provided a patch for that I used slightly modified) * borders.c, windows.c: Handle set-mwm-border! more accurately, including fixing the border-width of the frame and Parent windows, and do the border resizing in SetupFrame. Thu Aug 6 11:55:21 1998 Greg Badros * constraint-primitives.cc: Add cassowary_scm.h to avoid warning re: init_cassowary_scm. * add_window.c: put back in the ResizePswToCurrentSize in CassowaryEndEdit() for non-cassowary builds. Wed Aug 5 20:17:56 1998 Greg Badros * borders.c: Added SQUASHED_TITLEBAR_P macro and squashed-titlebar feature (set-object-property! win 'squashed-titlebar #t), then resize the window to see rough but working version -- requires XShape extension. * window.h, decorations.c, add_window.c: renamed wShaped field of ScwmWindow to fShaped, and make it a Bool instead of int. * window.c: Clean up CopySetAllFlags to be consistent w/ use of braces. * scwm.h: Added GDB_STOP macro for inserting a breakpoint in the source code for walking through newly written code. * scwm.c: Call init_xrm(), XrmInitialize() (latter always should've been called); remove call to init_cassowary_scm() -- let init_constraint_primitives() do that * scwm-constraints.cc, add_window.c: Don't do anything on CassowaryEndEdit() if no solver; also, make XrmDatabase db non-file-static, so xrm.c can use it. * constraint-primitives.cc: Call init_cassowary_scm() here, instead of from scwm.c * move.c: Factor out SnapCoordsToEdges, and fix off by 1 error on left and top edges; clean up some of the paging stuff while moving so that SetupFrame is called a lot less frequently (though it's still broken for cassowary pending the virtual screen rewrite) Wed Aug 5 20:09:52 1998 Greg Badros * xrm.c: Added for primitives X-resource-put and X-resource-get * Makefile.am: Updated for xrm.c, xrm.x Tue Aug 4 17:53:17 1998 Greg Badros * constraint-primitives.cc: Added cl-windows-of-constraint primitive Tue Aug 4 14:57:44 1998 Greg Badros * window.c: Restore the call to SetupFrame after animated shade/unshade since combinations of animated/unanimated shading/unshading fail unless the state of the window is well-defined. * scwm-constraints.hpp, constraint-primitives.cc: Make _scmXL, _scmXR and _scmYT, _scmYB all fields, instead of forcing writing the linear-expressions to find the right coordinate of a window at the scheme level. * move.c: Remove mention of set-opaque-move-size! from docs for interactive-move. Tue Aug 4 12:01:32 1998 Greg Badros * menu.h, menu.c: Added x_pos, y_pos, and left_side_p args to popup_menu, improve arg processing; added SetPopupMenuPositionFromDecoration to help out. * binding.c: Cleanup docs for mouse-event-type Mon Aug 3 16:13:52 1998 Greg Badros * window.c: Use new macro SET_BIT_FOR_OBJ_PROP within FlagsBitsFromSw to do the right thing with WinlistSkip, Maximized, etc; ifdef-out a redundant BroadcastConfig * decorations.c: Un-ifdef out the resetting of fBorder when boundary_width is 0. There still seems to be a race condition with the FvwmWinList coming up w/o a title whereby the Configure notification to a module hangs when writing to the pipe (a hypothesis---not fully observed). Mon Aug 3 13:24:19 1998 Greg Badros * window.c: Added list-all-windows-in-stacking-order primitve, use gh_cons instead of scm_cons in list-all-windows and update its comment * scwm.c, scwm.h: added JunkWindow, to replace JunkChild, JunkRoot, since we really need only one for the xlib calls Sun Aug 2 17:57:14 1998 Greg Badros * resize.c, virtual.h, virtual.c: Added FNeedsPaging() as a pretest for HandlePaging() -- use it in resize.c, but not yet in move.c. * move.c: Use 2 pixel range for testing if we're on the boundary for fResize==True in Keyboard_shortcuts * menu.c: Make submenus automatically select the first item in the submenu; require C+ for the alphanumeric menu movement keys Sun Aug 2 16:37:31 1998 Greg Badros * xmisc.h, xmisc.c, draw_menu.c: Patches from ITANI Eiichiro for I18N ComputeXTextWidth problems. * window.c: Pass no psw to Keyboard_shortcuts in DeferExecution; clean up some comments * shutdown.c: Fixed reorganization problem so segfault still tries to clean up the display if the display is already successfully opened. * scwm-screen-ci.hpp, scwm-constraints.hpp: Do not add automatically-destroyed constraints into the solver. Really need to do the handle wrappers of constraints, expressions, and vars! Use new ClConstraint->Pv() to point at the scheme object that is that constraint. * resize.c, move.c: Try to get paging during a resize/move right even with Cassowary in use; Fix Keyboard_shortcuts to ignore a NULL psw for DeferExecution 1998-08-01 Maciej Stachowiak * icons.c (CreateIconWindow): Check if psw->icon_pixmap_w is None before trying to set it's attributes. * window.c (force_icon_redraw): Check if psw->icon_w is None before destroying it. 1998-08-01 Maciej Stachowiak * miscprocs.c: Rename set-click-time! to set-click-delay! and X-server-set-synchronize! to set-X-server-synchronize!. Added some corresponding getters for setters that did not have them before: menu-mwm-style, title-justify, click-delay, title-height, click-delay, colormap-focus, smart-placement-is-really-smart?, click-to-focus-passes-click?, and click-to-focus-raises?. Fri Jul 31 20:39:23 1998 Greg Badros * window.c, resize.c, move.c, resize.h: Added ScwmWindow *, fResize args to Keyboard_shortcuts so resize behaviour can be smarter. Use width_inc, height_inc for keyboard resize * binding.c: Fix possible out-of-bounds array read access. * add_window.c: Move call to CassowaryNewWindow hook a bit earlier, before the PlaceWindow call, since that call does a move_finalize which needs the stay constraints to already be added * shutdown.c: Simplify Done() function and call SaveDesktopState always (except for seg fault). Fri Jul 31 18:42:23 1998 Greg Badros * shutdown.c: Do the XSelectInput, XSync, and XCloseDisplay in all shutdown cases, not just if we're going to restart. * scwm-constraints.cc: Added note about intentional (for now) memory leak * decorations.c: Guard an XFree with a test to ensure the pointer is non-null (XFree, unlike ansi C's free, is not guaranteed to deal with null pointers properly). * constraint-primitives.cc (ScwmResolve): Only move if not resized. 1998-07-31 Maciej Stachowiak * font.c, font.h, decor.c: Rename set-window-font! to set-title-font! for precision and to make clear that it does not affect a window object. Add title-font, icon-font and menu-font accessor functions. 1998-07-31 Maciej Stachowiak * events.c (send_button_press): Use the new FButtonToBnumModifiers, and take a single mouse button specifier argument, not an integer button number and integer modifier mask. Also make send_key_press pass the needed func_name argument for FKeyToKeysymModifiers. * binding.c, binding.h: Add new FButtonToBnumModifiers and add_binding functions and use them for better abstraction. Push error checking of contexts into compute_contexts. Change a few function signatures to pass a procedure name for the sake of error reporting. Much redundant code removed this way. No longer accept symbols in place of procedures in key/mouse bindings. * deskpage.c: API review continues: Split set-edge-wrap! into set-edge-x-wrap! and set-edge-y-wrap!; split set-edge-scroll! into set-edge-x-scroll! and set-edge-y-scroll!; split set-edge-resistance! into set-edge-scroll-delay! and set-edge-move-threshold!. Added corresponding accessors: edge-x-wrap, edge-y-wrap, edge-x-scroll, edge-y-scroll, edge-scroll-delay, edge-move-threshold. Reordered the file so all getters are near their setters. Removed extraneous instances of SCM_REDEFER_INTS/SCM_REALLOW_INTS. * decor.c (s_window_decor): Fixed a minor typo. 1998-07-30 Maciej Stachowiak * decor.c: Make the window argument to `set-window-decor!' mandatory and first. Add the corresponding getter, `window-decor'. * color.c: API review: Added menu-foreground, menu-background, menu-stipple primitives w/ docs. * window.h, window.c: Window structure changes, phase 1. Added other_properties member to window structure; GC protect it and initialize it to an empty hash table. Add set-window-property! and window-property primitives. Right now they only get and set properties in this hash table. "Magical" properties and change notification will come in later, as will other planned changes. ICCCM compliant gravity handling: * window.h: Define gravity_info type, used to encode gravity offset information. Add a grav field of type gravity_info to the window structure; remove the xdiff and ydiff fields. Prototype the new set_window_internal_title_height which should be used when changing the title height for a window, including adding or removing the title bar. Add GRAV_X_ADJUSTMENT and GRAV_Y_ADJUSTMENT macros to find the right amount the frame needs to be gravity-adjusted relative to a desired app window position. window.c: Remove window-diff-deltas, since xdiff and ydiff no longer exist. Add set_window_internal_title_height to adjust the window's title height safely, respecting gravity, and broadcasting. Fix show-titlebar, hide-titlebar, and set-border-width! to respect gravity. add_window.c: Remove SetupFrame call when adding window (moved to placement.c). Remove all mucking with xdiff and ydiff, they are gone. placement.c: Make GetGravityOffsets merely set the grav field of the window struct as appropriate instead of trying to return values. Move the table of gravity offset types to file static, not function static, and make it contain all three gravity_info fields. Remove CorrectPositionToStayOnscreen and all calls to it, it was pointless voodoo code anyway. Remove all move_finalize's intended to keep the window as requested; merely do nothing in those cases. in PlaceWindow, place the window exactly where requested, as adjusted by gravity, before calling the placement proc. util.c (redraw_titlebars): use set_window_internal_title_height to set the new titlebar height, not the previous weirdness. miscprocs.c (set_title_height_x): Reverse the sign sense of extra_height. font.c (set_window_font_x): Reverse the sign sense of extra_height. xmisc.c: Release the window by reversing the gravity adjustment currently in effect, not any of that xdiff/ydiff junk. To be resolved: should the user be able to get and/or set the window gravity? Thu Jul 30 20:16:12 1998 Greg Badros * constraint-primitives.cc, scwm-constraints.cc, scwm-constraints.h, scwm-screen-ci.hpp: Added Scr.Vx, Scr.Vy clvars, put stays on them, added CassowaryModifyOpaqueFlag * makefile.cassowary: Added scwm-screen-ci.hpp Thu Jul 30 20:08:25 1998 Greg Badros * virtual.h, virtual.c: Rename MoveViewport into MoveViewport_internal, and make MoveViewport muck with the constraint variables before calling MoveViewport_internal. * scwm.c: Call CassowaryInitClVarsInPscreen * resize.c, move.c: Use CassowaryModifyOpaqueFlag to ensure that we always do opaque moves and resizes w/ constraint solver; fixed bugs in moving of icon w/ rubberbanding * menu.c: Return the value of the called lambda for a menu item execution to support the select-window-from-window-list functionality. * font.c: patch from Itani for I18N. * borders.c: Fix bug in corner_width too small when no title width -- make corners be at least 12 pixels. * add_window.c: Add constraint dummies. Wed Jul 29 20:23:03 1998 Greg Badros * move.c, xmisc.c, font.c: Add a scope brace and use pxfs in ComputeXTextWidth; use XFONTID in DisplayMessage. use XFIXEDFONTNAME, not XFIXEDFONTSET in font.c. All I18N fixes. * face.c: Make set-face-flag! a primitive, reorder the function to avoid a prototype. * decorations.c: Don't turn off fBorder if boundary_width == 0; keep them orthogonal * borders.h: Fix the FULL_HILITE enum value. Fixes bug in the redraw of the corners * borders.c: Clean up SetBorderX a bit. Use SAFE_IMAGE in DrawButton, and bail if we fail to get the image. * window.c: Fix docs of restack-windows * resize.c, virtual.c: remove one, and ifdef out another probably spurious RemoveRubberbandOutline call. * shutdown.c: Do not call0_hooks on a segfault. Only do X stuff if dpy is non-null * scwm.c: Use XmuPrintDefaultErrorMessage, if user has libXmu Wed Jul 29 12:24:49 1998 Greg Badros * util.c: Use idiomatic for loop for traversing ScwmWindow list, fixed a bug and some redundant code. * font.c: Use scm_permanent_object, not scm_protect_object for str_fixed, and others. * decor.c: Use UNSET_SCM instead of testing for equality with SCM_UNDEFINED so #f counts as undef'd also. Wed Jul 29 11:32:34 1998 Greg Badros * scwm-constraints.hpp, scwm-constraints.cc, scwm.c, screen.h: Added pssci field of struct ScreenInfo and initialize it to NULL * constraint-primitives.cc: Added accessors for screen-clv-vx, screen-clv-vy. * borders.c, add_window.c: Remove the setting of title_height in SetupFrame -- do it in AddWindow instead. * makefile.cassowary: First go at a scwm_cl.static target. Fails because other libraries aren't statically linked. * scwm-screen-ci.hpp: Added, for ClVariables attached to scruct ScreenInfo. Mon Jul 27 20:45:24 1998 Greg Badros * {move,resize,window,scwm-constraints}.c: Got resizing and moving with rubberband to work using a more clean framework. Mon Jul 27 20:08:39 1998 Greg Badros * miscprocs.c, screen.h: Remove OpaqueMoveSize, set-opaque-move-size! primitive, since it's now an argument to interactive-move and interactive-resize * window.h, window.c: Added SetScwmWindowPosition, and added fOpaque flag to both it and SetScwmWindowGeometry * scwm-constraints.h, scwm-constraints.c, add_window.c: Added fOpaque flag to SuggestSizeWindowTo and SuggestMoveWindowTo * resize.c: Display size in window units, not pixels 1998-07-27 Greg Badros * Makefile.am: added move.x for interactive-move (was in window.x) * font.h, icons.c, events.c, drawmenu.c, decor.c, borders.c: Cleanup the horrible I18N #ifdefs -- still more needs to be done with XDrawString vs. XmbDrawString, but stuff is better now. Added XFONTID to get at the ->fid field. * binding.c, binding.h: Moved GrabKeys, GrabButtons into here. Fix bug with bind-mouse in not grabbing the new button (renamed context to wincontext so future bugs [confusion of var context with var contexts] will be more obvious). Use for loops for iterating the windows, not while loops. * add_window.h, add_window.c: Move Grab/Ungrab functions into binding.c. Pretty major cleanup and documenting of AddWindow routine -- reduce redundancies, call XSaveContext right after creating each window * xmisc.h, xmisc.c: Added WXGetPointerOffsets, WXGetPointerChild, removed bogus XGetGeometryCacheIt since I found the bug that I introduced that fn for. Added SzExtractTextPropValue, ComputeXTextWidth. Renamed FXGetPointerWindowOffsets to WXGetPointerWindowOffsets, and have it return the child window (Changes throughout all source to use WXGetPointerWindowOffsets) * window.h: document more ScwmWindow fields * move.c, window.c: moved interactive_move into move.c from window.c; added primitives: icon-position and window-diff-deltas * scwm.h: comment out FFromSCMBool, FInvertFromSCMBool since gh_scm2bool exists. Added COPY_BOOL_OR_ERROR_DEFAULT_{TRUE,FALSE}. Drop externs of Window BlackoutWin. * scwm.c: Call init_move, move JunkVars into xmisc.c * scwm-constraints.h: Added FRAME_X_NONVIRT, FRAME_Y_NONVIRT (stll need to be used far more often to make viewport stuff work) * resize.h, resize.c: Added InteractiveResize, and make that in the public interface, instead of interactive_resize (which now mostly just calls the former). Added fOpaque flag to InteractiveResize, option to interactive_resize primitive. * move.h, move.c: Added fOpaque flag to InteractiveMove, option to interactive_move primitive; fixed bugs in dealing with icons, move ComputeXTextWidth into xmisc.c, and make it take an extra arg, the length, or -1 to mean use strlen. Move interactive-move primitive to here from window.c, and make move.x get generated. * placement.c: save frame position in xdiff, ydiff using FRAME_X_NONVIRT, Y_NONVIRT * miscprocs.c: Added X-server-set-synchronize primitive 1998-07-27 Robert Bihlmeyer * xproperty.c: Forgotten inclusion of guile-compat.h prevented 1.2-compatibility. 1998-07-26 Greg Badros * window.h, window.c: Remove the SMOB functions from window.h. Added MoveTo, ResizeTo, MoveResizeTo, and use them instead of SetupFrame most places throughout scwm. Move move_finalize, MovePswToCurrentPosition, ResizePswToCurrentSize up earlier in window.c, and document them all (see code). * virtual.c: Use MoveTo, not SetupFrame. * placement.c: Rename keep_on_screen to CorrectPositionToStayOnscreen, since it doesn't actually move a window, it just fiddles with coords. * move.c: Fix animated window shade to not require a redundant SetupFrame call. * icons.c: Use move_finalize instead of SetupFrame. * events.c: Use MoveResizeTo, ResizeTo instead of SetupFrame. I think lots of redundant M_CONFIGURE_WINDOW fvwm2 module packets are sent out! FIXGJB * decor.c: Use ResizeTo instead of SetupFrame. There is an extra distinction that should probably be made between calls that change the decorations and thus affect the overall frame size and calls that are intended to resize the client window (the latter involves the client application, but both involve the constraint solver) * dbug_resize.h: Generalize for non gcc compilers like DBUG is. * borders.c: Fix some bugs in window shading, be a bit more careful about X11 calls, and comment SetupFrame more thoroughly. 1998-07-26 Greg Badros * resize.c, resize.h, scwm.c: Added init_resize_gcs() and call it after the X11 stuff has been initialized 1998-07-26 Greg Badros * Pretty massive cleanup of interfaces. Removed unneeded prototypes from header files -- in particular the primitives are no longer exposed in the header files unless they are used directly by C code (such instances are marked as encapsulation violations to be cleaned up at some point). Also, use window_fwd.h instead of including window.h, where possible. Note that the init_MODULE function prototypes for SMOBs are all put in scm_init_funcs.h by the build procedure, so they are no longer listed in the .h files. In particular, this means that some header files are nearly empty, but I've chosen to keep them around since at some point a public C interface may be added for them. Sometimes macros that were in the header file have been moved into the top of the .c file if they are just implementation details hiding behind the public interface of the module. Also note that the mark_, print_, free_ functions are no longer prototyped-- they hide behind init_XXXX's registering of the SMOB type. * window.c: rearrange ordering of some funcs to avoid forward decls. * placement.c: use move_finalize instead of move_to-- the former is part of the C interface of ScwmWindows, while the latter is a primitive that does unnecessary work; Also use InteractiveMove instead of interactive-move for the same reason. * move.h, move.c: Simplify interface to InteractiveMove, and make it know all about finding the button-click mouse position and dealing with icons (moved the code from the one call to InteractiveMove into the function, and then added another call to InteractiveMove from placement.c) * events.c: Use Iconify (C public-interface function) instead of iconify (primitive) * binding.c: have_orig_position is now a Bool, not an int * window_fwd.h: Added, for use by header files that only need pointers to the ScwmWindow struct (must use struct ScwmWindow, or "#define ScwmWindow struct ScwmWindow" -- be sure to #undef at end of header file 1998-07-26 Greg Badros * screen.h: Pruned and cleaned up the ScreenInfo struct a lot. MyDisplayXXX is now DisplayXXX -- Fixed uses of DisplayXXXX throughout; use PackedBool macro and expand flags bitmasked field, so Scr.flags & WindowsCaptured is now just Scr.fWindowsCaptured [dropped the #defines of the flag constants]; made GET_DECOR look more like a macro since it can't be used much like a function at all; drop CornerWidth, NumBoxes fields -- unused; drop COLORMAP_FOLLOWS_MOUSE, COLORMAP_FOLLOWS_FOCUS #defines, and use fColormapFollowsMouse boolean instead. * miscprocs.c, deskpage.c: simplify s_set_menu_mwm_style_x, other settors to use COPY_BOOL_OR_ERROR * color.c: #ifdef out first of multiple calls to SetBorder to see if there is any crazy (undocumented) reason why multiple calls are needed * borders.h: drop redundant prototype for SetTitleBar() * events.c: added some debug code to test a claim in a comment regarding when to raise a window when !Scr.fClickToFocusRaises * miscprocs.c, resize.c: move set_rubber_band_mask_x from miscprocs.c into resize.c, and initialize DrawRubberBandGC in init_resize() * placement.c: clean up SmartPlacement a bit * util.c: clean up redraw_titlebars * borders.c: Added init_border to initialize TransMaskGC, now file-static (not really the right thing, is it that expensive to create GCs that we don't want to do it for each button draw?), use GET_DECOR (renamed from GetDecor to be more obviously a macro) * shutdown.c: improve startup-hook documentation * scwm.h, window.h: Moved PackedBool here from window.h, moved COPY_BOOL_OR_ERROR and COPY_INVERT_BOOL_OR_ERROR from window.h, since these are now used in more places than just window.c; struct ScwmWindow -- drop orig_x, orig_y -- just orig_{width,height} now. Drop CORNER_WIDTH macro -- unused. * window.c: Don't call SetupFrame on animated shade/unshade -- only do it on unanimated. 1998-07-25 Greg Badros * *.c: mark_XXXXX -- use GC_MARK_SCM_IF_SET pervasively, instead of scm_gc_mark (just in case something is not initialized) * *.c: use new SCWM_SYMBOL macros pervasively * callbacks.c: doc string spelling fix, drop a FIXDOC since the extractor now gets HOOK comments * constraint-primitives.cc: Use a set, not a list for the dirty windows. Better debug support on ScwmResolve. Clear the set of dirty windows when there is a new master solver. Added doc strings * decor.c: Docstring edit * drawmmenu.c: Move RelieveRectangle into xmisc.c * events.c: Use new ConstrainSize() args; better debugging for HandleConfigureRequest() * face.c: doc string changes * makefile.cassowary: rebuild extratags when TAGS changes * module-interface.c: Doc comment fixes * move.h, move.c: Added MapMessageWindow(), UnmapMessageWindow(); clean up some I18N support and added a ComputeTextWidth function (FIXGJB: maybe this should go in xmisc.c?); Improve DisplayMessage; Use move_size of 10 in Keyboard_shortcuts() instead of menu entry height (which was completely broken anyway, and I removed Scr.EntryHeight from the struct ScreenInfo in screen.h * placement.c: typographical changes -- I hate spaces between function name and parameter list! :-) * resize.h, resize.c: Better encapsulate ConstrainSize, resizing: drop all the file-static variables that manage the resize operation. Added opaque resizing, dropped DoResize (and with it the rubberband -- I'll bring the rubberband back, soon, as I imagine people w/ slower machines [like me at home] want this); Got resizing working with Cassowary; Added ComputeNewGeometryOnResize to enclose the constrain size stuff; further improve CreateMessageWindow. * scwm-snarf.h: Added SCWM_SYMBOL, SCWM_GLOBAL_SYMBOL macros which currently just pass along to SCM_??_SYMBOL macros * screen.h: Rename SizeWindow -> MsgWindow. Drop SizStringWidth and EntryHeight since these are no longer used * scwm-constraints.h, scwm-constraints.c: Added x,y args to SuggestSizeWindowTo since resizing to the left involves moving, too. Call AddSizeConstraints on a new window; make SuggestMoveWindowTo check to make sure the window really moved before calling XMoveWindow. * scwm-constraints.hpp: Added AddSizeConstraints(); make CopyStateToPswVars return two bools, fMoved, fResized; better debugging -- added a _name member to SWCI * scwm.c: reorder some initialization stuff to be a bit safer, drop last arg from CreateMessageWindow since MWMMenus flag was unused by it * xmisc.c, xmisc.h: Added FXGetWindowSize, RelieveRectangle (move from drawmenu.c, since the message window needed the code) * window.h, window.c: Added SetScwmWindowGeometry to resize and move a window properly. Added select-window-interactively (takes a prompt), generalize the size and pointer window into a message window, and rename appropriately. * dbug_resize.h: Added for tracing the resize operations 1998-07-24 Greg Badros * Makefile.am: Added screen.c, screen.x * face.c: Fix the layout of the Face Specification flags concept * move.c, scwm.c (InitVariables): Use msg_window_* not size_window_* * screen.c: Rename size_window_* fields to msg_window_* * constraint-primitives.cc: Added ResizePswToCurrentSize * scwm.c: Added scmScreen object, and initialize it to be the SMOB for the global Scr. Init Scr.size_window_{fg,bg}. Call init_screen. Use new name CreateMessageWindow() not CreateSizeDisplayWindow(). * color.h: Added SAFE_XCOLOR_OR_{WHITE,BLACK} macros * icons.c, borders.c, borders.h, drawmenu.c: use SetGCFg, new version of NewFontAndColor that takes a GC as the first argument. * resize.c, move.c: Rename CreateSizeDisplayWindow to CreateMessageWindow, and rewrite DisplaySize and DisplayPosition to use new DisplayMessage() that just puts a string in the window. * xmisc.c (SetGCColors): Added, along with SetGCFg, SetGCBg * window.c (ResizePswToCurrentSize): Added this function * screen.c: Wrap ScreenInfo in a SMOB so marking of the SCM member fields works (this was a long-time latent bug) 1998-07-23 Greg Badros * xproperty.c: Add parens to disambiguate (a>>2+1) [(a>>2)+1] * xmisc.h: include X11/Xlib.h * window.[ch]: remove unused vars, use cassowary interface on move-to primitive, eliminate the move_finalize -- it seems unnecessary, move interactive_resize into resize.c * virtual.c: Added prototype for RemoveRubberbandOutline(), remove MoveOutline proto * shutdown.h: Added missing prototype for run_startup_hook * shutdown.c: Replace dead assignment which forced the core dump with a function call so we're sure that the code doesn't get optimized away through dead code elimination. * scwm.c: Re-checked all the header dependencies. Moved CreateGCs here, added call to init_resize, move out the code that creates the size & position display window to CreateSizeDisplayWindow function * scwm-constraints.hpp: Added return type for AddStays. * scwm-constraints.{cc,h}: Added CassowaryEditSize(), SuggestSizeWindowTo(), and rename CassowaryEndEditPosition() to just CassowaryEEndEdit(). * screen.h: Added size_window_{font,fg,bg} for controlling the size and position window (shown during interactive moves) * resize.[ch]: modularize better -- make globals file static instead. move interactive_resize primitive here, and add resize.x. Added CreateSizeDisplayWindow(), added primitive set-size-and-pos-window-attributes. Factor out InitializeOutlineRects() and use it * placement.c: Removed massive #if 0 from Maciej's rewrite -- it was too long, and is in the repo anyway. * move.[ch]: Added abstraction MapSizePositionWindow(), drop fAddWindow parameter from moveLoop, and document it better, added RedrawOutlineAtNewPosition() and RemoveRubberbandOutline() functions to make code more clear, and clean up moveLop fn. Use Scr.size_window_font for DisplayPosition() fn. Clean up InteractiveMove() * module-interface.h: Added missing prototype for BroadcastMiniIcon * miscprocs.c: Added scwm-path-prefix and scwm-path-exec-prefix * makefile.cassowary: Added extratags target so that cassowary source files get tags built, too * font.[ch]: Make str_fixed global. Clean up menu_font_update so it does not mess with the size/position window * menuitem.c, draw-menu.[ch], draw-pie-menu.c: Rename scwmmenu.h for inclusion * constraint-primitives.cc: Use a list, not a vector for rgpswDirty, use DBUG, not scwm_msg for independent variables. * colors.c, colors.h: Move CreateGCs() into scwm.c, since it is an initialization routine * xmisc.c, icons.c, decor.c, callbacks.c, borders.c: Fix warnings, clean comments, remove unused vars * add_window.c: Added add_window.x, remove unused vars, give simple SuggestSizeWindowTo function for non-cassowary code * Makefile.am (scwmpaths.h): Added writing of SCWM_PREFIX and SCWM_EXEC_PREFIX #defines. * Makefile.am: Added scm_init_func.h target, using new script generate_scm_init_funcs. Alphabetize scwm_SOURCES var. Separate out guile_snarfs from BUILT_SOURCES. Update for scwmmenu->menu name change. Added add_window.x, resize.x. * generate_scm_init_funcs: Added this script to be used by the makefile for generating the new scm_init_funcs.h file, included by scwm.c to declare protoes for all the init_MODULE functions so we do not *have* to include header files for just those functions. * menu.c, menu.h: Renamed from scwmmenu.c, scwmmenu.h for consistency, so new scm_init_funcs.h works as it should (declaring the prototypes for all the init_MODULE functions) * menuitem.c, scwmmenu.c, xproperty.c (mark_XXXX): Don't guard marking subobjects with if (SCM_GC8MARKP(XX)) since the parent object will already be marked in newer snapshots of guile. 1998-07-23 Maciej Stachowiak * callbacks.c: Replace "Timer" with "Input" in the input hook concept documentation (whoops). 1998-07-22 Greg Badros * events.c (HandleScwmExec): Fixed a couple little problems that may not have immediately been show stoppers -- now last_offset += (nitems * (form_ret/8)). Also added more troubleshooting code so that it doesn't just fail silently, and point at doc/scwmexec.proto as additional documentation. Added reset-scwmexec-protocol primitive as a just-in-case to avoid restarting X server. * *.c: Fixed purpose strings (one line sentences at start of procedures), corrected spelling mistakes 1998-07-21 Maciej Stachowiak * events.c (HandleScwmExec): Examined this function. I could not find a problem, but added many explanatory comments. 1998-07-21 Greg Badros * scwm-constraints.h: Update proto for CassowarySetCValuesAndSolve, add proto for CassowaryNewWindow * scwm-constraints.cc: Add extra arg to CassowarySetCValuesAndSolve, honour it, and also don't call resolve and endEdit() if there are no editVars (i.e., no changes to the window's position or size) * miscprocs.c: Add period to docstring * placement.c, borders.c: Send extra arg to CassowarySetCValuesAndSolve. * add_window.c: Added second param to CassowarySetCValuesAndSolve, a bool to tell whether should solve (or just set the values). Added CassowaryNewWindow hook to permit adding the stay constraints in at the right time. * window.c, window.h: Add COPY_BOOL_OR_ERROR and COPY_INVERT_BOOL_OR_ERROR macro, and use throughout for error checking in primitives that do simple assignment of a boolean to a C variable (simplifies a bunch of primitives) * miscprocs.c: Fix misuse of flag formal in set_smart_placement_is_really_smart_x * binding.c, miscprocs.c: fix mismatches between c func name and primitive name, as warning by extract-docs * module-interface.c: quote "M_ICONIFY" in the comment docstring since it is not an argument. * miscprocs.c, scwmmenu.c, scwm.c, xproperty.c: document arguments that weren't documented before (extract-docs now warns about these cases) * window.c: Added FUNC_NAME to the window-icon-title primitive; be sure to use FUNC_NAME pervasively -- extract-docs will warn if it's missing Tue Jul 21 15:01:46 1998 Greg Badros * constraint-primitives.cc: Remove the obsoleted hard-coded sample constraint-creation primitives, keep-to-left-of and keep-tops-even, since that can now be done from scheme more generally. 1998-07-21 Maciej Stachowiak * shutdown.c, shutdown.h: Added startup-hook and run_startup_hook() function. This is probably not the right place for it, but I can't think of a better one at the moment; I don't want to start a new file or clutter up scwm.c any further. scwm.c: Call run_startup_hook() after all windows are captured. Tue Jul 21 14:09:11 1998 Greg Badros * constraint-primitives.cc: Added window-clv-{x,y,width,height} to get at the constraint variable objects. Don't call addVar in the obsoleted functions-- it's redundant with using the add-stays-on-window primitive. * scwm-constraints.hpp: Added scheme objects to hold the ClVariable-s attached to the window. * scwm.c: Use protos for the two cassowary functions I need, instead of including whole header files Tue Jul 21 10:38:35 1998 Greg Badros * scwm-constraints.hpp: Add psolver argument to AddStays, add Psw() memfn, CopyStateToPswVars() memfn * scwm-constraints.cc: guard everything with if (!psolver), and do a regular move window in SuggestMoveWindowTo if !psolver, since if there is a psolver, its callbacks result in moving the window * constraint-primitives.h: extern "C" sandwich * constraint-primitives.cc: extern "C" protect inclusions of scwm-proper files scwm.h, window.h. Added ScwmClvChanged and ScwmResolve callbacks, to manage the new rgpswDirty container so windows only move once when any of their settings change. Set the callbacks in scwm_set_master_solver Tue Jul 21 10:30:43 1998 Greg Badros * window.c (MovePswToCurrentPosition): Make ScwmWindow * a const ScwmWindow. 1998-07-20 Maciej Stachowiak * callbacks.c (run_input_hooks): Make sure port is still open before checking if it has characters ready. I could have sworn I made this change already (it is definitely there for force_new_input_hooks). Am I on crack, or did it somehow get reverted? 1998-07-20 Maciej Stachowiak * add_window.c (AddWindow): Removed pointless debugging message. * module-interface.c (marshal_fvwm2_iconify_info): Added new primitive `marshal-fvwm2-iconify-info'. This procedure constructs the contents of an M_ICONIFY fvwm module packet for WIN and returns it as a Scheme string. * add_window.c, window.c: Use the new BroadcastMiniIcon * module-interface.c (BroadcastMiniIcon): Added BroadcastMiniIcon and a broadcast-mini-icon-hook. I've simplified it to only take (and pass) the window structure; I figure Scheme code can do the marshalling out of that. * image.c (image_properties): Added 'pixmap and 'mask properties to image-properties return value. These are needed for the fvwm-module stuff, and could be useful for communicating with other X programs as well. * color.c (hilight_foreground, hilight_background): New primitives hilight-foreground and hilight-background which get the foreground and background colors in the current decor. Needed for fvwm-module stuff, and probably generally useful. * window.c (window_icon_title, window_icon, window_mini_icon): Added new primitives window-icon-title, window-icon and window-mini-icon to get the icon title, icon image and mini-icon of a window respectively. Needed for fvwm-module stuff, and probably generally useful. Mon Jul 20 18:03:11 1998 Greg Badros * scwm-constraints.cc, constraint-primitives.cc: renamed from .c, since they are C++ code * Makefile.am: removed the above files, and constraint-primitives.x from mention * makefile.cassowary: added -- use `make -f makefile.cassowary scwm_cl' to build after running configure with --with-cassowary=/path/to/cassowary * scwm-constraints.hpp: added -- the c++ header file for scwm-constraints.cc; this gets included by constraints-primitives.cc, but not by the rest of scwm. * utilities/dev/extract-docs: improved, added more warnings -- you should run extract-docs on your souce files from now on to at least get warnings (some very useful for diagnosing problems with the source code, not just the comments) * window.h: go back to simply embedding frame_{x,y,width,height}, but add a pointer to an opaque ScwmWindowConstraintInfo unconditionally (this will be replaced by whatever window extension mechanism comes into existence) * scwm.c: do not define a global solver object * scwm-constraints.h: Do not use ScwmClVariables any longer -- simplify accessing cassowary from scwm into a simple interface and stub those functions. #define SET_CVALUE for use when assigning values to constrained vars (vars which are shadowed by constrained variables) * window.c, add_window.c, borders.c placement.c, move.c: use the new cleaner interface from scwm-constraints.h -- reduces #ifdef USE_CASSOWARY a lot! add_window.c has the empty stubs for the prototypes that may be turned into real hooks later. * system.h: do not use new and delete unless __cplusplus is defined and USE_CASSOWARY is defined (nothing uses this now) * image.c: fix a warning due to a constness bug in guile Mon Jul 20 15:03:39 1998 Greg Badros * events.c (HandleScwmExec): Fixed long-time probable bug that I just noticed for the first time-- last_offset was being increased by last_offset+1, instead of just being incremented. I'm not sure of the purpose of the loop, or of the protocol in general, but the code looked wrong, and my fix gets things working for me again. Mon Jul 20 14:24:13 1998 Greg Badros * binding.c, color.c, deskpage.c, image.c, miscprocs.c, scwmmenu.c: Update some comments based on warnings reported by new additions to extract-docs. All unquoted all-caps words should refer to arguments -- I change NOTE: to Note: or to a FIXGJB, FIXMS comment -- the latter still produce warnings in extract-comments, but it's a good thing! * scwm.c: Move InitVariables() and InternUsefulAtoms() up to the top, and remove their prototypes. Inline SetRCDefaults() since it was short and not a useful abstraction. Move MappedNotOverride() to before CapturaAllWindows(), and make it static. Move LoadDefaultLeftButton, LoadDefaultRightButton, LoadDefaultButton, ResetAllButtons into face.c. Move DestroyScwmWindow, InitScwmDecor into decor.c * face.c: Moved Button faces into here from scwm.c (see above) * decor.c: Moved fns from scwm.c into here & made static. * screen.h: remove some obsoleted prototypes. Mon Jul 20 13:43:51 1998 Greg Badros * *.c, *.h: Replace _XA_ atom names with XA_ atom names, since _UPPERCASE is res'd for impl. * *.c: Use #define FUNC_NAME, #undef FUNC_NAME to bracket primitives, and use FUNC_NAME within the primitive -- error handling code gets cut and pasted a lot, and an incorrectly-specified function name could be really annoying to track down. extract-docs checks the #define -- we could automate instead, but that would slow compile times more, and require an extra build step * Fixed a couple of doc strings that were mis-commented, added a couple for primitives that were missing doc strings * window.c (print_window): Print the windows name along with its id. 1998-07-20 Maciej Stachowiak * add_window.c (AddWindow): Add an explanatory comment. * window.c (set_icon_x): Broadcast the new icon filename. Sun Jul 19 14:18:48 1998 Greg Badros * xproperty.c, window.c, scwmmenu.c, image.c, font.c, color.c, xproperty.c: use MAKE_SMOBFUNS and REGISTER_SCWMSMOBFUNS macros. Move the registration of the smob to *before* and of the objects are created (these were lurking bugs) * decor.h, decor.c: fix bugs in mark_decor -- was marking not-yet-constructed objects (maybe this is a missing SCM_DEFER_INTS, but this fix works and is safer) * scwm.h: make GC_MARK_SCM_IF_SET also check for scm == 0 and not mark that 1998-07-19 Maciej Stachowiak * xproperty.c: Documented all concepts and primitives. * window.c: Documented all primitives, concepts and hook. Ouch! * shutdown.c: Documented all primitives and hooks. 1998-07-18 Maciej Stachowiak * module-interface.c: Documented all primitives and hooks. * miscprocs.c: Documented all primitives. * image.c: Documented all primitives, concepts and variables. Did not document image-not-found-hook; it should be changed to a proper hook, and possibly eliminated as it is somewhat redundant with error-hook. Or else there should be a warning-hook that it should be redundant with. * font.c: Documented all primitives and concepts. * face.c: Documented all primitives, hooks and concepts. * events.c: Documented all primitives, hooks and concepts. Continuing the FXDOC convention. * callbacks.c: Use FIXDOC comments to indicate changes that I think are needed for the docstring comment format, or things I don't know about it yet. Sat Jul 18 16:26:11 1998 Greg Badros * scmtypes.h, scmtypes.c: Removed -- now individual init functions do the right thing * window.c, scwmmenu.c, menuitem.c, face.c, decor.c: Add smob type initialization code using the below macros to obviate the need for scmtypes.{h,c} * scwm.h: Added MAKE_SMBFUNS and REGISTER_SCWMSMOBFUNS macros that should be used more consistently * scwm.c: Remove call to init_scwm_types, don't include scmtypes.h any longer Sat Jul 18 11:15:59 1998 Greg Badros * *.c, *.h: Use #ifdef HAVE_CONFIG_H to guard #include config.h, and use those three lines pervasively (most header files were missing the #includes-- can be a subtle bug if you're not on your toes [I was caught flat-footed this past week]). * decor.c, events.c, module-interface.c, placement.c, window.c, window.h, xproperty.c: Replaced all uses of SCWMWINDOW macro with PSWFROMSCMWIN since that is a less ambiguous name, and makes more sense given the pervasive use of the psw tag througout. Commented out SCWMWINDOW macro definition so it can be used no longer. 1998-07-18 Maciej Stachowiak * add_window.c: Documented all hooks. * deskpage.c: Documented all primitives and concepts. 1998-07-17 Maciej Stachowiak * decor.c: Documented all primitives and concepts. * color.c: Documented all primitives and concepts. * callbacks.c: Documented all primitives, hooks and concepts. Fri Jul 17 18:46:18 1998 Greg Badros * Makefile.am, scwm-constraints.c: Added scwm_constraints.c * scwm-constraints.h: Added more functional ScwmClVariable, with pointer to enclosing _psw * window.h, window.c (MovePswToCurrentPosition): Added; made move_finalize static. * constraint-primitives.c: add keep_to_left_of, add_stays_on_window primitives, better debugging * add_window.c (AddWindow): attach ScwmClVariable-s to the psw w/ set_psw * move.c (moveLoop): Use cassowary's beginEdit, resolve, endEdit construct Fri Jul 17 13:33:17 1998 Greg Badros * all-files: Eliminate #includes of misc.h (gone), and system.h (#included by scwm.h now); add #includes of other headers as now needed * borders.h: Move HILITE macros here, and turn them into an enum * xmisc.c, xmisc.h: XGetPointerWindowOffsets renamed -> FXGetPointerWindowOffsets, XGetWindowTopLeft renamed -> FXGetWindowTopLeft * misc.c, misc.h: Removed; functions dispersed as appropriate, often into xmisc.c * Makefile.am: updated to reflect removal of misc.c, misc.h and rename of constraint-primitives.cc -> .c Thu Jul 16 16:19:38 1998 Greg Badros * module-interface.c, xmisc.c, constraints.h: include * constraint-primitives.c: return SCM_UNSPECIFIED * add_window.c (AddWindow): Better constraints debugging support -- give the variables a reasonable name * menuitem.c, scwmmenu.c: Use SCM_UNDEFINED to end gh_list call * window.c (DestroyScwmWindow): Fix memory leak -- XFree is now called on psw->name before deallocating psw. * binding.c (FKeyToKeysymModifiers): Fix bug in handling of uppercase single keystrokes (e.g., C-M-S-E) -- the keysym that was looked for was the uppercase keystroke, which isn't bound to any key -- use tolower to convert. 1998-07-16 Greg Badros * all: Use FREE and NEW instead of free and malloc, use FREEC and NEWC for free and new w/ counts of objects (for arrays), and use FREECPP and NEWCPP and FREECPPC and NEWCPPC for C++ style memory allocations w/ ctr invocations. Fix some bugs by the removal of the cast of old malloc calls' return values. * all: Use FRAME_{X,Y,HEIGHT,WIDTH} macros to access the rvalue of the window geometry -- does the right thing based on USE_CASSOWARY * system.c: Make safemalloc really call calloc * system.h: Define new memory management macros FREE,NEW,FREEC,NEWC,FREECPP,NEWCPP,FREECPPC,NEWCPPC * window.h: Use ScwmClVariable's for frame_{x,y,width,height}, added PSWFROMWIN macro * icons.c, placement.c, util.c, virtual.c, window.c: Rename some temporaries to psw * scwm.c: add global solver variable. * borders.h, borders.c: Added two new args to SetupFrame, and define bool constants WAS_MOVED,NOT_MOVED, WAS_RESIZED,NOT_RESIZED to set them * Fix a couple of memory leaks 1998-07-16 Maciej Stachowiak * add_window.c (AddWindow): Replace a call to ResetAllFlags with ResetCommonFlags to avoid clobbering the fTransient bit (and probably other stuff). D'oh! 1998-07-15 Maciej Stachowiak * placement.c (PlaceWindow): Use user-defined placement functions. In particular, if the window is transient, use the 'transient-placement-proc object property, if not, use the 'placement-proc property. If the appropriate property is not set, use default_transient_placement_proc or default_placement_proc which do what scwm used to do, i.e. what fvwm2 would do. Gravity is not properly respected at all now, regardless of the border width, but I know how to fix this. Will do so soon. There is a separate property for transient window placement, because it is almost always desirable to place transient windows according to a different algorithm than regular top-level windows. In particular, ICCCM reccomends that transient windows always be placed exactly where requested by the program, without user interaction. Users will rarely want to override this behavior. (default_select_desk): Separated out desk selection into this new procedure to make PlaceWindow easier to understand. However, desk selection and switching should not happen here, but should ultimately be done in the placement functions (as should possible viewport selection). This needs to be fixed. (smart_place_window, clever_place_window, random_place_window, default_placement_proc, default_transient_placement_proc): New Scheme primitives for use as window placement functions: `smart-place-window', `clever-place-window', `random-place-window', `default-placement-proc' and `default-transient-placement-proc'. Each of these takes a single window argument. `smart-place-window' has the effect of fvwm's SmartPlacement with SmartPlacementIsReallySmart off; clever-place-window has that effect as if SmartPlacementIsReallySmart were on. random-place-window Other Scheme-level procedures which may be useful in user-defined placement procedures include `ineractive-move', `move-to' and `interactive-resize'. Each of these should work properly. (init_placement): Initialize the placement module. * placement.h: Prototype init_placement(). * Makefile.am: build placement.x * scwm.c (scwm_main): Initialize the placement module. * window.c (window_transient_for): New Scheme primitive `window-transient-for'. This takes a single window argument WIN which defaults to the window context in the usual way. If WIN is transient, and the window it is transient for is not the root window and is being managed by scwm, return the window object of the window that WIN is transient for, otherwise return #f. * miscprocs.c (capturing_p): Added a Scheme primitive `capturing?' that determines whether or not we are currently intially capturing or recapturing the windows (via the poorly name PPositionOverride global variable). When this is true, it is desirable to avoid user interaction or other black magic when placing windows. * add_window.c (AddWindow): Call PlaceWindow much later, after the frame and all attendant windows have already been set up. Tue Jul 14 16:24:19 1998 Maciej Stachowiak * scwm.c (scwm_main): Make sure scwm initialization happens in the root module rather than the new (user) module, to work around a bug in scm_sysintern. Thanks to Mikael Djurfeldt . 1998-07-13 Maciej Stachowiak * syscompat.h: Remove extraneous semicolons. * guile-compat.h: If the 3-argument version of scm_make_vector is in effect, define a macro that defines the 2-arg version in terms of the 3-arg. font.c, color.c, image.c: Use the 2-arg version of scm_make_vector always. Mon Jul 13 15:20:11 1998 Maciej Stachowiak * callbacks.c: Use limits.h and LONG_MAX instead of values.h and MAXLONG; as Perry E. Metzger reported, this is the POSIX way of doing things, and thus more portable. 1998-07-10 Greg Badros * window.c (DeferExecution): Clean up of DeferExecution, inspired by Harvey Stein's latest complaint about the bugs related to it. Still could use more work, but better than before for me, it seems. Fri Jul 10 10:45:31 1998 Maciej Stachowiak * events.c (XNextEvent_orTimeout: Remove the #ifdef _hpux, it's unnecessary, and an evil system-test macro anyway. Thanks to Stephen Tell . * syscompat.c: #define setlinebuf in terms of setvbuf or (approximating) setbuf. Based on a patch from Stephen Tell . 1998-07-08 Greg Badros * color.c, shutdown.c: fixed arguments that didn't match argument list numbers for req, opt, var (extract-docs found these bugs!) * *.c, *.h: Rename swCurrent to pswCurrent, use psw for locat ScwmWindow * variables. * window.c: fix a couple of bugs noticed by Dale Smith -- wasn't assigning to psw before testing for return value in frame_id_to_window and id_to_window. * drawmenu.c: Added a tiny multibyte patch from ITANI Eiichiro. * events.c: Use DBUG not WARN for the hook-call messages * menuitem.c (menuitem_properties): use SCM_EOL, not SCM_UNDEFINED to end a list. Added documentation for the primitives. * *.c: Added #include to files that were missing it 1998-07-07 Greg Badros * *.c, *.h: Rename to SCWM_DEFINE_HOOK, instead of DEFINE_HOOK * binding.c: Added comments for primitives, in an extractable format. See utilities/dev/extract-docs for prototype extractor. Also added example /**CONCEPT: ... */ documentation comment to be woven into a section on concepts Mon Jul 6 19:53:46 1998 Maciej Stachowiak * miscprocs.c: Fixed SCWM_PROC macro for set_smart_placement_is_really_smart_x (was not getting snarfed properly). 1998-07-06 Greg Badros * Makefile.am: Added decor.x to $(BUILT_SOURCES) * scwm.c decor.c: #include decor.x, and call init_decor() * scwm.h: #include "scwm-snarf.h" * *.c: Use SCWM_PROC instead of SCM_PROC Mon Jul 6 02:49:08 1998 Maciej Stachowiak * events.c (HandleButtonPress, HandleKeyPress): replace call_thunk_with_message_handler with scwm_safe_call0. I don't believe anyone is using the (deprecated) symbol-dereferencing functionality of the former, and the added safety of the latter is a good thing. * add_window.c, borders.c, decor.c, drawmenu.c, events.c, font.c, font.h, icons.c, misc.h, move.c, resize.c, scwm.c, scwmmenu.h : Multibyte character set support from ITANI Eiichiro . Some of these changes should be reviewed, but they build and work both ways. * window.c: Rename window-from-window-id to id->window and make it ensure that we really are looking up by only the window id and not various decoration ids. Also added frame-id->window primitive. Sun Jul 5 23:13:06 1998 Maciej Stachowiak * window.c (restack_windows): Added new primitive restack-windows which takes a single argument, a list of windows. The windows will be restacked in the following manner: the first will be left in its current position in the stacking order, and the following windows will be restacked immediately below it, in order. Currently this is of limited usefulness, since it is impossible to introspect the stacking order from the Scheme level, but this will soon be remedied. 1998-07-05 Greg Badros * Makefile.am: Mark SCM_SYMBOL and SCWM_PROC macros for etags. * color.c, color.h : Use SCWM_PROC throughout for primitives, remove argument from getter functions, e.g., menu_hilight_factor, shadow_factor, etc. * scwm.h: Added #define of XSERVER_MAX_BUTTONS instead of MAX_BUTTONS -- use cMouseButtons instead, as that gets initialized by init_pointer_mapping(). * scwm.c (scwm_main): Call init_pointer_mapping() at startup. * scwm-snarf.h: Added, #defines SCWM_PROC macro that reduces redundancy a bit more than SCM_PROC, using the s_ symbol name prefix that scwm uses by convention * events.c (HandleMappingNotify): Call init_pointer_mapping(). * binding.c (x_pointer_mapping): Added this function, added init_pointer_mapping, and added cMouseButtons and rgmapMouseButtons vars for providing access to the mouse pointer mapping (and number of mouse buttons) * binding.h: added proto for above, plus the EXTERN macros 1998-07-04 Greg Badros * move.c, placement.c, window.c, window.h: Add and use invalid-interaction-hook and cannot-grab-hook instead of just ringing bell -- those can then call (beep) * binding.c: move SCM_PROC for s_mouse_event_type to before function * shutdown.c (restart): Rename variable char *n to sz * events.h, events.c (HandleMappingNotify): Added this function to recall init_modifiers(), and a new hook X-MappingNotify-hook * binding.c: add mod-mask-{meta,alt,hyper,super} primitives for testing whether the mod-mask is available; make init_modifiers reset the static variables so modifiers that get removed are reset 1998-07-04 Greg Badros * xmisc.c (PNewXTextPropertyFromSz): Added this function to create a new XTextProperty struct for the set-window-text-property primitive * shutdown.c: Make Done dump core if first arg is < 0, so SegV's still give a core dump. * events.c (HandlePropertyNotify): Add Robert Bihlmeyer's mid-April patch to provide property notification hook. Added passing the window as the second argument, and change named of hook to X-PropertyNotify-hook (lowercase "h" for consistency); use FXWindowAccessible() instead of XGetGeometry w/ all dummies. * deskpage.c: fix one line's indent * callbacks.c callbacks.h: Added scwm_safe_call2, call2_hooks for convenience, #include , factor out the WarnBadHook(SCM) code, fix bugs in resetting the hook -- use SCM_SETCDR instead of SCM_SETCAR to SCM_EOL * misc.h, misc.c, scwm.h, scwm.c: Move scwm_msg from misc into scwm, since it should be available everywhere * Makefile.am: build xproperty * xproperty.c, xproperty.h: Added from mid-April from Robert Bihlmeyer. Extended the print smob function to display the strings value if the property's type is a string. Also added set-window-text-property primitive. Fri Jul 3 17:44:06 1998 Greg Badros * Makefile.am: * Remove scmprocs.c -- no longer needed since guile-snarf is used pervasively. * Added remaining .x files that are now generated by guile-snarf * Added noinst_HEADERS, so that tags get built correctly * Rename BUILT_SOURCES to pkgdata_DATA since the all target definitely should not depend on the snarfed sources, and automake isn't smart enough to not put $(BUILT_SOURCES) in the dependence for the Makefile even if $(BUILT_SOURCES) is in the OMIT_DEPENDENCIES variable * Put pkgdata_DATA in CLEANFILES so the .x files get removed on a make clean. Fri Jul 2 15:24:22 1998 Greg Badros * All .[ch] files: Lots of software-engineering changes, many to make scwm compile cleanly under the more stringent type-checking of C++: o Use SCM_PROC pervasively throughout -- this adds a couple .x files, and eliminates scmprocs.[ch] o Added appropriate init_MODULE functions, and moved some existing ones to the very end of the .c file o Fix unsigned int vs. int usage so the code type checks for C++ o Fix unsigned char * vs. char * usage so the code type checks for C++ o Put casts back in for the returned values from safemalloc for C++ o Added XGetWindowTopLeft, fixed XGetPointerWindowOffsets, use them instead of XQueryPointer with dummy arguments in client code o Fix uses of enum-s that were really broken (e.g., functions in window.h) -- C++ is a lot pickier about enum-s, and the code was using an enum type to hold a bit vector, really. Now bit-vectors are done using an int, and the enum just declares the symbolic constants. o Rename formal tmp_win to sw in a couple places o Use, e.g., SCMW_H__ not _SCWM_ for multiple inclusion prevention -- _Caps is reserved for implementation, officially 1998-06-29 Robert Bihlmeyer * scwm.c (scwm_main): Handle SIGSEGV. * binding.c: If a unbound modifier is given, issue more consistent error messages. * events.c (send_key_press): Ditto. 1998-06-26 Maciej Stachowiak * Makefile.am, Makefile.in: Add GUILE_INCLUDES to INCLUDES 1998-06-26 Maciej Stachowiak * guile-compat.h: Don't prototype scm_parse path if HAVE_SCM_INTERNAL_PARSE_PATH is defined, in which case it will have a different prototype. 1998-06-26 Maciej Stachowiak * colors.c (nocolor): Throw an error when we fail to allocate a color in a gradient. Not the best solution, but it beats segfaulting. * callbacks.c (force_new_input_hooks): Check if an input hook's port is still open before attempting to check if it has characters ready; this was causing severe problems for fvwm modules. 1998-06-23 Maciej Stachowiak * callbacks.c (force_new_input_hooks): Don't compare the result of gh_memq to SCM_BOOL_T, compare for inequality with SCM_BOOL_F! * guile-compat.h: add a define for gh_memq as scm_memq when not already defined. 1998-06-22 Maciej Stachowiak * scwm.c: Use scm_internal_parse_path instead of scm_parse_path. guile-compat.h: If we don't have scm_internal_parse_path, #define it as scm_parse_path. 1998-06-21 Maciej Stachowiak * Grab.h, ICCCM.h, callbacks.h, errors.h, font.h, image.h, scmprocs.h, scmtypes.h, string_token.h, system.h, guile-compat.c, guile-compat.h, syscompat.c, syscompat.h: Add copyright notice, GPL licensing terms. * Grab.c, ICCCM.c, callbacks.c, errors.c, font.c, image.c, scmprocs.c, scmtypes.c, string_token.c, system.c: Remove GPL exception for the FVWM license; RMS claims there is no incompatability. 1998-06-20 Maciej Stachowiak * scwm.c: Always use getopt_long, never use the previous hack to simulate it. * getopt.c, getopt1.c, getopt.h: Copied from glibc. rms says the GPL is compatible with fvwm's license, so there should be no problem. This beats maintaining the hack non-getopt_long hack for argument parsing. The files are already nicely set up for conditional inclusion. * Makefile.am, Makefile.am: build getopt.c, getopt1.c 1998-06-20 Maciej Stachowiak * callbacks.c, callbacks.h: Move input hooks here. add_input_hook renamed to add_input_hook_x, now returns a hook handle to be used with remove_input_hook_x. remove_input_hook_x added. run_input_hooks no longer removes triggered input hooks; this seems like a more reasonable semantics. Further, add_input_hook_x now accepts an inpput file port rather than a file descriptor, and the input hook system ensures that the hook is invoked until either char-ready? is not true of the port, or the hook has been removed. events.c, scmprocs.c: Input hook stuff removed from here. 1998-06-19 Maciej Stachowiak * syscompat.c, syscompat.h: Move functions that may or may not be in libc here. Also rename sleep_ms to usleep. string_token.c, string_token.h, system.c, system.h, misc.h: Remove the above mentioned functions. binding.c, complex.c, events.c, misc.c, move.c, scwm.c, scwmmenu.c, shutdown.c, virtual.c: include syscompat.h, replace calls to sleep_ms with usleep. Makefile.am, Makefile.in: compile syscompat.c * scwm.c: Remove call to GetFdWidth (no longer useful or necessary). system.c: Remove GetFdWidth. 1998-06-19 Maciej Stachowiak * misc.h: Remove conditional includes of sun_headers.h and alpha_header.h, autoconf should take care of this type of stuff. sun_headers.h, alpha_header.h: Removed. 1998-06-18 Maciej Stachowiak * Makefile.am: Don't depend on having the `-n' option to `echo' when building init_scheme_string.c. Makefile.in: regenerated. * guile-compat.c, guile-compat.h, callbacks.c, menuitem.c: Restore guile 1.2 compatability; provide implementations of scm_internal_cwdr and scm_internal_stack_catch if needed, and use the compatabilty stuff throughout. Bug reported by Dale Smith 1998-06-18 Maciej Stachowiak * shutdown.c: Separate the part of Done() that calls the restart command into run_restart_command(); also fixed it to make restart behave more reasonably. If no argument, or the argument "scwm" is given, it restarts scwm with the exact arguments it was given, plus `-s', otherwise, it executes the exact string given using `/bin/sh'. Bugs in previous version reported by Dale Smith Sat Jun 13 02:51:44 1998 Maciej Stachowiak * guile-compat.c, guile-compat.h: New files; compatability #defines and functions for guile 1.2 all moved here from numerous files. Thu Jun 11 02:54:09 1998 Maciej Stachowiak * callbacks.c: Error handling much improved; error messages should now include backtrace and source file, line number and column. Wed Jun 10 21:38:09 1998 Maciej Stachowiak * events.c, scwm.h: Use scm_internal_select in place of select for the main event loop when available; this should make scwm work with guile threads. Mon Jun 1 19:20:20 1998 Maciej Stachowiak * Makefile.in: regenerated with automake 1.3 * events.c, events.h: Actually compute the highest file descriptor used + 1, instead of using a system maximum. Apparently the old way causes the program to eat CPU under FreeBSD. Bug report and patch from Chris Toshok . Sun Apr 5 14:01:50 1998 Maciej Stachowiak * Makefile.am: List .x files in BUILT_SOURCES rather than lisiting dependencies on them explicitly. Make scwmpaths.h depend on config.status instead of Makefile. Suggestions from Tom Tromey . Makefile.in: regenerated. Fri Apr 3 11:43:28 1998 Maciej Stachowiak * Makefile.am: Fixed typo: s/fonts./font./g Makefile.in: Regenerated. Thu Apr 2 16:21:32 1998 Maciej Stachowiak * image.c, scwm.c: include "scwmpaths.h" miscprocs.c, scw.c: don't include "../version.h" These changes are to work with the new automake-based build system (see the top-level ChangeLog). Mon Mar 30 01:41:21 1998 Maciej Stachowiak * callbacks.c: Fixed bug in run_timed_out_timers() - was failing to break out of the loop that runs the timers. * callbacks.c, callbacks,h, events.c: Added support for timer hooks. This involved adding several procedures for managing the timer hook list: shortest_timer_timeout, update_timer_hooks and run_timed_out_timers, some changes to the event loop, and these scheme primitives: add-timer-hook! USEC PROC - schedule a call of procedure PROC with no arguments to occur after about USEC microseconds have elapsed (it may take somewhat longer if there are many x evebts to process). Return a handle suitable to be passed to remove-timer-hook! remove-timer-hook! HANDLE - remove the specified timer hook from the hook list, preventing it from being invoked if it hasn't been already. Sun Mar 29 18:10:45 1998 Maciej Stachowiak * shutdown.c, shutdown.h: Files with shutdown handling for scwm, moved from scwm.c, and implementations of restart and quit from miscprocs.c. Features added are making the argument to restart optional (defaults to whatever scwm was run as) and adding a shutdown-hook using the new functionality. scwm.c, scwm.h, miscprocs.c, miscprocs.h, scmprocs.c: remove stuff reimplemented above. Makefile.in: compile shutdown.c, generate shutdown.x. * add_window.c: Remove a bit more dead code from AddWindow(). * binding.c, binding.h, scmprocs.c: Remove bind-event. * add_window.c, add_window.h: Use new-style hook support for new window hooks; add-hook! should now be used with the before-new-window-hook and after-new-window-hook hooks. scwm.c: call init_add_window. Sun Mar 29 14:38:25 1998 Greg Badros * misc.h, lots of other files: clean up tons of prototypes, move to appropriate files * placement.h: Added, for protos for placement.c * add_window.c: Call XGetGeometryCacheIt(..) to fix the bug where window positions were forgotten every-other "restart" of scwm; apparently the X server needs to be queried as to the geometry of the windows in order to get this right * misc.c: Added XGetGeometryCacheIt(..), XGetGeometryPositionOnly(..), rename "restart" variable to "fRestart" so it doesn't shadow the global fn named restart(..) * miscprocs.c: Use SCM_BOOL_FromBool, instead of ternary expression * placement.c: Move GetGravityOffsets() to the top and make it static since it's only used in this file Sun Mar 29 13:38:24 1998 Greg Badros * misc.c: simplify code for return value of GrabEm() * scwmmenu.c: Commented out the attempt to send XK_Right; XPutBackKeystrokeEvent seems to be working, now, though, but the menu still doesn't deal with the keystroke event properly. * window.c: Simplify DeferExecution -- it's now only used by select_window, and it's still buggy (when used with scwmexec) Sun Mar 29 11:01:49 1998 Greg Badros * borders.c: use SHOW_TITLE_P, instead of just checking fTitle -- this handles decorate transients better, as they might have fTitle set, but fDecorateTransient not set and be a transient window; Also changed SetupFrame(..) a bit to make it more clear what is happening (replaced uses of title_height by new variable button_width when they conceptually were the decoration button width [which we choose to be the title_height so the buttons are square]) * decorations.c: Use SHOW_TITLE_P, see above note. * misc.c, misc.h: Added FXWindowAccessible(..) to abstract the oft-used XGetGeometry calls used only for their error return value; presumably this is just checking whether the window exists and can be accessed. * miscprocs.c: Comment the RESOLUTION macro * scmprocs.c, window.c, window.h: Added transient? primitive, added CopySetAllFlags(..), added SHOW_TITLE_P macro for testing whether a title should be visible * scwm.c: Clean up some of the startup code -- moved the XSync in CaptureAllWindows into just the recapture case -- the main startup code does an XSync anyway. Added some commented out XDeleteProperty-s; not sure if these are necessary, but my gut feeling was that we want to return the Server to a cleaner state. * scwmmenu.c: Make keyboard shortcuts immediately prepop the next menu, use SCM_BOOL_FromBool(..), Try XPutBackKeystrokeEvent to send a XK_Right to also automatically move the pointer into the newly popped menu item (this doesn't work yet -- I probably need to fill in more fields of the XKeyEvent struct.) * binding.c: Use 's' for super modifier, not 'P' * add_window.c (AddWindow): Clean up a lot -- always create the title windows, since we dynamically can turn them on or off. Simplify and comment throughout. Fri Mar 27 12:26:18 1998 Maciej Stachowiak * module-interface.c: Use new hook interface. The broadcast-hook, broadcast-config-hook and broadcast-name-hook special variables are now expected to contain lists of procedures and may eb manipulated with add-hook!, remove-hook!, etc. * callbacks.c, callbacks.h: New system for hooks - allows scwm to set up distinguished Scheme variables that contain a list of procedures to be invoked on certain actions, possibly with arguments. Guile's usual add-hook! macro can be used. So far only used for errors, but will be used throughout soon. For some fun try, with flux.scm loaded: (define (message-show-error . args) (message (with-output-to-string (lambda () (display "scwm error: ") (map (lambda (arg) (write arg) (display " ")) args) (newline))))) (add-hook! error-hook message-show-error) * events.c: Include callacks.h. Thu Mar 26 19:04:00 1998 Greg Badros * add_window.c: Added some comments and debug code * scwm.c, binding.h, binding.c: Patch from Robert Bihlmeyer to make the modifier keys more ICCCM compliant; he wrote: The following patch puts the modifier masks in variables, which are initialized by a new function `init_modifiers()'. This should be more compliant. Scwm will still lose, if the user changes modifiers after it has started. One would have to act accordingly on MappingNotify events; simply calling `init_modifiers()' is not enough, since the now wrong modifier-masks are already stored in the key bindings. So a re-evaluation of these is necessary, which is beyond my understanding of scwm . One could also say: so don't do that. * events.c (send_button_press): Fix this function -- it was doing nothing because it wasn't filling in x,y and x_root,y_root of the synthetic event properly -- it's been broken for a long time, it seems. * decorations.c: Reset the fBorder and fTitle to false before turning them on again conditionally; avoids fTitle being incorrectly set to True which was causing X errors when transient windows popped up since their title window was given an illegal height of 0 * window.c (CopySetCommonFlags): Added this function; simulates or-ing in the old bit mask of just the "common" flags * window.h: Added proto for CopySetCommonFlags(..) Thu Mar 26 18:15:59 1998 Maciej Stachowiak * events.c: Fix error redirection to deal with the standard guile error handler - it's necessary to redirect the default error port as well as the current error port. Also remove some dead code from the old scwmsend error handling. Thu Mar 26 13:59:14 1998 Greg Badros * misc.h: Removed a bunch of unused #define of FLAG variables from window bit field rewrite * window.c: Return SCM_UNSPECIFIED instead of SCM_BOOL_T from lots of primitives. Thu Mar 26 07:41:26 1998 Maciej Stachowiak * window.c, window.h, scmprocs.c: Added window-frame-id procedure, needed by the fvwm module stuff and perhaps generally useful. * scwm.c, events.c, module-interface.c, image.c: Replace gh_eval_str, load, gh_apply and gh_call1 with new safe versions. Calls to call_thunk_with_message_handler not replaced until I make sure the calls in question are not relying on it's ability to dereference symbols. * callbacks.c, callbacks.h: New support for all kinds of callbacks that scwm needs (calling procedures, loading a file, evaluating a string) with proper error handling. The new scwm_safe_apply, scwm_safe_call0, scwm_safe_call1, scwm_safe_load and scwm_safe_eval_str should be better than previous solutions and will be used throughout soon. Makefile.in: compile callbacks.c, build callbacks.x. Wed Mar 25 22:42:42 1998 Greg J. Badros * Massive rewrite of window flags; converted from using bitmasks to using bit fields. Gets rid of lots of ugliness due to >32 flags, and also *really* cleans up all kinds of expressions using the flags. Also, added SCM_BOOL_FromBool(bool f) to convert a C bool into a SCM_BOOL (instead of idiomatic ternary operator expression). Various other less severe clean ups. This still may not be the best & final way to do things, but it's far closer, and makes a lot of the boolean guards testing window state a *lot* more readable which will be really important as we make more changes. Wed Mar 25 18:29:12 1998 Maciej Stachowiak * system.c: Remove unused findFile function. * color.c: Use gh_number_p, not scm_number_p. Wed Mar 25 15:01:28 1998 Greg J. Badros * drawmenu.c: Set cpixSideImage to 0 when there is no side image * color.c: Use SCM_FALSEP(scm_number_p(xxx)), not !scm_number_p(xxx) since SCM_BOOL_F still evaluates to "true" as a C expression. Tue Mar 24 15:57:47 1998 Greg Badros * scmprocs.c, miscprocs.c, miscprocs.h: Added X-version-information and X-display-information primitives, which are needed for FvwmM4 module compatibility, but generally useful in their own right Tue Mar 24 15:14:16 1998 Maciej Stachowiak * miscprocs.c, miscprocs.h, scmprocs.c: Added restarted? primitive, which returns true if this is not an original invocation of scwm, but rather one after a restart. Patch from Robert Bihlmeyer Tue Mar 24 11:05:27 1998 Greg Badros * scwmmenu.h: Added typedefs and pointers to functions for the loadable primitive menu drawing code. * scwmmenu.c: Added "construct-menu-primitive" symbol, and use it if not #f to call ConstructDynamicMenu(..) so that dynamically loaded menu drawing code will be invoked. This might not be the right way to do it -- maybe the dynamic function should be an argument to popup-menu, but this is proof of concept, and gives a starting place for developing alternative drawing primitives. Call the PaintDynamicMenu and PaintMenuItem routines through function pointer variables that ConstructDynamicMenu initializes. Also, don't complain about a bad menu item if the menu item is #f (we use #f to eliminate menu items from a menu when the program doesn't exist -- this may be done more cleanly in scheme, perhaps, but #f can still be a special case not warranting a warning message). * font.c (menu_font_update): Added this function to here, from drawmenu.c * drawmenu.h: Remove protos for everything but ConstructDynamicMenu(..) since it is the only loaded primitive directly referenced by name. * drawmenu.c (ConstructDynamicMenu): Rearrange so this function is at the end of the file, and is the only exported function required (it sets struct member variables to point to the other functions in the interface). Move menu_font_update into font.c, from here. * Makefile.in: Rudimentary changes for building shared objects for loadable primitives (in the context of menu drawing primitives); The options are currently hard set for Linux and gcc, as I'm not sure how to do this on other platforms * draw-pie-menu.c: Added; not really pie menus -- just a visually different standard fvwm2-like menu; pie menus will require a bit of work, it seems. Sun Mar 22 11:52:25 1998 Greg Badros * binding.c (PchModifiersToModmask): Abort binding when we get an unrecognized modifier, instead of binding using the remaining modifiers. Thanks to * focus.c (Unfocus): Added function Unfocus() -- should be used more pervasively to replace calls to SetFocus with Scr.NoFocusWin as first arg. * scwm.c (Done): Invert sense of STREQ test in Done() so that all args besides -s are copied into the new argument list; thanks to Robert Bihlmeyer for catching this. * window.c, window.h: Added unfocus primitive * scmprocs.c: Added unfocus primitive * focus.h: Added, for protos from focus.c; removed SetFocus() proto from misc.h, where it was before. Sat Mar 21 20:46:35 1998 Greg J. Badros * menuitem.h (MENUITEM_P): Test SCM_NIMP(X) first to avoid core dump. * scwmmenu.c (NewPchKeysUsed): Just ignore menuitem-s that are #f, instead of core dumping. Sat Mar 21 16:50:57 1998 Greg J. Badros * drawmenu.c (ConstructDynamicMenu): Save the side image width in pmdi->cpixSideImage * scwmmenu.c (popup_menu): Added an optional second argument "warp-to-first" that says whether we want to warp to the first menu item on popup * scwmmenu.c (InitializeDynamicMenu): Fixed bug where keyboard shortcuts only worked the first time the menu was popped up * scwmmenu.c (MenuInteraction): Added fWarpToFirst argument, intended to be passed True from popup-menu (as second arg) when bound to a keyboard shortcut; makes the popped-up menu's first item get selected initially * scwmmenu.c (WarpPointerToPmiim): Check for null pmiim, and do not core dump if is null. * scwmmenu.c (SetPopupMenuPositionFromMenuItem): Make left-side menu popups overlap with the side image, if any (instead of being completely to the left of the current menu). * drawmenu.c (ConstructDynamicMenu): Save the size of the side image in the MenuDrawingInfo struct. Fri Mar 20 21:05:39 1998 Greg Badros * Makefile.in: Do not use touch to create the .x files before running guile-snarf; guard inclusions of .x files with #ifndef SCM_MAGIC_SNARFER Fri Mar 20 00:33:33 1998 Maciej Stachowiak * miscprocs.c, miscprocs.h, scmprocs.c: Added scwm-version procedure. * color.c, color.h: Color object rewrite. The followinf new features are available: colors are properly garbage collected, and are freed when no longer in use. Changing colors a lot will no longer gradually eat your colormap. Procedures to set colors have been split to set one color at a time. And color objects are cached just like image and font objects, so specifying colors by string should provide maximal color object sharing automatically. The following new procedures are available: make-color STRING - replaces load-color color-properties COLOR - returns the properties of a color object: currently only name and the X pixel value it uses. clear-color-cache-entry STRING - clears an entry in the color cache; shouldn't be necessary unless you do something really weird to your X server, but provided for consistency. make-relief-color COLOR FACTOR - factor is a floating point number that is multiplied by the color's saturation and luminosity in HLS sppace. This is used with specific factors to set-hilight-foreground! COLOR, set-hilight-background! COLOR - these replace set-hilight-colors! FG BG set-menu-foreground! COLOR, set-menu-background! COLOR, set-menu-stipple! COLOR - replace set-menu-colors! set-hilight-factor! FLOAT - sets the factor that is used by windows with the current decor to generate the relief "hilight" color for the regular and hilight background. set-shadow-factor! FLOAT - sets the factor that is used by windows with the current decor to generate the relief "shadow" color for the regular and hilight background. hilight-factor, shadow-factor - retrieve the settings of the above two factors from the current decor.] set-menu-hilihght-factor! FLOAT, set-menu-shadow-factor! FLOAT, menu-hilight-factor, menu-shadow-factor - analogous to the above but for menus, and are global, not decor-specific. All procedures that take a color (except color-properties) will also accept a string that specifies a color. window.c: set-window-colors! split into set-window-foreground! and set-window-background!, and converted to use new color system. add_window.c, borders.c, decor.c, events.c, face.c, icons.c, module-interface.c, module-interface.h, scmprocs.c, scmptypes.c, screen.h, scwm.c, scwmmenu.c, window.c, window.h: converted to new color system. colors.c: Removed GetHilite and GetShadow. Makefile.in: generate color.x Sat Mar 14 01:04:14 1998 Maciej Stachowiak * window.h: Remove or comment out some unused fields of the window structure. * screen.h: StdColor and StdRElief members of the ScreenInfo struct are not used anywehere; removed. Thu Mar 12 20:35:02 1998 Greg J. Badros * Makefile.in: Build init_scheme_string.c use \n\ at ends of lines, instead of using a multiline string constant (which vendor cc-s don't necessarily support and is not standard C). * scwmmenu.c (PmiimFromPmdShortcutKeypress): Remove inline specifier. * binding.c (BnumFromSz): Remove inline specifier Thu Mar 12 00:27:24 1998 Maciej Stachowiak * events.c: Delete the SCWMEXEC_REQUEST property after reading it. * miscprocs.c (scwm_version), miscprocs.h, scmprocs.c: New procedure scwm-version, returns a string of the current scwm version. * scwm.c, events.c: Remove support for --interactive mode; scwmrepl should now be an adequate replacement. Wed Mar 11 13:54:02 1998 Greg Badros * move.c (AnimatedMoveWindow): now handle expose events as we animatedly move windows, too (I like the affect from below *that* much!) * window.c (window_shade): Instead of keeping only expose events after doing the window shade, throw out the Resize events; this is more precisely the goal, and removes an XSync() call as a result. * move.c (AnimatedShadeWindow): handle expose events as we roll up the window shade; much nicer effect in that previously hidden windows get redrawn while the shade is still rolling up. Wed Mar 11 00:10:49 1998 Maciej Stachowiak * events.c: Handle shaded windows that are resized by the app correctly. However, I discovered while fixing this that changing the title height while some windows are shaded loses. * scmprocs.c: Remove inclusion of paths.h Tue Mar 10 22:10:54 1998 Greg Badros * window.c (window_shade): Fixed bugs w.r.t. not redrawing the decorations that get exposed due to an animated window shade (was throwing out all events using XSync to avoid processing a resize), and regain proper focus after the window shade; still did not fix the bug w.r.t. scwm improperly not disallowing resizes on shaded windows. * events.c (HandleScwmExec): Fixed warning re: 12 arg's type in XGetWindowProperty. Wed Mar 11 00:10:49 1998 Maciej Stachowiak * scwm.c: Fixed version output (added trailing newline). Bug fix from James Troup Tue Mar 10 00:32:45 1998 Greg J. Badros * image.c (path_expand_image_fname): Call image-not-found-hook if it's set to a procedure. Wrote InvokeHook1, but it's too thin a wrapper over gh_call1 right now; also should be in a different file. Mon Mar 9 23:49:43 1998 Greg J. Badros * borders.c (SetBorderX): Eliminate a core-dump in the case that an image for a decor is invalid; this became an issue now that I've relaxed the rules for pixmap validity (we now allow missing pixmaps to stick around as SCM_BOOL_F) Mon Mar 9 23:45:40 1998 Greg J. Badros * screen.h (GetDecor): GetDecor macro did not need to use the cpp stringization operator; removed the `##' Mon Mar 9 23:31:59 1998 Greg J. Badros * image.c (path_expand_image_fname): Use warnings instead of scm_wrong_type_arg when we can't find an image file * face.c (add_spec_to_face_x): Use warnings instead of scm_wrong_type_arg when we can't find an image file Mon Mar 9 22:50:16 1998 Greg J. Badros * drawmenu.c: Inverted the shading of the popup menu item arrow; selected now appears pushed in, unselected is reliefed out. Mon Mar 9 01:41:40 1998 Maciej Stachowiak * events.c: Calculate length for read SCWM_REQUEST property more correctly in HandleScwmExec. * events.c(HandleScwmExec): redirect output and error to the requesting program. scwm.c, scwm.h: intern atoms for SCWMEXEC_OUTPUT, SCWMEXEC_ERROR. * events.c: Use scm_current_error_port, not scm_current_output_port in error handler. * events.c: Make HandleScwmExec handle multiple window IDs in the SCWMEXEC_REQWIN property, so clients can use PropModeAppend rather than PropModeReplace. Fri Mar 6 06:46:20 1998 Maciej Stachowiak * scwm.c (scm_parse_path): Provide if not in libguile. * window.c: Fix to smart-placement, patch from Hideki Sakurada * scwm.c (init_scwm_load_path): New function to add the contents of the SCWM_LOAD_PATH environement varibale and the compiled-in load path to guile's load path. Sun Mar 1 02:16:56 1998 Maciej Stachowiak * module-interface.c: Pre-define the broadcast-hook, broadcast-config-hook and broadcast-name-hook variables to #f to make sure they are defined in the root module; also, access them more efficiently by holding pointers to their value rather than doing a gh_lookup each time. Sat Feb 28 00:57:52 1998 Maciej Stachowiak * module-interface.c (marshal_fvwm2_config_info, init_module_interface): New procedure to generate the data needed to send to fvwm modules on BroadcastConfig, and a new function to initialize stuff. module-interface.h: prototypes for the above functions. scwm.c: call init_module_interface Makefile.in: build module-interface.x * events.c: Fixed bug in HandleScwmExec that was causing random crashes - strings should be sent with format 8, not 32, in XGetWindowProperty. * events.c: Slight change to HandleScwmExec: don't delete XA_SCWMEXEC_REQUEST properties; it just confuses clients. Fri Feb 27 18:02:24 1998 Maciej Stachowiak * events.c: Added new procedure HandleScwmExec to handle the new scwmexec protocol. Values should be properly returned to the new scwmexec utility. The old scwmsend protocol is still supported for now, until all the tools that depend on it can be replaced. There is no support for reporting errors back to scwmexec yet, but there should be. ICElib turned out to be to complicated to be useful, so the new solution still uses properties, but in a somewhat saner way. scwm.c, scwm.h: declare and intern atoms for the scwmexec protocol. * move.c: Fix problem with AnimatedShadeWindow which was making the title bar get clobbered occasionally. Patch from Oleg Tihonov Thu Feb 26 22:00:17 1998 Greg J. Badros * Rework all the code to make compile using g++, while still remaining C code. Lots of C++ warnings, but no more errors Included renaming window.h's item from class to classhint Adding missing include files (to fix missing function prototypes) Removing duplicate sym_XXXX symbols from miscprocs.c and other *.c files Fixing some missing `return' specifiers of non-void fns Unnesting the vector_coords struct from the ButtonFace struct Adding some #ifdef __cplusplus as needed Reworking access to the `new' memvar of the colormap X object Adding break;'s to switch's empty default cases. * scmw.c: Also added some #ifdef USE_CASSOWARY blocks Wed Feb 25 16:55:29 1998 Maciej Stachowiak * font.c, font.h: Several changes to the font interface. Fonts are now directly Scheme objects; no hacky FontWithInfo struct needed. There is a font cache similar to the image cache. The procedures font-properties and clear-font-cache-entry were added; the former is used to get the font's name and height, the latter to explictly clear entries in the font cache (shouldn't be needed, but you never know). font.c also now uses the SCM_PROC macros and such. Also, load-font was renamed make-font for consistency. * borders.c, decor.c, drawmenu.c, drawmenu.h, icons.c, icons.h, miscprocs.c, move.c, resize.c, scmprocs.c, scmtypes.c, screen.h, scwm.c, scwmmenu.c: modified for the new font interface. * Makefile.in: build font.x * scwm.c: Added scwm_gh_launch_pad and scwm_gh_enter to guarantee proper loading of boot-9.scm once and only once across guile versions. This is a hack until a real solution is available. Fri Feb 20 03:22:23 1998 Maciej Stachowiak * add_window.c, events.c, icons.c, move.c, placement.c, scmprocs.c virtual.c, window.h: Icon handling fixes and changes: Icon geometry has been broken for quite some time, it should be better now. The icon settings are now in four procedures: set-icon! - sets the requested icon image; if #f, no picture is shown, just the icon title. However, unless force-icon is set, the app icon will take precedence over this setting, so for instance if there is an app icon, it will show up even if this setting is #f. set-force-icon! - if #t, the specified icon image or #f indicating no icon image will override the app-provided icon, if any. If #f, the app icon takes precedence. set-icon-title! - #t or #f will specify wether the icon title is or is not shown respectively. set-show-icon! - just determines wether or not the whole icon is shown at all, without affecting any other settings (so setting it to #f and then back to #t will restore all the original icons). * module-interface.c: Broadcast: Provide the num_datum parameter to broadcast hooks. * image.c, image.h: Syndry improvements: Reorganized image loading - loaders can now be specified by a suffix with more than one dot in it (so ".xpm.gz" works, for instance) and the code is more modular overall. Improved cache handling - images are cached by both the requested name and the full path; cache entries may be explicitly cleared with the new clear-image-cache-entry. image-properties changed to return an association list - this is more robust against changes in the set of properties returned. The new "foreign" field allows pixmaps from outside sources (app icons and the like) to correctly not be freed when the image object is, Wed Feb 4 23:57:58 1998 Greg J. Badros * scwm.c: Added patch for initialization from Jim Blandy, to account for changes in the guile startup code -- fixes the unbound variable error. * scwmmenu.c: Permit embedded #f's in menu lists, and just ignore them Tue Jan 27 18:16:28 1998 Maciej Stachowiak * events.c, events.h, scwm.c, scmprocs.c: Added new Scheme procedure add-input-hook and associated support code in the event loop - basically this allows the user to provide an fd to select() on and a thunk to call if input becomes available on the fd. This should be useful for the preliminary fvwm module interface. Tue Dec 16 15:38:02 1997 Greg Badros * misc.h, misc.c: Move Destroy, RaiseWindow, LowerWindow, and Unmap into window.c, and rename to DestroyScwmWindow, UnmapScwmWindow; move HandleHardFocus into events.c * errors.c: Removed scwm_error_imm() * binding.c: use MAX_BUTTONS, not 3 for highest mouse button number * add_window.c: remove CLICK_TO_RAISE compile time option ifndefs Tue Dec 16 14:41:16 1997 Greg Badros * Replace TRUE with True, and FALSE with False * scwm.h: Moved ScwmWindow into window.h, moved ColorPair and MyFont (renamed to FontWithInfo) into screen.h, other cleanup to make smaller since this is included virtually everywhere, move binding context macros in binding.h * misc.h: remove protos for stuff in virtual.c * image.c: No longer warn about pixmap library since I'm not 100% sure the depth is supposed to be returned by libXpm * virtual.h: added w/ protos of fns in virtual.c Tue Dec 16 12:41:18 1997 Greg Badros * scwmmenu.c: Check isascii(keysym) before isgraph(keysym) to avoid segfaults on SGI IRIX 5.3 due to out-of-bounds array access * string_token.c, string_token.h: Remove stripcpy() as it is no longer used. Fri Dec 12 16:18:48 1997 Greg Badros * Rename COLORP to COLOR_P, and FONTP to FONT_P for consistency and readability * util.c (call_thunk_with_message_handler): use DEREF_IF_SYMBOL to permit 'iconify, e.g. * scwmmenu.h: Added DYNAMIC_MENU_P, DYNAMIC_SAFE_MENU, MENU_OR_SYMBOL_P, added void *p to MenuDrawingInfo for client drawing code to use for extra information, added scmExtraOptions to Menu for free-form client options * scwmmenu.c: Fixed some memory leaks from not freeing pmdi, rgpmiim, etc. when popping down menus -- wrote FreeDynamicMenu to do this (if only this were C++!); use SCM_PROC for other primitives in here; permit symbols for fonts, colors, and actions, and deref them as needed using the new macros; hide some debug code in DBUG. * scwm.h: Added DEREF_IF_SYMBOL, DYNAMIC_PROCEDURE_P, PROCEDURE_OR_SYMBOL_P, RESTP_SCM * scwm.c: Use primitive-load instead of load -- MS: is this any better? * scmprocs.c: Remove gh_new_procedure calls for stuff now done with SCM_PROC * menuitem.c: use SCM_PROC for other primitives in here; permit symbols for fonts, colors, and actions, and deref them as needed using the new macros. * font.h: Added DYNAMIC_FONT_P, DYNAMIC_SAFE_FONT, rename FONT to FONT_P * font.c: Added warning message when a font cannot be loaded * drawmenu.c: Rewrite DrawUnderline, add PxfsFontForMenuItem, use DYNAMIC_SAFE_FONT, DYNAMIC_SAFE_COLOR in fixing up the gc; these changes fix the sizing bug (it was using the size of characters in fixed font, but then drawing using the selected proportional font) * color.h: Added COLOR_OR_SYMBOL_P, DYNAMIC_COLOR_P, DYNAMIC_SAFE_COLOR * color.c: Added warning message when unable to parse or allocate color, and return SCM_BOOL_F in those cases * binding.c: Permit symbols using PROCEDURE_OR_SYMBOL_P Thu Dec 4 18:49:23 1997 Greg J. Badros * scwmmenu.c: Lots of changes to the menuing code, including keyboard support, better placement so that menus stay onscreen, cascading menu support, underlined shortcut keys and shortcut key support, more. Still more configirability and flexibility to be added, as well as animation. * scwmmenu.h: need fHoverActionInvoked as a DynamiMenu field, not as a local variable. * string_token.c: fixed forgotten return value in IchIgnoreCaseInSz() * borders.h: removed internal functions from the interface * drawmenu.c: Be safer drawing menu items to avoid segfault; check for scmAction just being set for highlighting, do not require it to be gh_procedure_p(), since we know allow actions to be popup menu-s again * font.h: Add extra parens and SAFE_ versions of casting macros * image.c: use scwm_msg, not fprintf, for a debug message * menuitem.c: Require that hover_action be a procedure again, since cascade popups are now the action object, not the hover_action object Sun Nov 30 13:23:00 1997 Greg J. Badros * parse.h: Removed * scwm.h: added enum wm_client_functions to replace the few parts of parse.h that were used by check_allowed_function and decorations stuff * decorations.c, window.c: renamed check_allowed_function2 to check_allowed_function, since check_allowed_function no longer exists * scwm.c: Renamed s_XXXX to szXXXX since they might as well be consistent hungarian tags if they're going to be tag-like Sun Nov 30 12:25:17 1997 Greg J. Badros * Use enum cursor for cursors, and prefix the cursor names with CURSOR_ * Rename Scwm_MenuItem to MenuItem, Scwm_Menu to Menu -- the Scwm_ prefixes were just a hack to get around name conflicts with the legacy menuing code. Various parallel renames, as well. * window.c: mark the icon_image scm object, make DeferExecution a static fn. * drawmenu.c: Tweak some drawing constants a bit, add real separators, make DrawSeparator only take 1 y-coord since it's for horizontal lines * image.c: Output images as #, fix GC code changes from bugs I introduced when I didn't understand the GC idioms. * screen.h, misc.h: Moved the cursor types from screen.h into here. * screen.h: Removed the name_list * "TheList" since this wasn't used any more * scmprocs.c: Rename make-menu-item to make-menuitem, make-scwm-menu to make-menu, remove set-image-path! * scwm.h: Fixed precedence problem in UNSET_SCM macro * scwmmenu.c: Handle elements in the scmMenuItems list that are not menuitem-s better. Add menu_init_gcs(), call it from scwm.c Sat Nov 29 01:09:35 1997 Greg J. Badros * menu.c, menu.h, menus.c, menus.h: Removed since menuitem.c, menuitem.h, scwmmenu.c, scwmmenu.h, drawmenu.c, drawmenu.h replace the functionality these had. Binding stuff got moved into binding.c * Picture.c, Picture.h: Removed these, since image.c, image.h replaces their functionality. Fri Nov 28 23:58:30 1997 Greg J. Badros * image.c: Added full_name scm string to track where the image actually got loaded from. Use that as it's print string, as I think a unique identifier makes more sense than just what the user gave to make-image. image-properties still returns the "name" as the car of the list it returns. * Move GC_MARK_SCM_IF_SET into scwm.h, and use in image.c. Fri Nov 28 23:32:18 1997 Greg J. Badros * image.c: Adding warnings throughout the imaging code. I know we've not decided how best to handle warnings, but that doesn't mean that they shouldn't go in the code. scwm_msg(WARN,__FUNCTION__, ) works great, and will be easy to find later when we do something different; Added a note about not finding the max path length every time through... can we do stuff when image-load-path changes? Added a .xpm.gz loader -- does this work? * image.h: Added SAFE_IMAGE(x) * Makefile.in: Generalize the .x building better; not just for image.x any longer * Use image.h, not Picture.h for almost everything (except old menu code) * Use STREQ throughout instead of !strcmp -- I've never liked the latter idiom because of the "!" seems to say not equal * Picture.c,Picture.h,paths.c,paths.h: Move szPicturePath into paths.c as szImagePath, though it'll go away real soon now. * drawmenu.c: tweak up some of the spacing constants, use images, not pictures. Adding underlining of shortcut keys. Made PaintMenuItem be external, so that scwmmenu can use it on expose events. * icons.c: Removed some legacy code hidden in comments * menuitem.c, menuitem.h: Use new GC_MARK_SCM_IF_SET abstraction; use images, not pictures. Added menuitem-properties primitive, added init_menuitem, use guile-snarf. Added chShortcut, ichShortcutOffset, imiim, pmd to MenuItemInMenu objects. Added SAFE_SCWM_MENUITEM caster * smprocs.c: update set-image-path!, make-menu-item * scwm.c: Added setlinebuf calls for stderr and stdout to ease debugging -- perhaps this is a portability problem. Also may be an efficiency problem later on, but for now it's the right thing. Added new init_... calls * scwm.h: Added UNSET_SCM(x) abstraction for variable type checking * scwmmenu.c: Use GC_MARK_SCM_IF_SET; use images, not pictures; make NewPchKeysUsed store state in the MenuItemInMenu-s; added menu-properties primitive; use UNSET_SCM throughout; Got hover/unhover hooks working, got popup window behaviour working; added numerous menu utility functions; Do highlighting of current item properly; use guile-snarf * scwmmenu.h: Added SAFE_SCWMMENU; use images, not pictures * string_token.c: Added IchIgnoreCaseInSz, and noted that stripcpy can go away when old menuing code goes away * xmisc.c: DrawImage now takes a scwm_image * instead of a Picture * Thu Nov 27 23:37:33 1997 Greg J. Badros * Augment all OBJECT_P-s with SCM_NIMP(X) test to make sure they are safe and remove a ton of duplicated code throughout the whole system; we should *NOT* test, e.g., SCM_NIMP(X) && COLOR_P(X) any longer, and the color_p function is simplified to just translating between a C bool and a guile boole * Added module-interface.h, and include it throughout as needed. * icons.c, icons.h: Removed reliance on Picture.[ch]. In the process, changed when icon windows get created to when the window is added, not when the icon is first used. THIS PROBLEM BROKE SOME ICON STUFF, but brief testing shows that things generally work, modulo the stuff w.r.t. increased flexibility of user pixmap overriding... Also removed some newly dead code there. * binding.c: fixed grab key from all window bug -- was grabbing keys from all windows even if C_WINDOW bit was not set, and unbind-mouse bug -- was not permitting numbers for the button as bind-mouse did. Thanks to Oleg Tihonov for reporting the problems. Also caught a small memory leak. * menu.h decor.h: Move #include-s *before* the EXTERN #define, since it could cause big problems to include a header file that redefined EXTERN before the rest of the .h file * font.h, drawmenu.c: don't use SAFE_FONTP, since FONTP now is safe * events.c: Replace gh_standard_handler -- bug in guile (?) is stopping my new scwm_error_handler from being used to evaluate SCWM_PROPERTY messages, but this seems to work and gives slightly more useful error messages. Also removed some szIconFile references, and use sw->icon_image, not sw->picIcon * image.c: Rename image?-new to image?, added image_properties, check depth attribute return value and print a message if it looks like Xpm is screwing up (it does for me), added make_image_from_pixmap for internal C code. * window.c: added window-from-window-id function (needed for autoraise, broadcast stuff) Wed Nov 26 11:07:51 1997 Greg Badros * Do not define away the Broadcast{,Name,Config} functions -- call the ones in module-interface.c, include module-types.h where needed * Makefile.in: Stop using $(SHELL) -ec to build dependencies as quoting becomes a burden giving the new complex setting of CFLAGS.... not sure what the ramifications of this are, and I still appear to be getting problems building dependences * borders.c: Changed check that had an extra "!" and was causing a dereference of an image that was SCM_BOOL_F. Fixes my core dump problem. * image.c: Rename make-image-new to make-image, and change old make-image back to make-picture (to ultimately be removed) * move.c: Remove overshooting target bug in AnimatedWindowShading by just stopping once we're at least 100% to the target. * scwm.c: init_scheme_string no longer const char *, just char * Wed Nov 26 00:38:50 1997 Maciej Stachowiak * image.c: Added support for registering a "default" image loader which is used if no loader is registered for the file's extension or if the registered image loader fails. Tue Nov 25 16:37:01 1997 Maciej Stachowiak * face.c, face.h: Use scheme image objects instead of Picture structs for all images in faces; add mark_face which appropriately gc-marks any referenced images. scmtypes.c: Use the new marker function for faces. add_window.c: Removed all code that tries to load the mini-icon from a filename, and change AddWindow to expect the tiled pixmap for the border, if any, to be a Scheme image object. screen.h: Replaced the p member of the u union in the ButtonFace struct with an image member which is an SCM expected to hold SCM_BOOL_F or an image object. scwm.h: Replaced picMiniIcon and szMiniIconFile fields in the ScwmWindow struct with a mini_icon_image field which is an SCM expected to hold SCM_BOOL_F or an image object. borders.c: Draw images specified by button/titlebar/border faces (including mini-icons) knowing that they are now Scheme image objects. window.c: Changed set-mini-icon! to expect and use image objects rather than picture objects. Changed set-icon! to make some effort to remember the icon if it is turned off; this needs more work however. * scwm.c: Initialize the new image code. * image.c, image.h: Added the init_image_colormap() function; the colormap for images needs to be initialized separately and later than the image code itself; also protect image_loader_hash_table from gc. Mon Nov 24 14:00:49 1997 Greg Badros * Makefile.in: Fixed some dependence problems using image.x file. Added rule to build init_scheme_string.c from ../scheme/minimal.scm and link that in with the binary * scwm.c: SetRCDefaults() now uses the extern char *init_scheme_string from the .c file that the makefile builds. Mon Nov 24 00:07:05 1997 Maciej Stachowiak * Makefile.in: Compile image.c; use guile-snarf on it as well to create image.x. Sun Nov 23 23:59:00 1997 Maciej Stachowiak * image.c: Updated to be able to at least compile; experimentally use the SCM_PROC macro and the guile-snarf program to register new procedures. Sun Nov 23 17:08:02 1997 Greg Badros * xmisc.[hc]: added DrawImage to abstract drawing of both pixmaps and bitmaps. Perhaps this should be in the new Image.[ch], but I'm holding off until that code is in use. * drawmenu.[ch]: rework much of the drawing code so that it now looks fairly reasonable. Still need more item spacing, etc., but there are more important things to handle before polishing the look. * face.c, drawmenu.c, scwmmenu.c: remove the checking of HAVE_GH_LENGTH -- do this only in scwm.h * scwm.h: add above check. * menuitem.h: reduce the number of fields in MenuItemInMenu -- use more per-menu drawing information in MenuDrawingInfo struct * scwmmenu.c: Don't trust drawing code to set correct event mask-- do it here instead Sun Nov 23 01:42:37 1997 Greg J. Badros * menu-item.h: added some more fields to MenuItemInMenu * scwmmenu.c: lots of new code to get drawing of the new menus and popping up to work. Added popup_menu(). Implementation is not complete. * scwmmenu.h: Added MenuDrawingInfo struct for caching information that the drawing code might use. Changes to the DynamicMenu structu * scmprocs.c: added popup-menu function, for the new scwm menu code * scwm.c: call the new init_scwm_menu() [does nothing now] * menu-test.scm: Added for testing new menu code * colormaps.h: Added, for colormaps.c protos; use where needed throughout; pull these out of misc.h * colormaps.c: fixed protos to be (void) not () * font.[ch]: use FONT_IMPLEMENTATION for file-globals, added SAFE_FONTP (perhaps this should be done for all the OBJECTP macros) * drawmenu.[ch]: Added, for drawing-only (look) code; partially complete implementation of the fvwm menu look * xmisc.[ch]: Added for X/Xlib utility functions * Makefile.in: updated for above additions Sun Nov 23 02:47:22 1997 Maciej Stachowiak * image.c: Rewrite of the image code to support: hashed image cache, garbage collection of all images including ones generated by C code, eq?-ness for multiple loads of the same image, ability to register additional image loaders, and image path in the distinguished Scheme variable image-load-path which is interpreted as containing a list of path strings. Basically, everything has been totally rewritten except the low-level image loading calls, which can't be written much differently. This code is not yet integrated into the rest of the program or the build process. Mon Nov 17 21:07:44 1997 Maciej Stachowiak * string_token.h: Only give prototypes for strcasecmp and strncasecmp if they are not already defined. * string_token.c: Only define strcasecmp and strncasecmp if they are not already available. * system.c: Changed sleep_ms to use usleep() where available, otherwise fall back to select(). Sat Nov 15 00:18:22 1997 Greg J. Badros * menuitem.[ch]: Added; the beginnings of an scm object for menu items to replace those in menu.[ch] * scwmmenu.[ch]: Added; the beginnings of an scm object for menus to replace those in menu.[ch] * Makefile.in: Include above files in build. * system.h: Include config.h and #ifdef out get_hostname prototype if we have the function -- patch from Harald Meland * gjb.scwmrc: add some commented out test code for new menu items and scwm menus. Wed Nov 12 22:57:31 1997 Greg J. Badros * window.c: Added current-window-with-{pointer,focus} functions. Abstract out SwFromWindow() instead of using the more obscure XContext calls inline. scmprocs.c updated for new functions. Also have a place-holder for select-window-interactively, but it does nothing right now. Wed Nov 12 15:41:28 1997 Maciej Stachowiak * window.c: Fixed the remaining problems with DeferExecution - the event it reads needs to be copied to the global event struct before calling DispatchEvent(). * scwm.c: Use getopt_long when available for argument parsing, otherwise accept both long and short options by hand-parsing. Patch from James LewisMoss , slightly reformated, and changed to provide both long and short options for everything. Wed Nov 12 00:36:21 1997 Greg J. Badros * events.c (HandlePropertyNotify): don't resize shaded windows; this improves upon my prior bug fix which had an unfortunate timing dependence that I only caught after more testing. This should be a reliable fix. * Abstracted out SHADED_P, SET_SHADED and SET_UNSHADED, since it's a gross field -- the shaded bit just gets thrown into the buttons field's high-order bit; this should be fixed but not now. Tue Nov 11 22:14:02 1997 Greg J. Badros * scwm.c: Fix bug with -f "" core dumping, fixed other bugs nearby with argument handling. * binding.c: Fixed unbind_mouse to respect the context, and ungrab the button; Added A- and H- modifiers for Alt and Hyper, respectively. Abstract out more code to use PchModifiersToModmask, and give better error messages. All mouse button numbers to be specified as Mouse{1..3}, etc.; added a recapture when the number of buttons w/ defined actions changes. * misc.h: more cleanup * resize.h, add_window.h, borders.h, colors.h: added for their respective implementations, and moved protos out from misc.h * add_window.c, borders.c, colors.c : rearranged function order and made local functions static; diffs are pretty unhelpful for these * window.c: fixed bug introduced by cut and paste in last update; last fix still does not work for me. * Updated all includes for the above Tue Nov 11 18:17:15 1997 Maciej Stachowiak * window.c, window.h, scmprocs.c: Fixed the bug with selecting a window for interactive-move from the root menu. The fix added extra optional arguments to get-window and select-window. Tue Nov 11 12:49:37 1997 Greg Badros * binding.c: Use SCM_BOOL_F to report a bad key binding * icons.c: Fix bug wrt application icon window; Thanks Andrei Tcherepanov . Mon Nov 10 20:41:21 1997 Greg J. Badros * move.c, window.c: Fix AnimatedShadeWindow()'s handling of windows so that it works with Emacs windows; bug was a result of the resizing of the window causing an extra PropertyNotify event, which caused scwm to think that the newly shaded window had been resized, which then makes it call SetupFrame again and re-expose part of the client window. * borders.c: cleaned up SetupFrame a bit while tracking down the above bug. Even found an old bug in fvwm2 (of no obvious consequence, though). Mon Nov 10 10:06:59 1997 Greg Badros * bindings.c: just warn when an unknown keysym is attempted to be bound, do not die; uncommented uses in gjb.scwmrc of the only-sometimes-available keysyms KP_XX since now they will only produce a warning. Mon Nov 10 05:17:36 1997 Maciej Stachowiak * decor.c, face.c, Picture.c, system.c, ICCCM.c, Grab.c, string_token.c: Added copyright notices. * errors.c, errors.h, window.c: Signal an error when the image can't be loaded in set-icon! * scmprocs.c: Renamed make-picture to make-image and set-picture-path! to set-image-path! (externally only for now, will change all references in C code soon). * miscprocs.c, miscprocs.h, scmprocs.c : Renamed set-xor-value! to set-rubber-band-mask! Mon Nov 10 00:13:29 1997 Greg J. Badros * move.c: wrote AnimatedShadeWindow(), similar to AnimatedMoveWindow(); visually not quite perfect, but very nice. Inspired by AfterStep's animation (did not look at its code, though). * move.h: Added this -- protos from move.c, removed from misc.h * window.c: give {un-,}window-shade another optional argument -- a boolean saying whether we want the (un-)window-shade-ing to be done animatedly * borders.c: some general cleanup of formatting due to automatically removing the #ifdef-s * events.c: removed unused macros MAX_NAME_LEN, MAX_ICON_NAME_LEN Sun Nov 9 14:11:47 1997 Greg Badros * Picture.c, window.c: Handle memory management of strings passed to CachePicture better; gh_scm2newstr()-allocated strings must be freed, so we give them a name. LoadPicture uses strdup to get its own copy of the filename --this was a bug before, as it might have tried to free a local variable, or might have used memory that was owned (and later modified) by someone else.; free_picture() now calls DestroyPicture before free-ing the scheme object. * system.c: Added note about char * return value in findFile -- that needs to be freed, too. Sun Nov 9 07:15:45 1997 Maciej Stachowiak * window.c: Make set-icon! and set-mini-icon! able to take strings as well as pictures to be consistent with the handling of colors and fonts by other functions. Sun Nov 9 07:15:45 1997 Maciej Stachowiak * face.c: Restore the calls to redraw_borders, since it is now fixed. * util.c: Fixed the bug in redraw_borders - it turned out not to be a problem with SetBorderX at all, but rather with some code I mindlessly copied. * util.c: Fixed redraw_borders so that it works for now (but is somewhat unattractive). * Picture.c, Picture.h, scmtypes.c: Removed mark_picture; scm_mark0 can be used as the marker when no sub-objects need to be marked. Sun Nov 9 00:00:15 1997 Greg J. Badros * icons.c: rearranged and improved the interface specification; non-public functions are now static * icons.h: added, pulled relevant protos out of misc.h; #include it as appropriate * menus.c: make LEFT_MENUS be the single version, remove those conditionals (fvwm2 menuing code was really broken w/o this option); also removed FindPopup() function * removed #include "module.h" from all files; remove module.h * removed #include "parse.h" from lots of files; still not completely unneeded yet * scwm.h reduced the redundancy in the ScwmWindow's icon handling; now picIcon has all the pixmap information about the icon, instead of having everything at the top level of the struct; use macros from icons.h to make accessing the new fields not so bad * Fixed the bug that prevented the current window from getting the focus initially at startup (long-time fvwm2 bug, too). CoerceEnterNotifyOnCurrentWindow() is added to misc.c * misc.h Still more clean up * Fixed the bug that prevented mini-icons from being redrawn once they are changed * string_token.c: Remove GetNextToken() function; last use of it was obliterated; fixed protos in header to checking MISSING_STRCASECMP * Renamed lots of ScwmWindow *tmp_win arguments to *sw. My pet-peeve about variable names is tmp -- all auto variables and formals are tmp, so it's redundant. In this case the short Hungarian tag is really nice! * Rename the global "Tmp_win" to swCurrent; Tmp_win was a *terrible* name!; fixed extern refs that use this Sat Nov 8 20:18:26 1997 Greg J. Badros * Added picture object; use (make-picture "pic-filename") * Combined PixmapPath and IconPath into one variable: szPicturePath; set with set-picture-path! [set-{icon,pixmap}-path! have been removed] * Permit pixmap arguments to still be strings, but also allow pixmap objects. Improved the caching and sharing is almost complete, so little memory is wasted * Cleaned up GetXPMFile() to use CachePicture code; these changes still are making scwm smaller! We're under 20klines of commented source! Sat Nov 8 14:54:59 1997 Greg J. Badros * misc.[ch]: Lots of cleanup * builtins.c: removed from the build * Started pixmap/picture re-implementation Thu Nov 6 10:59:36 1997 Maciej Stachowiak * window.c: Change set-mini-icon! to load the mini-icon file when appropriate. This makes the #:mini-icon style option work. * paths.c, Makefile.in, envvar.c: Stop using the code in envvar.c for environment variable expansion in paths and remove it from the build process as well as from the repository. Wed Nov 5 09:24:21 1997 Maciej Stachowiak * wildcard.c, wildcard.h: Removed because they are not used any more. * Makefile.in: Remove wildcard.c from the build process, it's not used any more. * add_window.c: Commented out the part of LookInList that scans the style list - there is no style list created anywhere in the code any more so that part of it was never getting executed. * miscprocs.c: Change wait-for-window to take a predicate rather than a name string, so we don't have to use matchWildcards. You can pass (wildcard-matcher NAME) to get the old effect (and for that matter, you could just bind the 'new-window event, so wait-for-window will go away entirely sometime). * builtins.c: Deleted all the Decor stuff, it is not needed any more. * window.c: Added a check that an object passed to a window operation is non-immediate (using the SCM_NIMP macro) before checking if it is a window (using WINDOWP). Tue Nov 4 11:57:37 1997 Greg Badros * Lots of code cleanup; integrate the few functions from libs/* into the scwm directory. Removed MS_DELETION_COMMENT blocks. Added some GJB_DELETION_COMMENT blocks for newly obsoleted code. Tue Nov 4 13:45:31 1997 Maciej Stachowiak * face.c, face.h: Added scheme-level procedures set-title-face!, set-button-face!, set-button-mwm-flag! and set-border-face!. Changing the border, button and title styles should now be possible, although a higher-level interface still needs to be written. Also, redraws are not done immediately for anything but set-title-face!, because of a bug in SetBorderX. Added appropriate prototypes. * util.c, util.h: New function redraw_borders to redraw borders of all windows associated with a decor. However, it doesn't work right now, as SetBorderX appears to be buggy. Added prototype for redraw_borders. Mon Nov 3 11:20:17 1997 Maciej Stachowiak * Further changes that should bring things really close to user face handling; only set-button-face! and friends need to be written now. scwm.c: Changes to initialization of the default decor, and decor initialization in general to support the creation of the initial button, border and title faces as Scheme objects face.c, face.h: Added creation of the default button, title and border faces as Scheme bjects in the variables default_titlebar_face, default_rbuton_face[], default_lbutton_face[] and default_border_face. decor.c, decor.h: Added mark_decor, a new gc marker function that marks all of the face objects associated with a decor object, so garbage collection is happy. Also made make-decor initialize the button, title and border faces from the defaults. * colors.c: Changed shadow handling in GetShadow slightly; don't mod by %0xffff any more so very bright colors are not automatically shadowed with black. Sun Nov 2 00:20:29 1997 Maciej Stachowiak * add_window.c, borders.c, builtins.c, face.c, functions.c, screen.h, scwm.c: Made changes throughout so that ButtonFace structs are only ever used through pointers; this prepares for the change of using scheme face objects everywhere, which in turn should make Scheme access to button, border and title syles feasible. * Makefile.in: Added face.c to the build process. * scmprocs.c, scmtypes.c, scwm.c, screen.h: Uodated appropriately for face-related procedures, types, initialization, and data * face.c, face.h: New files, a start on implementing fvwm's {Button,Border,Title} Styles. For now, face objects (the back end behind fvwm's assorted style commands) can only be created (using make-face) and print and garbage-collect properly. They cannot yet be associated with buttons, titles or borders. Sat Nov 1 04:44:44 1997 Maciej Stachowiak * events.c: Changed return values of send-button-press and send-key-press from SCM_UNDEFINED to SCM_UNSPECIFIED. Wed Oct 29 08:41:01 1997 Maciej Stachowiak * scwm.c: Fixed silly bugs in the implementation of the -e and -f options. Mon Oct 27 06:53:54 1997 Maciej Stachowiak * miscprocs.c: Added support for set-smart-placement-is-really-smart!, set-click-to-focus-passes-click!, set-click-to-focus-raises! and set-mouse-focus-click-raises!. These are obscure, but being able to have click-to-focus without raising the window is nice. * events.c: When not raising on click-to-focus, don't raise regardless of where the click comes from. Sun Oct 26 01:05:27 1997 Maciej Stachowiak * color.c, decor.c, font.c, menu.c, window.c: changed all of the printer functions, print_color, print_decor, print_font, print_menu and print_window to be able to use either the old guile printing functions or the new ones. * window.c: Use the correct one of gh_vref or gh_vector_ref, depending on what we have. Sat Oct 25 23:15:40 1997 Greg J. Badros * Added send-button-press for synthetic keypress events like GWM Sun Oct 26 01:05:27 1997 Maciej Stachowiak * scmprocs.c: Eliminate use of gh_new_procedureX_X; instead use gh_new_procedure throughout, since gh_new_procedureX_X will be going away in guile. Sat Oct 25 21:42:36 1997 Greg J. Badros * Added extra args to do animated moves to (move-to), also permit equivalent movement of the pointer as an option; added AnimatedMoveWindow() to support this, and have it recognize "animation-ms-delay" variable; also wrote (set-animation! ..) to set the other animation parameters * Fix (get-window)/DeferExecution bug * Rename sleep_a_little to sleep_ms(), and take ms, not microsecs * Updated BUGS, TODO Fri Oct 24 23:31:54 1997 Greg J. Badros * Added (unbind-key), (unbind-mouse) * Reindent all of the source using indent * Clean up all the code so it builds with -Wall, make that the default. * Fix bugs in key handling -- required a recapture for new bindings to be noticed * Added gjb.scwmrc, a more full-featured configuration * Updated BUGS, added NEEDED (list of features missing) 1997-10-24 Jens-Ulrik Holger Petersen * Makefile.in (mostlyclean): New target. (LIBS): Use relative directory to "libs/" for VPATH. (INCLUDES): Ditto for "include/". * deskpage.c (desk_size): Make result consistent with `set-desk-size!'. Thu Oct 23 19:54:16 1997 Maciej Stachowiak * Added support for decors as Scheme objects. This includes the following changes: decor.c, decor.h: new files which implement make-decor, default-decor, current-decor, set-current-decor! and set-window-decor! scwm.c: wrap the default decor as a nice Scheme object. window.c: protect the decor attached to a window from garbage collection in the marker for window. scmtypes.c: register the decor type. scmprocs.c: register the decor procedures. Makefile.in: add decor.c to the build process. Tue Oct 21 21:03:03 1997 Maciej Stachowiak * window.c: Don't attempt to redraw the border in set-mwm-buttons!; it is now called only on 'new-window-hint, not 'new-window because the MWM_BUTTON_FLAG bit clashes with the MAXIMIZE bit. Mon Oct 20 15:40:48 1997 Maciej Stachowiak * window.c: Changed set-mwm-buttons! to actually set the MWMButton flag, not the MWMBorder flag. Sat Oct 18 00:04:40 1997 Maciej Stachowiak * miscprocs.c, miscprocs.h, scmprocs.c: Fixed scm-quit to take any number of arguments. Patch from Mikael Djurfeldt * virtual.c: Commented out: changeDesks_func, changeWindowsDesk, scroll, goto_page_func. * Makefile.in: Removed bindings.c from the build process. * bindings.c: Commented this whole file with #if MS_DELETION_COMMENT * window.c: Added another optional argument to get_window which can be used to supress selecting a window. Added handling to the interactive-move procedure to start moves in the right place. Changed show_titlebar and hide_titlebar to check the current state of the titlebar before asking. Added set-lenience! procedure which sets the lenience flag. Fri Oct 17 19:30:20 1997 Maciej Stachowiak * window.h: Changed header for get_window. * scwm.h: Added macros for Broadcast, BroadcastConfig and BroadcastName which do nothing. * scwm.c: Commented out several portions of unused code, including the StartupStuff function. * windows.c: Commented the whole file; it is gone from the build process. * style.c: Commented the whole file; it is gone from the build process. * resize.c: Comented out the move_window function, which is no longer used. * move.c: Comented out the move_window function, which is no longer used, and fixed InteractiveMove so that moves are started where the motion begins, not where the mouse cursor is when a move is detected. * module.c: Commented out the whole file. It is no longer in the build process so this is redundant, but it is a useful reminder. * misc.h: Commented out some of the prototypes for module functions; several have been replaced by macros. * menus.c: events.c: Commented out some no longer used code with pairs of "#ifdef MS_DELETION_COMMENT" and "#endif /* MS_DELETION_COMMENT */" for easy removal later. Also explicitly undefined MS_DELETION_COMMENT at the top of the file just in case. One deletion is in HandleKey and HandleButton, where ExecuteFunction used to be called. It is no longer possible for flow control to reach this point, and ExecuteFunction no longer exists. Also, the DestroyMenu function was removed. * functions.c: Commented out some no longer used code with pairs of "#ifdef MS_DELETION_COMMENT" and "#endif /* MS_DELETION_COMMENT */" for easy removal later. Also explicitly undefined MS_DELETION_COMMENT at the top of the file just in case. The function ExecuteFunction and most entries in the func_config array were removed. * focus.c: Changed SetFocus to correctly handle windows with a focus style of 'none. * events.c: Commented out some no longer used code with pairs of "#ifdef MS_DELETION_COMMENT" and "#endif /* MS_DELETION_COMMENT */" for easy removal later. Also explicitly undefined MS_DELETION_COMMENT at the top of the file just in case. The two deletions are in HandleKey and HandleButton, where ExecuteFunction used to be called. It is no longer possible for flow control to reach those points, and ExecuteFunction no longer exists. * complex.c: Commented out a lot of no longer used code with pairs of "#ifdef MS_DELETION_COMMENT" and "#endif /* MS_DELETION_COMMENT */" for easy removal later. Also explicitly undefined MS_DELETION_COMMENT at the top of the file just in case. Functions removed are: ComplexFunction,expand * builtins.c: Commented out a lot of no longer used code with pairs of "#ifdef MS_DELETION_COMMENT" and "#endif /* MS_DELETION_COMMENT */" for easy removal later. Also explicitly undefined MS_DELETION_COMMENT at the top of the file just in case. Functions and variables removed are: Maximize, WindowShade, Bell, add_item_to_menu, add_another_item, destroy_menu, add_item_to_func, movecursor, iconify_function, raise_function, lower_function, destroy_function, delete_function, close_function, restart_function, exec_setup, strerror, exec_function, refresh_function, refresh_win_function, stick_function, wait_func, focus_func, warp_func, echo_func, raiselower_func, SetEdgeScroll, SetEdgeResistance, SetColormapFocus, SetClick, SetXOR, SetOpaque, SetDeskSize, setPixmapPath, setIconPath, ModulePath, setModulePath, SetHiColor, SetMenuStyle, LoadIconFont, LoadWindowFont, Circulate, PrevFunc, NextFunc, NoneFunc, WindowIdFunc, module_zapper, Reborder. * Makefile.in: Added VPATH support. * add_window.c: AddWindow: eplace the call to resize_window with a call to interactive_resize since resize_window is gone now. * binding.c: find_mouse_event_type: also store the location of the original event for use by interactive moves. Thu Oct 16 00:36:06 1997 Maciej Stachowiak * Makefile.in: Removed read.c, module.c, windows.c and style.c from the build process. Tue Oct 14 01:13:59 1997 Maciej Stachowiak * window.c: Added many new procedures to support window styles: set-mwm-buttons!, set-mwm-border!, set-icon!, set-mini-icon!, set-hint-override!, set-decorate-transient!, set-mwm-decor-hint!, set-mwm-func-hint!, set-PPosition-hint!, set-OL-decor-hint!, set-start-on-desk!, set-skip-mapping! * miscprocs.c: Added Scheme beep procedure which encapsulates XBell. * borders.c: Added SetBorderX and redefined SetBorder in terms of it to allow the border and title to be redrawn correcly on interactive options changes. * add_window.c: Made several changes to AddWindow to support Scheme callbacks upon the creation of a new window. Specifically, run_new_window_hint_hook and run_new_window_hook are run at the appropriate places. * binding.c: Added the 'new-window-hint event to take care of some issues relating to creating new windows and the time at which hint settings must be available. Sun Oct 5 16:20:26 1997 Maciej Stachowiak * window.c: Added many new procedures that should be useful for both style purposes, and in some cases also for binding to interactive commands. The following have been added: keep-on-top, un-keep-on-top, kept-on-top?, show-titlebar, hide-titlebar, titlebar-shown?, normal-border, plain-border, border-normal?, set-border-width!, stick-icon, unstick-icon, icon-sticky?, set-icon-box!, set-window-focus!, set-window-colors! and set-icon-title!. * binding.c: Added bind-event procedure to enable binding hooks for special window manager events. Currently, only the 'new-window event is implemented. Also added the run_new_window_hook() procedure for C to let the code that initially decorates a window do this. * add_window.c: AddWindow() - changed to call the new window hook. This will enable handling of style options on window startup. * events.c: Changed handling of MapNotify event to deal properly with windows that start out iconified. Wed Oct 1 21:47:36 1997 Maciej Stachowiak * window.c: Added keep-on-top, un-keep-on-top, and kept-on-top? Wed Sep 24 16:46:22 1997 Maciej Stachowiak * binding.c,color.c,font.c,miscprocs.c,paths.c,window.c: Changed deferring and allowing of ints to hopefully make things thread-safe. Mon Sep 22 00:09:43 1997 Maciej Stachowiak * binding.c: Fixed nasty bug; previously forgot to gc-protect the scheme procedure in a mouse binding, * binding.c: Corrected mouse bindings for buttons. Sun Sep 21 09:22:26 1997 Maciej Stachowiak * window.c: Implemented select-window. This means that window operations off of root menus and such should be happy. * window.c: Renamed get-window-position, get-window-size, get-window-id, get-window-desk, get-window-title and get-window-list to window-position, window-size, window-id, window-desk, window-title and list-all-windows. This change and the ones to deskpage.c and miscproc.c are to provide "Schemier" names before the current ones becomes at all established. * deskpage.c: Renamed get-display-size, get-desk-size, get-viewport-position and get-current-desk to display-size, desk-size, viewport-position and current-desk respectively. * miscprocs.c: Renamed get-pointer-position to pointer-position. * events.c: Added error handling to callbacks using call_thunk_with_message_handler. * menus.c: Fixed the use of Scheme submenus, and also wrapped callbacks to Scheme code in error handling using call_thunk_with_message_handler. * events.c: Added error handling for key and mouse binding callbacks. * menus.c: Added correct handling for submenus and error handling for Scheme callbacks. Fri Sep 19 00:34:05 1997 Maciej Stachowiak * util.c: Added call_thunk_with_message_handler; this will enable us to handle errors in callback code. * window.c: Added get-window-position, get-window-size, get-window-id, get-window-desk, get-window-title and get-window-list procedures. It should now be possible to get more useful info on windows at runtime, and also write "window list" type procedures in Scheme. Thu Sep 18 01:27:08 1997 Maciej Stachowiak * menu.c: Added a marker for menu objects, so their thunks and submenus don't get GC'd. * Imakefile: Added deskpage.c to the build process. * deskpage.c: New file. Adds procedures set-current-desk! set-viewport-position!, set-edge-scroll!, set-edge-wrap!, set-edge-resistance!, set-desk-size!, get-display-size, get-desk-size, get-viewport-position, get-current-desk. * window.c: Added move-window-to-desk operation. * Imakefile: Added paths.c to build process. * paths.c: Added set-pixmap-path! and set-icon-path! functions. Wed Sep 17 09:44:56 1997 Maciej Stachowiak * miscprocs.c: Added get-pointer-position, move-pointer-to, recapture, restart and wait-for-window procedures.