Sending WM_DELETE_WINDOW client messages

In my X11 Intercept Window Close Event post I left out one very important piece of information. How to actually close the embedded window after intercepting the WM_DELETE_WINDOW message. The best thing to do is send our own WM_DELETE_WINDOW message to the embedded window. This will keep the embedded window embedded until it actually closes. Meaning any question dialogs that might stop the window from closing (Gedit asking to save for instance) can be answered and it keeps the window embedded if the user decides not to close....

November 8, 2009 · John

X11 Intercept Window Close Event

Note Nov, 8 2009: a few additions have been made to the code samples to make them more complete. Specifically subscribing to X11 events. A feature request for KDocker was made a few days ago for docking when closed. Basically the person wants the window to iconify when the X button on the window decoration is clicked. It’s something I’ve been thinking about for quite some time but it’s not the easiest feature to implement....

November 1, 2009 · John

KDocker 4.2 released

This release includes bug fixes as usual. Some new features: bash completion, iconify on focus lost option and Italian translation thanks to Alessio Cassibba. There is also a small change to the behavior when activating the tray icon. If the window is not visible it will become active and if it is active it will iconify. You can get it at the launchpad page. Somehow I forget to mention the 4....

September 27, 2009 · John

KDocker 4.0

Recently I’ve become the maintainer of the KDocker project. KDocker is a Qt application what allows you dock any application into the system tray. It currently supports any X Windows system. What I’ve done for the 4.0 release is, move the project to launchpad (Girish, the creator of the project is locked out of the Source Forge page) and port/re-write the entire app to use Qt 4. The port/re-write to Qt 4 is complete and I’ve released it....

September 16, 2009 · John

eBook Adding Empty Lines At End of File

Continuing my work to clean up my eBooks I’ve written another little tool to help. I like for my eBooks to have two blank lines at the end of the file. The only major caveat of this one is it assumes Unix end of lines. Meaning a single n character. In order for this to work correctly use of the dos2unix tool is necessary for files that use a different new line format....

December 22, 2008 · John

eBook Paragraph Formating

Today I wrote two simple programs to help me clean up my ebooks. I prefer to keep my ebook collection as plain text files with paragraphs separated by a blank line. The first program reflows the paragraphs to put each on a single line. The second removes extraneous whitespace from the file. The reflow is the more intensive of the two. I ran it on the largest ebook I have, Project Gutenberg’s War and Peace by Leo Tolstoy....

December 21, 2008 · John