]> git.mdlowis.com Git - proto/windowlab.git/commitdiff
removed even more stuff
authorMichael D. Lowis <mike@mdlowis.com>
Fri, 24 May 2019 03:11:11 +0000 (23:11 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Fri, 24 May 2019 03:11:11 +0000 (23:11 -0400)
CHANGELOG [deleted file]
Makefile
TODO [deleted file]
events.c
manage.c [deleted file]
screenshot.png [deleted file]
windowlab.1x [deleted file]
windowlab.h
windowlab.menurc [deleted file]

diff --git a/CHANGELOG b/CHANGELOG
deleted file mode 100644 (file)
index 581c5e2..0000000
--- a/CHANGELOG
+++ /dev/null
@@ -1,526 +0,0 @@
-1.40 (2010-04-04)
-
-* integrated a change from Simon Engelsman (thanks!):
-       * XNextEvent() was replaced by interruptible_XNextEvent() function in do_event_loop()
-
-
-1.39 (2009-12-27)
-
-* integrated more changes from Mats Erik Andersson:
-       * menu file handling made more lenient
-
-
-1.38 (2009-11-14)
-
-* integrated more changes from Mats Erik Andersson:
-       * makefile made more flexible
-       * signal handler for SIGHUP now just sets a semaphore, and reloading of menu resources happens in the event loop
-       * fixed problems found by auditing the code with Flawfinder
-
-
-1.37 (2009-10-04)
-
-* integrated a change from Campbell Barton (thanks!):
-       * fixed a bug which was freeing clients' names twice
-
-
-1.36 (2009-10-01)
-
-* rewrote the inherited licences part of the readme file to take into account 9wm's switch to the MIT licence
-* updated the menu options
-* integrated more changes from Mats Erik Andersson:
-       * added a simple mechanism which updates the menu in the running instance of WindowLab
-
-
-1.35 (2009-09-20)
-
-* integrated changes from Mats Erik Andersson (thanks!):
-       * fixed a bug that could cause processes to become zombified
-       * fixed a bug that made some windows unviewable
-
-
-1.34 (2006-11-12)
-
-* if no window has focus, focus is given to new windows
-* if the focused window is closed and no previous window has ever had focus, focus is given to the first client
-* integrated changes from Jeffrey Drake (thanks!):
-       * fonts now closed properly on exit
-* integrated more changes from Antti Nykänen:
-       * fixed a compiler warning
-* integrated more changes from David Lawrence Ramsey:
-       * fixed a compiler warning
-       * changes to the Makefile
-       * many other misc changes!
-
-
-1.33 (2005-10-16)
-
-* integrated changes from Dushkin (thanks!):
-       * scrolling the mouse wheel in the taskbar now task switches
-* integrated changes from Antti Nykänen (thanks!):
-       * fixed a crash that occurred on the BSDs (and presumably on other systems without /proc/self/exe)
-* integrated changes from Gregor Imboden (thanks!):
-       * fixed a crash that ocurrred when there are no focused windows and alt + F12 is pressed was fixed
-* events are always replayed rather than sometimes being eaten
-* new windows are no longer given focus
-* added TODO file
-
-
-1.32 (2005-07-20)
-
-* the executable has been made relocatable
-* double clicking on a windows titlebar toggles its depth (based on code from Roland Haas)
-* integrated changes from Mike M. Volokhov (thanks!):
-       * a segfault when using realloc() with menu items was fixed
-* integrated more changes from Roland Haas:
-       * fixed bug with applications that start in iconic mode
-       * -display option added
-       * the initial position and size hints in WM_HINTS are now ignored since they are flagged as obsolete in the manpage of SetWMHints
-
-
-1.31 (2005-06-21)
-
-* more resizing bugs were fixed
-* integrated changes from Roland Haas (thanks!):
-       * window borders are now taken into account properly when resizing
-       * bugs with XFT fonts when resizing were fixed
-
-
-1.30 (2005-05-23)
-
-* a bug that prevented windows from being made smaller from a side that was at the edge of the screen was fixed
-* a bug that caused the first clients taskbar button to disappear when all clients were hidden was fixed
-
-
-1.29 (2005-05-18)
-
-* integrated more changes from David Lawrence Ramsey:
-       * a segfault that occurred when removing clients was fixed
-       * some cosmetic code changes were made
-
-
-1.28 (2005-05-15)
-
-* when the focused window is closed or hidden, focus is returned to the previous window
-* fixed serious problem with using a modifier key for resizing that occurred on some systems
-* changed resizing to use alt instead of the Windows key
-* fixed bug when using alt-tab/alt-q to switch focus to a hidden window
-* changed default fontname to work with Xorg
-
-
-1.27 (2005-04-16)
-
-* hidden windows are now shown and re-hidden when their taskbar button is dragged over
-
-
-1.26 (2005-02-23)
-
-* integrated more changes from David Lawrence Ramsey:
-       * various improvements to the makefile were made
-       * a bug with vertically resizing windows that use size increments was fixed
-       * a few cosmetic cleanups to various sections of code were made
-
-
-1.25 (2004-12-23)
-
-* integrated changes from Matt Borkowski (thanks!):
-       * some Z ordering bugs were fixed
-* integrated more changes from David Lawrence Ramsey:
-       * click-to-focus was made to work on fullscreen windows that have lost focus
-       * size changes are applied to the original non-fullscreen coordinates of fullscreen windows
-       * all of the function prototypes were made consistent
-       * windows that reconfigure themselves without changing positions no longer move
-       * the shortcut keys behavior changed
-       * some gcc 3.3.x warnings were fixed (ported from aewm)
-       * the switch statement in handle_property_change() is no longer missing a break (ported from aewm)
-       * send_xmessage() now uses an XClientMessageEvent instead of a generic XEvent (ported from aewm)
-
-
-1.24 (2004-05-29)
-
-* holding down the Windows key on it's own now brings the current window to the front, after which dragging against the window's edge with any mouse button depressed resizes it
-* integrated more changes from David Lawrence Ramsey:
-       * a few prototypes/declarations were fixed
-
-
-1.23 (2004-03-12)
-
-* resizing now optionally uses a modifier key
-* a very serious bug in the resizing system was fixed
-* the button graphics were altered
-* the task switching keys were changed to alt-tab/alt-q
-* it's no longer possible to resize a fullscreen window
-* integrated more changes from David Lawrence Ramsey:
-       * a bug where resized windows lost focus was fixed
-       * a debugging statement was added
-       * a compiler warning was fixed
-       * an unnecessary get_mouse_position() call was removed
-
-
-1.22 (2004-02-22)
-
-* the middle mouse button is now used to resize the active window
-* the resize button has become a hide button
-* a bug when making windows smaller was fixed
-* alt-F9/F10 now raises the window as well as changing focus
-
-
-1.21 (2004-01-17)
-
-* the 8½ style of window reshaping was dropped in favour of a completely new mechanism that allows users to change one or many different edges of the window independantly in one action
-* small bug fix in window titlebar drawing
-* integrated changes from Guido Schimmels (thanks!):
-       * a bitmap font is no longer referenced if an XFT font is used
-* integrated more changes from David Lawrence Ramsey:
-       * the code was changed to use NULL explicitely
-       * draw_redraw_button() was renamed as draw_resize_button()
-       * warnings fixed when compiling using gccs -pedantic option
-
-
-1.20 (2003-12-31)
-
-* altered the button graphics and changed the default active window colour
-* removed the borderwidth command line option
-* integrated more changes from David Lawrence Ramsey:
-       * made fullscreen mode respect window size increment hints as well as maximum size hints
-       * clicking the right mouse button between between clicking the resize button and starting the window drag cancels resize mode
-
-
-1.19 (2003-11-14)
-
-* users can now click and drag the mouse pointer over the taskbar to quickly find different windows
-* fixed bug where a menu item would not be lauched unless the cursor was moved
-* corrected amount that taskbar items text are indented to match that of windows titlebars
-
-
-1.18 (2003-11-03)
-
-* small bug fix in window titlebar drawing
-
-
-1.17 (2003-11-01)
-
-* images added to windows titlebar buttons
-* quit option added to the sample menu file
-
-
-1.16 (2003-10-04)
-
-* integrated more changes from David Lawrence Ramsey:
-       * ConfigureRequest handler modified so that refix_position() is called before gravity ids reapplied (this allows refix_position() to be much simpler)
-       * resize increments of zero are now handled properly
-       * some changes to the minimum size #defines
-
-
-1.15 (2003-08-17)
-
-* integrated more changes from David Lawrence Ramsey:
-       * it now compiles with Xft support (it previously referenced detail_col instead of text_col in main.c)
-       * extra logic added to refix_position() to keep windows from overlapping the taskbar
-
-
-1.14 (2003-08-17)
-
-* fullscreen mode now reserves space at the top of the screen for the taskbar/menubar which is only displayed when the mouse is over it (for users who want to watch fullscreen video without the wm showing)
-* created a new colour to cover the screen when a window in fullscreen mode is too small to fill the screen and reintroduced a separate colour for the text
-* rewrote refix_postion() to use fix_position()
-* reduced the height of the taskbar - it was previously BORDERWIDTH taller than the windows titlebars
-* WindowLab now reallocs memory unused by the menu options
-
-
-1.13 (2003-08-09)
-
-* depressed button colour is now derived from the active titlebar colour
-* removed redundant command line arguments and made the rest less cryptic
-* clients that cannot be made as big as the screen are now centred when put into fullscreen mode
-* Makefile now prompts the user before overwriting an existing menurc file
-* integrated more changes from David Lawrence Ramsey:
-       * fullscreen_client now set to NULL in send_wm_delete()
-       * made a few minor cleanups
-
-
-1.12 (2003-07-20)
-
-* cycle_previous() and cycle_next() greatly simplified
-* unhide() function added
-* hidden windows are now listed in the taskbar, and clicking their buttons will unhide them
-* RATIONALE file added to explain the reasoning behind some of WindowLabs features
-* integrated more changes from David Lawrence Ramsey:
-       * code added to keep windows (eg Mozilla and Mozilla Firebird) from raising themselves
-       * modified refix_position() to handle maximized (decorless) windows properly
-       * fixed a bug in the manpage where the description of the keybindings is all fused into one paragraph
-       * made a few minor cleanups
-
-
-1.11 (2003-07-05)
-
-* fixed fullscreenmode so that no border is shown on screen
-* setsid() is now called in fork_exec() to prevent child processes from dying when WindowLab is killed or crashes
-* support added for toggling window depth and cycling between next and previous windows using the keyboard
-
-
-1.10 (2003-05-25)
-
-* added code to toggle fullscreen mode on non transient windows when the user hits F11
-* tidied up some more code
-
-
-1.9 (2003-04-19)
-
-* made new windows appear fully on screen instead of just their titlebar
-* added code to destroy the constraint window if it can't be grabbed (found by Pierre-Paul Lavoie)
-* removed unnecessary unmapping of windows before they were destroyed (found by Pierre-Paul Lavoie)
-* integrated changes from Pierre-Paul Lavoie (thaks ppl!):
-       * the menurc path is now specified by a -D option on the compile line in the makefile instead of being a #define in the code
-* integrated more changes from David Lawrence Ramsey:
-       * significant changes made to the ConfigureRequest event handler with the addition of refix_position()
-       * crash in dump_clients() in DEBUG mode fixed
-
-
-1.8 (2003-03-30)
-
-* integrated more changes from David Lawrence Ramsey:
-       * the makefile now uses pkg-config (which XFree86 4.3.0 should include an entry for) to get the library and include directory information needed to compile properly (ported from aewm)
-       * menufile.c changed to use XftTextExtents8() to get the proper width of text when Xft is used
-
-
-1.7 (2003-03-30)
-
-* added title bar to the reshape window
-* small improvements made to manage.c
-
-
-1.6 (2003-03-15)
-
-* added visual hint when a button is depressed
-* integrated changes from David Lawrence Ramsey (thanks!):
-       * some focussing problems fixed
-       * GTK resizing bug handled
-       * iconified windows now handled properly
-       * misc small fixes
-
-
-1.5 (2003-02-27)
-
-* gave menu its own colours
-* many changes and fixes, especially to sweep() and helper functions in manage.c
-
-
-1.4 (2003-02-18)
-
-* added menu system - this should be the last fundamental change to functionality
-
-
-1.3 (2003-02-10)
-
-* fixed crash caused if the taskbar is clicked and no clients are present (found by lanzz)
-* changed resizing to use a window rather than inverting the background
-* many misc bug fixes
-* fixed a problem with xft/freetype (found by Michael Haller)
-
-
-1.2 (2003-01-23)
-
-* new client window positioning algorithm altered so that it's more obvious to the user
-* small bug in find_client fixed
-
-
-1.1 (2003-01-12)
-
-* some refactoring in events.c
-* added some missing event handling for the taskbar window (found by Pierre-Paul Lavoie)
-* made taskbar window update when a client window changes its title
-
-
-1.0 (2002-12-26)
-
-* first public release
-
-
-
-*** ORIGINAL AEWM CHANGELOG ***
-
-1.1.2:
-
- * Rewrote init_position again. This fixes the problem with specifying a USPosition containing 0.
- * Added gtk-menu client contributed by Adam Sampson <azz@gnu.org>. I want to fold this stuff into the rest of the goodies eventually. For now, just keep in mind that the extensions to .paletterc may change.
- * Added a "-version" option for printing version information from the command line.
- * Added some proper headers to all the files in goodies/lib/.
- * Replaced strcpy/strcat in panel-misc.c with snprintf to prevent a possible buffer overflow.
- * Made some improvements to the .paletterc parser: squish a possible segfault, handle comments/blank lines, ignore menu directives.
- * Reformatted man pages.
-
-1.1.1:
-
- * Fix typo in man page install location.
- * Use -lXt when compiling Xaw goodies (required to build on SunOS).
- * Added some more documentation (mostly about things that are likely to break.)
-
-1.1.0:
-
- * Xft (freetype extension) support, thanks once again to help from Adam Sampson <azz@gnu.org>.
- * A few Makefile improvements: only link against required libraries, easier enabling/disabling of options, don't attempt to compile against headers in the binary destination tree.
- * Yet more init_position tweaks -- use x position hint even if y is out of range and vice versa, and take window gravity into account when positioning.
- * Some additions and improvements to the debug code (mainly printing names of constants instead of cryptic numbers).
-
-1.0.3:
-
- * Backport new init_position, -version option, new man pages, and panel-misc.c crasher/overflow fixes.
-
-1.0.2:
-
- * Backport -lXt fix and new documentation.
-
-1.0.1:
-
- * Fix remove_client so that it compiles with -DDEBUG turned on.
-
-1.0.0:
-
- * All right, I think we're stable now. New stuff will go into 1.1.x.
- * Changed init_position so that it doesn't cut off very large windows. This was merely annoying for regular windows, but it was downright buggy for incsized ones.
- * Fixed compilation bug when shape support was disabled.
-
-0.9.19:
-
- * OK, I broke command line parsing again. Yes, I'm an idiot.
- * Fixed problem with exec()-ing a non-existent program.
-
-0.9.18:
-
- * Fixed bug in init_position; we can safely use PPosition now. If windows start popping up in bad places, check their size hints before yelling at me.
- * Use fork/exec instead of system(3) to run programs. Fixed signal handlers to reflect this (we need POSIX sigaction(2)).
- * Cleaned up MWM hints/WM_SIZE hints code (they sort of match now), and only request the MWM atom at startup instead of for each call.
- * Started yet another goodies reorganization, and ended up reverting a lot of it. However what's changed should go a little ways towards cleaning things up.
- * Fix a build error where some goodies files that needed to be compiled against X were compiled without -I/use/X11R6/lib, failing on systems without a symlink from /usr/include/X11.
- * Tossed out historical 'iheight' junk in border calculation.
-
-0.9.17:
-
- * Use ln -f to ignore overwriting previously installed manpage links.
- * If MWM hints are enabled, no-border windows will no longer get a border upon exiting.
- * The order of buttons in *-palette is no longer changed by title updates or unhiding windows.
- * xaw-palette was fixed to work with proper versions of Xaw (shame on me for testing with Xaw3d!), including the one in XF4. The new internals have ported over to gtk-palette.
-
-0.9.16:
-
- * Fixed a shaping bug (which actually existed before changes made in 0.9.15) where a window that used to be shaped, but then became unshaped, wasn't updated properly.
- * MWM hints support can now be compiled in with -DMWM_HINTS, thanks to help from Adam Sampson <azz@gnu.org>.
- * Set the input focus upon entering a window frame, instead of on entering the child window.
-
-0.9.15:
-
- * Display a titlebar for shaped windows. This also makes the bug where shaped windows were getting gravitated as if they had a titlebar irrelevant.
- * Tiny cleanups for the Debian package, including:
- * Man page for the goodies.
- * Typo in makefile fixed (tried to strip manpage, ah-reer-reer-reer).
- * Polished the main man page a bit.
-
-0.9.14:
-
- * Free cursors and GCs in quit_nicely.
- * Switch order of objects and libraries in Makefile to placate Solaris cc.
- * Rename raise to raise_win -- raise is in signal.h of course (duh!)
- * Added copyright notice to all goodies and Makefiles due to someone ignoring my license (this has been worked out).
- * Bail out on lack of default font. You *should* be reading aewm.h first of course ;-)
-
-0.9.13:
-
- * Fix really stupid thing I did while refactoring make_new_client, where a window that started as Withdrawn would stay that way instead of getting mapped.
- * Deal with withdrawing clients properly in *-palette, by watching for the WM_STATE property to be changed instead of looking at UnmapNotify events.
-
-0.9.12:
-
- * Clean up clients on receipt of a DestroyNotify. This is needed when a client is already unmapped (i.e, the user iconified it) and it exits.
- * Preserve window stacking order on exit and restart.
- * Mucked about with the make_new_client logic; tell me if this breaks something.
- * Added gtk-*-menu clients contributed by Adam Sampson <azz@gnu.org>.
-
-0.9.11:
-
- * Got rid of unneeded PropertyChangeMask on root window. Silly me.
- * Removed the ugly array/linked-list hack from xaw-palette, so that the internal workings of both palette clients are now basically identical.
- * static'd everything that should have been static.
- * Updated email, documentation, etc.
- * Got rid of handle_reparent_event, as a client call to XReparentWindow is taken care of by handle_unmap_event.
- * Backed out the 0.9.9 change to option-parsing macros, which were causing all options to fail miserably (argh).
-
-0.9.10:
-
- * Handle withdrawing windows properly in xaw-palette. Both palette clients are a little saner now.
- * Updated goodies docs.
- * ungravitate when printing geometry for move/resize.
- * Moved more code from individual goodies to common-run.c.
- * Got rid of unhide() as we never use it.
- * Replaced GenericWidget typedef silliness with global variables. sometimes you just have to pick the lesser of two evils...
-
-0.9.9:
-
- * Finally de-insanified handle_xerror. Instead of going through contortions in remove_client to avoid raising errors, we turn the error handler off during the server grab.
- * Both palette goodies now track iconification of clients and WM_NAME changes.
- * gtk-palette is now oriented horizontally, and includes a menu, providing lots more space for client buttons.
- * Made the parse_option macros reusable (thanks to the comp.lang.c folks for the reminder).
- * make sure get_wm_name in the goodies doesn't crash for windows that have no name.
- * Minor typo corrections and stuff.
-
-0.9.8:
-
- * Brown paper bag: take debugging stupidity out of gtk-palette.
- * Overhaul the goodies' build system yet again.
- * Gtk-palette now gets the screen size correctly.
- * All switch/palette goodies now cut off long titles, use WM_NAME instead of WM_ICON_NAME, and place iconified titles in parenthesis.
- * No changes to aewm itself in this release.
-
-0.9.7:
-
- * Added lots of comments.
- * General code cleanups, tweaks, reformats all over.
- * Fixed iconic state problem.
- * Plugged a memory leak in send_wm_delete.
- * Added -new3.
- * Fixed -new[123] allocation bug.
- * Made debug code considerably saner.
- * Print "80x25" and such when resizing xterms.
- * Replaced sprintf with snprintf.
- * Got rid of -display. set DISPLAY in your environment instead, so that it propagates to child processes.
- * Messed around with the goodies' build system.
- * Fixed gtk-palette; events are now filtered properly at the GDK level.
- * Replaced variable length arrays with malloc/free.
- * Added xsession, since I've been using it forever.
-
-0.9.6:
-
- * Fix for handling inital window geometry.
- * A few memory leaks plugged.
- * Wrote a man page
- * More consistent borders for transient windows.
-
-0.9.5:
-
- * Print window geometry while moving/resizing.
- * Added some WM_NORMAL_HINTS sanity checks
- * Set the keyboard focus on window enter (for rxvt, etc).
-
-0.9.4:
-
- * Root menu replaced by another client.
- * Added -bw option.
- * Border-drawing fixes (only visible if you have very wide borders).
- * Got rid of mouse button exit.
-
-0.9.3:
-
- * Put the root menu code back in.
- * Added more goodies and reorganized them.
-
-0.9.2:
-
- * Minor ICCCM compliance fix regarding WM_STATE.
-
-0.9.1:
-
- * A small fix to make the palette complain if no rc file exists.
-
-0.9:
-
- * Initial public release. Before this, aewm was called 'swim' and was used by me as a school project. It was also rather unstable.
\ No newline at end of file
index 8eca5404b1167ea67d981cc267b1291ad0e56b00..c6c657a196a10a7f6ba5f59d8063d2d3ff875e82 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,7 @@ LDPATH = -L$(XROOT)/lib
 LIBS = -lX11 -lXft
 
 PROG = windowlab
