Changelog for vers 308
309-beta-22:
I restored the backdrop.tcl applet that somehow got replaced with an older version. I went back over revisions and found when it changed. Luckily it was the only changed file that wasn't included in later versions.
arraysync.tcl was upgraded to 0.93 to sync with steve's.
run.on.event.handlers shutdown now runs in exit.whim.
More event handlers were added in C, so that we can exclude more events from Tk. This seems to improve performance and most importantly keeps Tk from modifying windows it shouldn't. Basically it involves using Tk_IdToWindow on the .window event member for the type member of the XEvent union.
I added more XFlush calls to the C code routines. This may help when the requests occur in standalone usage, rather than in a sequence with a final XFlush/XSync.
I reordered the CREATE_DESKTOP_WINDOW filter, so that it won't fire if the window is quickly destroyed, or should be Withdrawn.
I added a DESTROY_DESKTOP_WINDOW filter, and documented it in Whim.vfs/FILTERS.
map.desktop.window now calls map.desktop.window.callback on
I reordered the pwm.set.cardinal.property code, so that it occurs elsewhere in map.desktop.window.
I removed the winfo viewable and tkwait visibility path. Now we rely on
shade.desktop.window now checks to make sure that the $appid is still valid. This prevents a problem where the event is in the queue, but the window was just destroyed, and therefore the path creates an error. This fixes a *potential* bug.
The debug code in main.tcl now works properly in all cases. So, now we can debug the problem that occurs with Whim and systray.kit more easily.
309-beta-21:
Steve found that activate.desktop.window was being called a lot, so we now have some elimination of excess code being evaluated in cases where it isn't needed.
::active_window was changed to use "" as an empty value.
::event_lock was added to hopefully fix a focus problem on window startup with tkwait visibility. The tkwait visibility is like a full [update], so it introduces some synchronization issues. After auditing the code for updates I came to this solution through some thought. I'm a little concerned about 2 remaining update idletasks, and am interested in ways to remove them.
An implicit focus.to was removed from a desktop controls
destroy.desktop.window was changed to check if the ::active_window is the $appid being destroyed. This gives us proper window activation with the new path elimination discussed above. It's necessary because window ids are reused.
An
I improved a comment about the update idletasks for applet idle task starvation.
handle_focus_(in/out)() are enabled now, and they check for a Tk_Window id and PASS_TO_TK if needed.
The strange handling of when a Tk_Window was found for a LeaveNotify, but the NotifyGrab was the active xcrossing.mode that resulted in a PASS_TO_NONE has been fixed. The behavior is not present in the latest OpenOffice, and probaby the previous release too. I attribute the fix to the explantion below.
I added PASS_TO_BOTH. It shares the PASS_TO_WM path, however now the PASS_TO_WM path does something it should have done a long time ago -- return 1 for indication of completion of an event, so that Tk doesn't process it.
pwm_event_handler has its reference_count moved to at the start of the procedure, rather than before the Tcl_GlobalEvalObj. This may prevent traces from causing faults. It's unknown if this fixes any current bugs.
I added an assertion to pwm_event_handler to verify a valid reference count. To go with this I have added setting of the reference count to -1 in order to verify that we aren't reusing the evh structure after it has been deallocated. I recommend that you remove -NDEBUG for this next little while, so that we can be certain that everything is working properly.
On a positive note; I'm pleased to say that the restart bug that I mentioned in a previous release hasn't occured again yet. I think that [winfo viewable] and a little reordering has helped prevent the wait for a VisibilityNotify that has already come. I'm leaving the s.log for a little while longer, until 21 goes final probably.
I've tested test3 (a release before a final) all night with --enable-symbols=all builds of Tcl and Tk that used modified Makefiles, so that libefence.a/Electric Fence is used. So far this has helped me find a bug in a previous test release, and the timing issues have become more apparent, and have helped me find the bugs mentioned above. The slowness is actually an advantage for testing purposes.
I've left -ggdb in the default build.conf for now. Steve got a segfault and I want to make sure there aren't any others, and that we can debug easily.
The segfault is fixed!
We had to eliminate multiple calls to Tk_DeleteEventHandler.
if (evh->do_delete) {
/*- The event handler already has a deletion in progress.
*/ return TCL_OK; }
I wish I knew why I couldn't duplicate this. Steve was able to duplicate it repeatedly, so we debugged it together with gdb in Xnest. Based on the manual page for Tk_DeleteEventHandler I didn't see anything that suggested this would be a problem, but it was clear from the Tk sources that it is. I'm auditing the rest of the sources now to find potential problems.
I have removed -ggdb from the default build.conf, and I've decided to keep -NDEBUG out. I prefer to have the assertions active, and the cost seems to be small.
An unnecessary pwm.move.window was removed from create.desktop.window. The pwm.reparent.window now takes an x,y, and the pwm.move.window serves no purpose now.
set.size was changed to check if it should place
if {[winfo ismapped $path]} ...shade.desktop.window was refactored so that now it calls map.application.container. create.desktop.window now calls map.application.container so that place $path isn't called too early.
The logic was changed in the bind all
I removed s.log logging.
309-beta-20:
I removed desktop_button_bindings. I added set.config desktop_bindings. It works like so:
set.config desktop_bindings \
{ {display.desktop.menu %desktop %X %Y}} INIT It's based on some changes that stever wrote for config.desktop.button.bindings.
I moved the close stderr ; open /dev/null w pattern to after whim has initialized.
The compatibility code now removes desktop_button_bindings automatically, and the #VERSION is 3 now.
309-beta-19:
I changed the EnterNotify path to call entered.window.
Now entered.window will set a lock when grabs are active.
focus_follows_mouse is now using the add.config subsystem. This allows for new behavior for when switching between focus-follows-mouse and click-to-focus.
proc destroy.desktop.window now calls ungrab.key.bindings (with catch).
I added logging for a difficult to track bug involving an XGrabServer call from pwm.grab.server. For some reason something interrupts or waits while Whim is starting up and reparenting existing windows. So, your current directory when starting whim will accumulate an s.log for a while, until I can track this down.
If you're able to duplicate the bug then please send me your s.log, unless I note later in this change logs that I've fixed it.
We now use close stderr ; open /dev/null w to hide false errors. See the comment near the top of proc main if you're interested in why.
I may have just found the bug on startup. The tkwait visibility path could potentially wait and cause such a bug. I added an outer branch
if {![winfo viewable $path]}that may fix it. I've left the s.log enabled, so that we can verify that this truly is the problem.
309-beta-18:
I added proc assert. Unlike the assert in C it doesn't abort/exit.
The new last_focus code had a problem in 1 case. It now seems to work properly in all states.
I added a Restore to the menu. It works after a Maximize. This required changes to restore.size and save.size.
focus.to was changed yet again. I changed the all binding that prevents Tk from breaking focus model behavior.
I enabled handle_focus_out and handle_focus_in in pwm.
pwm_ungrab_key was changed to not use AnyModifier. Now it takes a modifier argument.
activate.desktop.window is now done when FocusIn occurs, so if an application takes focus and the user didn't change it the user will notice.
309-beta-17:
I upgraded arraysync.tcl to what stever has been including.
left.window was restored, and now it ungrabs buttons on
I changed the format of the starkit target output, so that it fits with the format that stever has used with releases.
309-beta-16:
When the $::focus_window is destroyed the last window in the desktop list will now receive focus.
When the last_focus window on a previous desktop is destroyed the focus will go to the last window in the desktop list, but only if the desktop matches the $::current_desktop, otherwise it sets the last_focus member, so that change.to.desktop can restore it properly later if needed.
shade.desktop.window was altered to handle focus restoration.
309-beta-15:
A few changes were made to fix click-to-focus interaction with Tk's focus changes from things like tk_popup and other widget library procedures. This also helps with foreign menus and things of that nature.
A bug was fixed in builds that don't use a Starkit. The applet_core.tcl was expecting code to be copied out, due to some previous changes.
308-beta-14:
A file descriptor leak on restart.whim was fixed. close.all.channels was added. It doesn't actually close stdout, stdin, stderr. I also fixed stop.all.applets, so that it calls close.applet to cleanup the sys:pipe end that isn't made into a Tcl channel.
308-beta-13:
We now have add.filter, remove.filter, and filter procs. These will allow for users to extend Whim in key areas with as many filters as needed. Whim may internally use filters for some things in the future too.
proc change.to.desktop now saves the last focus, and will activate the last window on the desktop when the desktop is reactivated. This helps with click-to-focus.
proc config.desktop.button.bindings was added. This allows users to configure the mouse button bindings.
Whim now unmaps windows that have WithdrawnState on startup.
proc eval.whim.behavior was added. It handles upgrading old configuration formats to the new formats. It also adds a #VERSION header.
proc for.every.desktop was added. It's used like so:
for.every.desktop desktop {
puts $desktop
}It can be used in a ~/.whim_config to startup applets on every desktop, or whatever you want. I recommend that you use it with the on command (see below).
process.application.event was refactored, so that now parts of it are in proc grab.wait.for.
A new configuration option set.config desktop_button_bindings was added. See this:
add.config desktop_button_bindings config.desktop.button.bindings set.config desktop_button_bindings \ [list "" "" [list display.desktop.menu %desktop %X %Y]] INIT
Users can change this in their ~/.whim_config.
proc main now calls run.on.event.handlers startup.
proc on was added. This is used to setup script evaluations on startup and shutdown. Example: on startup start.applet taskbar .desktop0
proc run.on.event.handlers was added for the afformentioned on proc.
proc save.state was changed to use a #VERSION header.
Potential BUGFIX: Tcl_ObjSetVar2 and Tcl_SetVar2Ex usage was cleaned up. Some missing Tcl_IncrRefCount and Tcl_DecrRefCount patterns were fixed. Unfortunately it isn't always clear when the incr and decr are needed, unless you study the Tcl sources. See also: http://wiki.tcl.tk/14880
sys_exec was changed yet again. This time I cleaned up the code by using better names for the variables, and another variable rather than relying on i calculations.
BUGFIX: tkwait visibility was moved out of the give_focus_to_new_windows path, so that now it applies in all cases. This wait is critical in some cases for proper placement and size.
I added Whim.vfs/FILTERS and documented all of the new filters which include:
- CREATE_DESKTOP_WINDOW {desktop appid}
- MAP_DESKTOP_WINDOW {appid path}
- START_APPLET {applet desktop}
- STOP_APPLET {applet desktop}
- SHADE_DESKTOP_WINDOW {appid path}
- SET_CONFIG {key value argslist}
create.desktop.window was restructured, so that now we have a new proc map.desktop.window that reduces some of the complexity of create.desktop.window.
for.every.desktop was changed to use for.every.desktop scope (rather than uplevel 1). This may prevent future scope problems in ~/.whim_config. All local variables are now prefixed with _.
BUGFIX: stop.all.applets had 2 bugs involving the array key usage. Testing has shown that it works properly now (though I thought it did before) :/
I added Whim.vfs/applets/nighttime.tcl. It's based on code from sunset.tcl but looks quite different.
BUGFIX: lower.desktop.window (a user proc) will now properly stack transients.
BUGFIX: find.window (a user proc) no , tail in the window returned anymore.
applets now set an is_running key in the applets array. This is intended to help AJB with his great menu system for Whim.
308-beta-12:
Whim.vfs/applets/applet_core.tcl now will exit the applet if the channel is closed.
Whim.vfs/applets/applet_frontend.tcl was updated to work with the new arch layout.
Whim.vfs/applets/taskbar.tcl was updated to use sriv's special themed buttons if the theme is sriv. There is now extra space in the column, that as I understand it is used for one of sriv's applets. A missing focus.to was added to the taskbar. This eliminates a situation where focus-follows-mouse-like behavior was occuring at times.
arch.tcl was updated to use the i386-i686 versions of Linux. In NetBSD AFAIK there is just an i386 identifier even on i686 processors.
Whim.vfs/main.tcl now uses sriv's arraysync on port 4545. It should only work with localhost applets, so security should be ok.
Whim.vfs/whim.img: steve's mods was removed (at sriv's request).
proc create.desktop.window: Windows with an initial state hint of WithdrawnState will no longer have windows created for them if they go through MapRequest. Why on earth some applications do this is beyond me at the moment ...
proc create.desktop.window now sets the cardinal property _NET_WM_DESKTOP. This allows us to restart Whim and have the windows positioned on the proper desktops.
proc create.desktop.windows.for.existing was added. This contains some previous code from proc main, and much new code that fixes the placement of windows on restart.
The speed of window dragging was improved a little based on some [time] results to profile the slowest spots. I eliminated 2 expr calls and did more in a single expr to improve the speed.
proc move.window.to.desktop was updated to work with the new pwm.reparent.window that takes x and y arguments (more about this below).
proc process.application.event now uses the $grab_wait_for | $FOCUS path always. This eliminates a rare bug with focus-follows-mouse mode. The bug was that the pointer would be in say A, and B takes focus, but the pointer is still in A, so to reactivate focus in A requires Leave/Enter. Now you can click in such a situation to enable focus.
proc reparent.all.to.root was added. It's called by exit.whim and restart.whim.
proc stop.all.applets was added. It's called by exit.whim and restart.whim so that processes don't continue running after Whim exits.
-DNDEBUG was added to the default build.conf. I also updated the VERSION requirement for the build.conf, so that user's know to update theirs.
csrc/pwm/pwm_get_cardinal_property* was added. csrc/pwm/pwm_set_cardinal_property* was added.
2 new commands were added to csrc/pwm/Pwm_Init.c.
csrc/pwm/pwm.h now includes
csrc/pwm/pwm_get_window_attributes* now sets the depth and map_state keys in the array.
csrc/pwm/pwm_get_window_state* was refactored to use the new pwm_get_generic_property.
csrc/pwm/pwm_get_window_state_symbol_from_value* was changed to set its result on error.
csrc/pwm/pwm_reparent_window* was changed to take 5 arguments instead of 3. The new arguments are x and y.
csrc/pwm/pwm_set_property* was improved to throw errors if the XChangeProperty fails.
csrc/pwm/pwm_set_window_state* now sets the icon window to None in the WM_STATE property.
/channel_child.tcl was moved to csrc/sys/tests /channel_test.tcl was moved to csrc/sys/tests
Whim.vfs/whim.img withdrawn.tcl was changed to indicate on display the proper behavior (of which I had forgotten).
308-beta-11:
The goal of this beta is to reduce flicker on resize, and improve performance.
Fixed a bug in csrc/gui/gui_create_window.* where the return result of Tk_CreateWindowFromPath wasn't checked. This means it could have failed if the window already existed.
gui_create_window.* now also doesn't use a background pixmap, background pixel, border pixel, and uses a static window gravity. These changes are based on changes done by mmc from #xlib to other applications. See also: http://maruska.dyndns.org/comp/activity/webwiki//flicker.html
get_byte_order was made static. It was the only function in misc missing this. Most code uses the BYTE_ORDER from build.conf now. The csrc/gui/* functions that do use get_byte_order aren't used in Whim or any applets.
I audited the rest of the extensions for missing static.
I added static to allocinfo/copy_string.*.
I added static to csrc/pngext/read_png.*.
I spent a while profiling the slowest parts of Whim's resize paths.
csrc/pwm/pwm_send_configure_notification.* was changed to always have a border_width argument, and not accept negative values for unknown width/height. This reduced the cost in the most general case considerably, because XGetWindowAttributes was not needed. Thus the resizing is much quicker now.
proc process.application.event was changed to use the border_width.
proc process.container.event was changed to use the border_width.
proc process.root.event was changed to use border_width.
I added Whim.vfs/tests/focus.tcl. (passed)
I added Whim.vfs/tests/raise_and_lower.tcl. (passed)
I fixed a wrong diamond bug that would occur after a while in the Whim.vfs/applets/diamond-2.tcl.
I fixed yet another bug in csrc/sys/sys_exec.*. It had an off-by-one error that resulted in an extra argument. So, I added csrc/sys/tests/sys_exec.tcl.
308-beta-10:
tkwait visibility will no longer throw an error in create.desktop.window if the window is destroyed on mapping.
Both of the focus models seem perfect now.
I changed the entered.window path. Now the bindings only apply to the ::focus_window.
I changed the menu relief to solid, and the borderwidths to 1. I prefer this look, and it can be overridden in a local ~/.Xdefaults.
The EnterNotify path will no longer try to ungrab/grab if the window is already the ::grab_button_window.
tested w/ and w/o tile. tested with run_tests.tcl and no error.log was generated this time.
tested bindings and they work properly.
I added another step to the RELEASE_PROCESS for checking the error.log.
308-beta-9:
minor focus changes to fix gqview
308-beta-8:
I neglected to mention that I moved some files from Whim.vfs to the megapkg-308.8/attic in beta-7.
start.applet was broken since the new multiplatform Starkit code was added. It has been fixed.
Passed tests with and without tile in a Starkit.
I renamed tile.kit to tileDIS.kit and tested Whim. It passed.
I ran the test suite with Whim in tile-less mode. It passed.
I extended the Whim.vfs/RELEASE_PROCESS with additions for Starkit tests, tile testing, and structure leakage testing.
I followed the steps for the RELEASE_PROCESS with the exception of gmplayer, because it doesn't build for me at the moment. I decided against running without Tile all of the other applications, because they use the same widgets.
308-beta-7:
For portability tickmakefile no longer will set -rpath in tickmakefile. This belongs in build.conf, because some systems may not have a C compiler that accepts -Wl,-rpath. So, please update your local build.conf
activate.desktop.window was added to some paths for the focus-follows-mouse mode.
I updated Whim.vfs/tests/failure_FocusOut.tcl to also print FocusIn.
I added Whim.vfs/tests/normal_focus_changes.tcl (Whim passes it already).
I added a VERSION config.option to build.conf and tickmakefile. This should help users know when to update their build.conf.
Destroy Dead Window was changed to Destroy Unresponsive Window. I read my email and realized that I originally told David McClamrock I would add that. It does make more sense to users I think too.
I added Whim.vfs/tests/wm_delete_window.tcl (Whim passes it already).
I added Whim.vfs/tests/run_tests.tcl
I slowed down Whim.vfs/tests/placement.tcl (it was too difficult to interactively close when it moved so quickly.)
We now use tkwait visibility in proc create.desktop.window, rather than after idle. This is more reliable for use with focus.to.
We're finally using the idle callback for ConfigureNotify -- proc send.application.notification. I finally figured out what was wrong with it. This should improve performance in most cases. Based on my testing it's faster, because it sends fewer ConfigureNotify events, and only sends them when Whim is idle.
I left my NetBSD Starkit binaries in this build, so that stever can build in Linux and we can have a multiplatform Starkit.
308-beta-6:
We now will build multiple architecture starkits. This required many small changes to tickmakefile. I wasn't sure about how to do it before. Now I feel good about this approach. The pattern is Whim.vfs/lib/arch/$ARCH/$platform. The file Whim.vfs/arch.tcl is automatically generated, so that Whim doesn't need to do gymnastics to findout what path to use. Whim.vfs is now a symbolic link to window-managers/Whim. Changes were made to allow for sys.so to be copied out, so it now always runs in env(TEMP) or /tmp. This makes supporting the Starkit applets, and the non-Starkit applet code easier.
I synchronized with Steve's version of arraysync.tcl. main.tcl now sources arraysync.tcl by default.
Whim now ungrabs on LeaveNotify rather than on the next EnterNotify. This may fix a somewhat rare bug. It was also necessary to fix a missing FocusOut for overrideredirect windows that Whim's grabs interfered with.
new csrc/pwm/pwm_kill_client.*
Whim now has a "Destroy Dead Window" titlebar-menu item. This eliminates the need for xkill.
308-beta-5:
This release was based on some changes by Steve for his arraysync.tcl
308-beta-4:
There is now a starkit target for megapkg. It can be used like so: tclkit8.5 build.tcl build.conf starkit
I suggest that if you're building starkits you remove -ggdb from build.conf. I was using that in the default build.conf. The extensions are fairly stable now, and the jpegext.so and pngext.so aren't used yet in Whim, so any instablity may come in the future when I'm testing out the background configuration applet.
I removed -ggdb from the default build.conf to save space in starkits, and improve performance (not really needed).
jpegext.so is now a normal target that is built with the others automatically, rather than an optional target.
proc try.tile in Whim will no longer puts "TILEKIT: filename" as it searches for Tile.
308-beta-3:
A small fix for steve.tcl came from Steve to fix the SR Resize when using set.config steve's_mods 1 in ~/.whim_config (tested and found to work).
proc maximize.desktop.window was fixed so that it accounts for the desktop controls (both autohide-mode and normal).
taskbar.tcl now sets the bottom boundary, so that maximize can do its business properly.
close.applet now reports errors, and the error logging was fixed, so that false positives aren't reported.
#ifdef USE_TCL_STUBS surrounding Tcl_InitStubs was removed, because it turns out to be pointless (same for Tk stubs). Thanks DGP.
A Whim restart bug was found with steve's_mods (by Steve). I fixed it by changing the order of the source.
Whim was reparenting existing windows on startup with override_redirect, and it shouldn't have been. (found by Steve)
A Behavior menu item was added for "Use Steve's Mods (requires restart)" This required adding config.steve's.mods and an add.config call in init.whim.config.
apply.whim.config was re-enabled before the newish set ::whim_init_finished 1. This enables configuration options that require restart to avoid endless restart cycles, and annoying the users. This also provides for dynamic creation of things like the desktop labels, and the desktop control behavior.
308-beta-2:
close.applet was changed to log all errors.
"Position Windows Under Pointer" should now work with "Position Transients Over Masters"
I added a few more plan entries to explain some more things for new Whim programmers.
I upgraded Procmeup to 22b2.
I upgraded Fed Builder to 18.
sys:exec is now used with restart.whim. Tcl's exec is unsuitable, because it forks and execs always. I fixed some bugs in csrc/sys/sys_exec.* too.
308-beta:
I've done a lot of testing of Whim today. It now has a Behavior menu for "Use tile". This new menu item will restart whim if the user clicks "yes" in a dialog. This required adding restart.whim, a config.use.tile. A few changes to the initialization were made for use.tile and to fix potential bugs.
Whim now supports tile07.kit, and the changes necessary for that.
I refactored main, so that now we have init.network, init.key.bindings, and init.applets. A new proc was added called init.resources that is used for the Tk option database.
I fixed a bug in tg_create_window_cmd. It was expecting Tk_CreateWindowFromPath to always work, and in some cases the parent doesn't exist, or the window already exists.
The taskbar in Whim should now work properly with tile. It now also features the indication of which task is active. (tested in Tile and plain Tk)