Commit graph

398 commits

Author SHA1 Message Date
Tiago Cunha
404f5207ef Fix indentation when defining variables.
Prompted by marco.
2012-02-02 23:43:27 +00:00
Tiago Cunha
11120d6ae8 Use a tail queue for the quirks.
Instead of hand rolling a dynamic array, just use a tail queue by taking
advantage of the queue(3) macros.

Simplifies the code, since there's no need to (re)allocate the array and
to keep track of its size and length.
2012-02-02 23:43:27 +00:00
Tiago Cunha
90bd93770a Fix indentation when defining variables.
Prompted by marco.
2012-02-02 23:33:39 +00:00
Tiago Cunha
ae990c02fc Use a tail queue for the key bindings.
Instead of hand rolling a dynamic array, just use a tail queue by taking
advantage of the queue(3) macros.

Simplifies the code, since there's no need to (re)allocate the array and
to keep track of its size and length.
2012-02-02 23:33:39 +00:00
Reginald Kennedy
5a2b38c1f9 - Add UTF-8 Support.
- Fix several memory leaks.

ok marco
2012-02-02 07:00:45 +08:00
Reginald Kennedy
64b9a6facf Fix response to applications when windows are not reconfigured as requested.
This gives applications a chance to redraw the window contents to the actual, unchanged, window geometry.
Fixes issues with gvim, emacs, firefox, feh and many other applications.

ok marco
2012-02-02 04:50:43 +08:00
Reginald Kennedy
e3fd7d898f scrotwm.c:
- Improve debug output.

- Improve code styling compliance.

- Use the X,Y,WIDTH,HEIGHT macros where applicable on ws_win and swm_region objects.

- Fix handling of _NET_MOVERESIZE_WINDOW client message.

ok marco
2012-01-29 01:29:31 +08:00
Reginald Kennedy
bc00007fce Fix 'jump' when moving a non-floated window with the mouse.
ok marco
2012-01-26 00:37:03 +08:00
Tiago Cunha
8ae086989f Plug memory and file descriptor leak.
Now that asprintf(3) return value is checked in conf_load(), make the
code release the memory returned by fparseln(3) and fclose(3) the
configuration file FILE pointer.

Style nit fixed while there.

ok marco
2012-01-23 19:17:16 +00:00
marco
d857737a4a broken space bar 2012-01-22 09:44:40 -06:00
Reginald Kennedy
4a043e8519 Ignore window crossing events that are generated when the cursor is not actually moved between windows. 2012-01-22 03:46:46 +08:00
Reginald Kennedy
b6f64e3b20 Moving and resizing floating windows with the mouse is now based on click location.
Floating windows are constrained to region on move/resize operations.

Resize center is now based on window center, instead of region center.

Fix several uninitialized/unused variable warnings.

Handle asprintf return value in conf_load.
2012-01-22 03:38:04 +08:00
Lawrence Teo
1bc1f62c7a Plug memory and file descriptor leaks in conf_load().
From: Tiago Cunha <tcunha@gmx.com>

ok marco
2012-01-19 21:43:04 -05:00
Lawrence Teo
71fb537309 Make uniconify work on windows with non-ASCII titles.
ok marco
2012-01-15 14:54:40 -05:00
Lawrence Teo
c9ca43ac66 Fix a crash when mvws_n is used in an empty workspace.
mvws_n invokes send_to_ws(), which in turn calls focus() to focus on
the previous window before sending the current window to the desired
workspace. The TAILQ_PREV() call in focus() will fail if there are no
windows in the current workspace.

This commit adds a safeguard to focus() by ensuring that the list of
windows in the current workspace is not empty and that there is at
least one uniconified window to focus on before proceeding.

This commit also modifies send_to_ws() to set r->ws->focus to NULL if
there are no more windows in the workspace after sending the current
window to another workspace. This fixes an odd behavior where you can
"summon" a window that you have previously moved to another workspace,
even though you are in an empty workspace.

Closes FS#191

ok marco
2012-01-09 20:45:49 -05:00
Lawrence Teo
2288fb7961 Skip iconified windows correctly.
This fixes a bug where the focus_next and focus_prev actions will get
"stuck" when an iconified window is in the way.

ok marco
2012-01-04 21:32:51 -05:00
Lawrence Teo
b32473d675 Improve status bar refresh code:
- Refresh status bar (if name/class/title are enabled) when no window
  can be focused, so that the name/class/title will be cleared.

- Handle window class/name change events to refresh the bar when appropriate.

- Move XA_WM_NORMAL_HINTS into the '#if 0' block, since the status bar
  should not need to be updated for that event.

From: Splex <splecks@rejii.com>

ok marco
2011-12-10 22:49:49 -05:00
Lawrence Teo
7392ce9247 Make error messages use errno when available.
While here, remove a few newlines that are already appended by err(3).

From: Tiago Cunha <tcunha@gmx.com>

ok marco
2011-12-07 21:53:12 -05:00
Lawrence Teo
87fe9fc33a Revert previously removed variable that is needed in debug mode.
Spotted by Splex <splecks@rejii.com>
2011-12-04 22:15:06 -05:00
Lawrence Teo
4762763ca6 Remove set but unused variables.
From thib

ok marco
2011-12-03 22:36:14 -05:00
Lawrence Teo
726356b44e Change search_win's key binding to M-f since M-s is already taken by
screenshot_all (oops!)

Spotted by thib.

While there, change the example key binding for firefox from M-f to
M-S-b.