-OBJS = main.o events.o client.o new.o manage.o misc.o
+OBJS = main.o events.o client.o new.o misc.o
 HEADERS = windowlab.h
 
 all: $(PROG)
diff --git a/TODO b/TODO
deleted file mode 100644 (file)
index c8fc3d3..0000000
--- a/TODO
+++ /dev/null
@@ -1,4 +0,0 @@
-TODO
-
-* add EWMH support (back port it from aewm?)
-* allow right clicks on client windows to show WindowLab's menubar as well as being passed to the client
index a1f4b19294bef38097d3e2380b66386a48c11671..8e628370ebfada7d86f86af148f393e3f9196bb5 100644 (file)
--- a/events.c
+++ b/events.c
@@ -99,7 +99,6 @@ static void handle_button_press(XButtonEvent *e)
 
 static void handle_windowbar_click(XButtonEvent *e, Client *c)
 {
-    move(c);
 }
 
 /* Because we are redirecting the root window, we get ConfigureRequest
@@ -229,27 +228,6 @@ static void handle_client_message(XClientMessageEvent *e)
 
 static void handle_property_change(XPropertyEvent *e)
 {
-    Client *c = find_client(e->window, WINDOW);
-    long dummy;
-
-    if (c != NULL)
-    {
-        switch (e->atom)
-        {
-            case XA_WM_NAME:
-                if (c->name)
-                {
-                    XFree(c->name);
-                    c->name = NULL;
-                }
-                XFetchName(dsply, c->window, &c->name);
-                redraw(c);
-                break;
-            case XA_WM_NORMAL_HINTS:
-                XGetWMNormalHints(dsply, c->window, c->size, &dummy);
-                break;
-        }
-    }
 }
 
 /* X's default focus policy is follows-mouse, but we have to set it
@@ -264,13 +242,9 @@ static void handle_property_change(XPropertyEvent *e)
 
 static void handle_enter_event(XCrossingEvent *e)
 {
-    Client *c = NULL;
-
-        c = find_client(e->window, FRAME);
-        if (c != NULL)
-        {
-            XGrabButton(dsply, AnyButton, AnyModifier, c->frame, False, ButtonMask, GrabModeSync, GrabModeSync, None, None);
-        }
+    Client* c = find_client(e->window, FRAME);
+    if (c != NULL)
+        XGrabButton(dsply, AnyButton, AnyModifier, c->frame, False, ButtonMask, GrabModeSync, GrabModeSync, None, None);
 }
 
 /* If we were covered by multiple windows, we will usually get
@@ -279,10 +253,8 @@ static void handle_enter_event(XCrossingEvent *e)
 
 static void handle_expose_event(XExposeEvent *e)
 {
-        Client *c = find_client(e->window, FRAME);
-        if (c != NULL && e->count == 0)
-        {
-            redraw(c);
-        }
+    Client *c = find_client(e->window, FRAME);
+    if (c != NULL && e->count == 0)
+        redraw(c);
 }
 
diff --git a/manage.c b/manage.c
deleted file mode 100644 (file)
index 78cf822..0000000
--- a/manage.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* WindowLab - an X11 window manager
- * Copyright (c) 2001-2010 Nick Gravgaard
- * me at nickgravgaard.com
- * http://nickgravgaard.com/windowlab/
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
- */
-
-#include "windowlab.h"
-
-/* The name of this function is a bit misleading: if the client
- * doesn't listen to WM_DELETE then we just terminate it with extreme
- * prejudice. */
-
-void send_wm_delete(Client *c)
-{
-    int i, n, found = 0;
-    Atom *protocols;
-
-    if (XGetWMProtocols(dsply, c->window, &protocols, &n))
-    {
-        for (i = 0; i < n; i++)
-        {
-            if (protocols[i] == wm_delete)
-            {
-                found++;
-            }
-        }
-        XFree(protocols);
-    }
-    if (found)
-    {
-        send_xmessage(c->window, wm_protos, wm_delete);
-    }
-    else
-    {
-        XKillClient(dsply, c->window);
-    }
-}
-
-void move(Client *c)
-{
-    XEvent ev;
-    int old_cx = c->x;
-    int old_cy = c->y;
-    int mousex, mousey, dw, dh;
-    Client *exposed_c;
-    Rect bounddims;
-    Window constraint_win;
-    XSetWindowAttributes pattr;
-
-    dw = DisplayWidth(dsply, screen);
-    dh = DisplayHeight(dsply, screen);
-    get_mouse_position(&mousex, &mousey);
-
-    bounddims.x = (mousex - c->x) - BORDERWIDTH(c);
-    bounddims.width = (dw - bounddims.x - (c->width - bounddims.x)) + 1;
-    bounddims.y = mousey - c->y;
-    bounddims.height = (dh - bounddims.y - (c->height - bounddims.y)) + 1;
-    bounddims.y += BARHEIGHT() - BORDERWIDTH(c);
-    bounddims.height += c->height - (BARHEIGHT() - DEF_BORDERWIDTH);
-
-    constraint_win = XCreateWindow(dsply, root, bounddims.x, bounddims.y, bounddims.width, bounddims.height, 0, CopyFromParent, InputOnly, CopyFromParent, 0, &pattr);
-    XMapWindow(dsply, constraint_win);
-
-    if (!(XGrabPointer(dsply, root, False, MouseMask, GrabModeAsync, GrabModeAsync, constraint_win, None, CurrentTime) == GrabSuccess))
-    {
-        XDestroyWindow(dsply, constraint_win);
-        return;
-    }
-
-    do
-    {
-        XMaskEvent(dsply, ExposureMask|MouseMask, &ev);
-        switch (ev.type)
-        {
-            case Expose:
-                exposed_c = find_client(ev.xexpose.window, FRAME);
-                if (exposed_c != NULL)
-                {
-                    redraw(exposed_c);
-                }
-                break;
-            case MotionNotify:
-                c->x = old_cx + (ev.xmotion.x - mousex);
-                c->y = old_cy + (ev.xmotion.y - mousey);
-                XMoveWindow(dsply, c->frame, c->x, c->y - BARHEIGHT());
-                send_config(c);
-                break;
-        }
-    }
-    while (ev.type != ButtonRelease);
-
-    ungrab();
-    XDestroyWindow(dsply, constraint_win);
-}
diff --git a/screenshot.png b/screenshot.png
deleted file mode 100644 (file)
index 9782f0f..0000000
Binary files a/screenshot.png and /dev/null differ
diff --git a/windowlab.1x b/windowlab.1x
deleted file mode 100644 (file)
index 697932e..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-.\" WindowLab - an X11 window manager
-.\" by Nick Gravgaard (me at nickgravgaard.com)
-.TH WINDOWLAB 1x
-.SH "NAME"
-windowlab \- a window manager for X11
-.SH "SYNOPSIS"
-.B windowlab \fI[options...]\fP
-.SH DESCRIPTION
-.B windowlab
-is a small and simple window manager of novel design.
-.PP
-It has a click-to-focus but not raise-on-focus policy, a window resizing mechanism that allows one or many edges of a window to be changed in one action, and an innovative menubar that shares the same part of the screen as the taskbar. Window titlebars are prevented from going off the edge of the screen by constraining the mouse pointer, and when appropriate the pointer is also constrained to the taskbar/menubar in order to make target menu items easier to hit.
-.PP
-WindowLab places a taskbar at the top of the screen and adds a titlebar to the top of each window. These titlebars consist of a draggable area, and three icons on the right hand side. When left clicked, these icons:
-.PP
-* hide the window
-.br
-* toggle the window's Z order Amiga style (if it's not at the front, bring it to the front, otherwise send it to the back)
-.br
-* close the window
-.PP
-Another way of toggling a window's Z order (depth) is by double left clicking on the draggable part of its titlebar.
-.PP
-Windows' titlebars are prevented from leaving the screen and cannot overlap the taskbar.
-.PP
-The taskbar should list all windows currently in use. Left clicking on a window's taskbar item will give that window focus and toggle its Z order (depth).
-.PP
-To resize the active window hold down alt and push against the window's edges with the left mouse button down.
-.PP
-If you right click outside a client window, WindowLab's taskbar becomes a menubar. Releasing the right mouse button over a selected menu item will start a corresponding external program. WindowLab will look in each of the following files in turn for definitions of the menu labels and commands:
-.PP
-* ~/\.windowlab/windowlab\.menurc
-.br
-* \.\./etc/windowlab\.menurc (from the directory containing the executable)
-.br
-* /etc/X11/windowlab/windowlab\.menurc
-.PP
-Each line in the menurc file should have the menu label, a colon, and then the corresponding command, eg:
-.PP
-The GIMP:gimp
-.PP
-New windows (that don't specify their location) are positioned according to the coordinates of the mouse - the top-left hand corner of a new window is set to the location of the mouse pointer (if necessary the window will be moved to ensure that all of it is on the screen).
-.PP
-WindowLab has the following keyboard controls. Hold down alt and press:
-.PP
-*
-.B tab
-to give focus to the previous window
-.br
-*
-.B q
-to give focus to the next window
-.br
-*
-.B F11
-to toggle fullscreen mode on and off for non transient windows
-.br
-*
-.B F12
-to toggle the window's depth. This is the same as left clicking a window's middle icon
-.SH OPTIONS
-.TP
-.B -font \fIfont-spec\fP
-Draw window titles with the font defined by
-.IR font-spec .
-.TP
-.B -border \fIcolor\fP, -text \fIcolor\fP, -active \fIcolor\fP, -inactive \fIcolor\fP, -menu \fIcolor\fP, -selected \fIcolor\fP, -empty \fIcolor\fP
-Use
-.I color
-for the borders, the text, the active background, the inactive background, the menubar, the selected menu item and empty parts of the screen.
-.TP
-.B -about
-Print information to stdout and exit.
-.TP
-.B -display
-Sets which X display will be managed by
-.BR windowlab .
-.SH ENVIRONMENT VARIABLES
-.B DISPLAY
-Sets which X display will be managed by
-.BR windowlab .
-.SH "SEE ALSO"
-.BR X (7),
-.I The Inter-Client Communication Conventions Manual (from the X11R6 documentation).
-.SH "AUTHOR"
-Nick Gravgaard (me at nickgravgaard.com)
index 3e36a58f9d553b75182aa2d2ce917a0537fa1e27..121479ae93d83439ae8c825de04cf86fd2bc617d 100644 (file)
 #define DEF_BORDER "#000"
 #define DEF_TEXT "#000"
 #define DEF_ACTIVE "#fd0"
-#define DEF_INACTIVE "#aaa"
-#define DEF_MENU "#ddd"
-#define DEF_SELECTED "#aad"
-#define DEF_EMPTY "#000"
-#define DEF_BORDERWIDTH 2
+#define DEF_BORDERWIDTH 1
 #define ACTIVE_SHADOW 0x2000 // eg #fff becomes #ddd
 #define SPACE 3
 
 
 #define ABS(x) (((x) < 0) ? -(x) : (x))
 
-// shorthand for wordy function calls
-#define setmouse(w, x, y) XWarpPointer(dsply, None, w, 0, 0, 0, 0, x, y)
-#define ungrab() XUngrabPointer(dsply, CurrentTime)
-#define grab(w, mask, curs) \
-    (XGrabPointer(dsply, w, False, mask, GrabModeAsync, GrabModeAsync, None, curs, CurrentTime) == GrabSuccess)
-#define grab_keysym(w, mask, keysym) \
-    XGrabKey(dsply, XKeysymToKeycode(dsply, keysym), mask, w, True, GrabModeAsync, GrabModeAsync); \
-    XGrabKey(dsply, XKeysymToKeycode(dsply, keysym), LockMask|mask, w, True, GrabModeAsync, GrabModeAsync); \
-    if (numlockmask) \
-    { \
-        XGrabKey(dsply, XKeysymToKeycode(dsply, keysym), numlockmask|mask, w, True, GrabModeAsync, GrabModeAsync); \
-        XGrabKey(dsply, XKeysymToKeycode(dsply, keysym), numlockmask|LockMask|mask, w, True, GrabModeAsync, GrabModeAsync); \
-    }
-
-// I wanna know who the morons who prototyped these functions as implicit int are...
-#define lower_win(c) ((void) XLowerWindow(dsply, (c)->frame))
-#define raise_win(c) ((void) XRaiseWindow(dsply, (c)->frame))
-
 // border width accessor to handle hints/no hints
 #define BORDERWIDTH(c) (DEF_BORDERWIDTH)
 
@@ -185,10 +163,6 @@ extern Client *get_prev_focused(void);
 // new.c
 extern void make_new_client(Window);
 
-// manage.c
-extern void move(Client *);
-extern void send_wm_delete(Client *);
-
 // misc.c
 extern void err(const char *, ...);
 extern int handle_xerror(Display *, XErrorEvent *);
diff --git a/windowlab.menurc b/windowlab.menurc
deleted file mode 100644 (file)
index 4023d30..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-# make sure each line ends in LF not CRLF!
-xterm:xterm
-gedit:gedit
-Nautilus:nautilus
-Firefox:firefox
-Pidgin:pidgin
-XChat:xchat
-Rhythmbox:rhythmbox
-Totem:totem
-GIMP:gimp
-Edit menu:gvim /etc/X11/windowlab/windowlab.menurc
-About:windowlab -about | xmessage -file -
-Reload:pkill -HUP windowlab
-Quit:skill windowlab