"groovy" marco
2011-11-29 21:59:03 -05:00
Thordur Bjornsson
03de52ac93 Work around dmenu version incompatibilities.
Older versions of dmenu (4.2.1) do not send the newline character
long with the response while newer versions (4.4.2) do, this
causes mild bugs (last char in the name of the workspace gets
lobbed off for example). Fix it by sanitizing the string in the
response handler.

Tested by me & lteo with different dmenu version.
OK lteo, marco
2011-11-29 23:59:13 +00:00
Lawrence Teo
bf9901fca7 Search windows in the current workspace.
Pressing M-s will show a little numbered box on the top-left of each
window. You can switch focus to the desired window by typing its number
and pressing Enter. This lets you focus on a window instantly without
needing to cycle through other windows.

ok marco
2011-11-28 23:49:53 -05:00
Lawrence Teo
63eea69087 Name and search workspaces.
Workspaces can be searched by either name or number.

ok marco
2011-11-28 23:49:52 -05:00
Lawrence Teo
1bded57c64 Extend the uniconify code to support upcoming search-based features.
ok marco
2011-11-28 23:49:03 -05:00
Lawrence Teo
1c354dfac0 Cycle through all workspaces (empty or not) with M-<Up> and M-<Down>.
Adapted from a diff by Splex <splecks@rejii.com>

ok marco
2011-11-28 22:48:16 -05:00
Lawrence Teo
5f4a3fbd1a Allow status bar text to be left-, center-, or right-justified.
Adapted from a diff by Tiago Cunha <tcunha@gmx.com>

ok marco
2011-11-28 22:48:08 -05:00
Marco Peereboom
ec9086aab1 Make time localized too.
Closes FS#71
From: valere monseur (dobedo)
2011-11-28 09:50:50 -06:00
marco
82e158a61f Merge branch 'master' of ssh://opensource.conformal.com/git/scrotwm 2011-11-17 19:55:41 -06:00
marco
c9b0bc3c9d Make stack_enable work again.
From: Tiago Cunha <tcunha@gmx.com>
2011-11-17 19:55:05 -06:00
Lawrence Teo
60d2953634 fix an fd leak
ok marco
2011-11-17 19:05:31 -05:00
Lawrence Teo
befcf15917 new release script and versioning scheme for scrotwm
(adapted from xxxterm)

ok marco
2011-10-26 00:57:00 -04:00
Lawrence Teo
9c3aa396f4 new keyboard_mapping option to load pre-defined key bindings for
different keyboard layouts

ok marco
2011-10-25 22:42:57 -04:00
Marco Peereboom
8eb6cfee63 kill cvs tags 2011-10-25 15:54:39 -05:00
Marco Peereboom
163f135835 Merge branch 'master' of opensource.conformal.com:/git/scrotwm 2011-10-25 15:20:18 -05:00
Marco Peereboom
7d90b3de69 clang warning and remove port stuff 2011-10-25 15:19:02 -05:00
Lawrence Teo
56fb67f0d0 fix NULL pointer dereferences and implement some additional safeguards
ok marco
2011-10-19 21:50:02 -04:00
Marco Peereboom
f31159407e Revert "fix weird french keyboards"
This reverts commit 64075b7af1.

This causes crashes on spanish keyboards.
3364            if (!(win->transient != 0 || win->floating != 0))
(gdb) bt
) at scrotwm.c:6370
(gdb)

The real issue is in keypress though.
if ((keysym == keys[i].keysym || skeysym == keys[i].keysym)
evaluates to true when it shouldn't.
2011-10-06 11:30:45 -05:00
Marco Peereboom
64075b7af1 fix weird french keyboards
At least I was told this works.  Doesn't break my stuff so all is good
:-)

From: Jonathan Armani <dbd@asystant.net>
Via: Lawrence Teo <lteo@devio.us>
2011-10-03 17:10:48 -05:00
Marco Peereboom
15add7f7c0 move and resize floating windows with keyboard
This allows for an almost completely mouse-free operation of scrotwm,
which is especially useful on systems with crappy mice.

From: Lawrence Teo <lteo@devio.us>
2011-10-03 16:39:12 -05:00
marco
3c33883d02 more clang warnings that are usesul 2011-09-19 23:18:24 -05:00
marco
7207fd01c3 shut clang up and some white spaces 2011-09-19 21:56:45 -05:00
Marco Peereboom
f27b3e7749 bump version 2011-08-13 20:26:02 +00:00
Marco Peereboom
d1c7dc33a6 make urgent printf a lot more sane 2011-08-10 03:03:07 +00:00
Marco Peereboom
77f803db69 stray debug 2011-08-08 22:45:14 +00:00
Marco Peereboom
5d36a5c683 Add a fake mouse button 2 press for mouse starved machines and xterm
convenience.  So now one can paste using M-v.
2011-08-08 22:41:51 +00:00
Marco Peereboom
8d322b0d37 Add urgency hint based on a diff from:
Wido Snikkers <wsnikkers@pcextreme.nl>

Note that for this to work one must enable it in apps, xterm etc

Requested by many.
2011-08-06 18:21:00 +00:00
Marco Peereboom
11e1170f04 bump version 2011-08-02 13:22:34 +00:00
Marco Peereboom
dd4354b774 add a new stack layout status thing to print the number of panes in the
master and slave areas.

From: keenerd <keenerd@gmail.com>
2011-07-19 21:28:15 +00:00
Marco Peereboom
6c7fab8bc6 add Tuukka Kataja <stuge@xor.fi> to copyrights 2011-07-18 16:09:43 +00:00