Commit graph

57 commits

Author SHA1 Message Date
David Hill
46139e4404 convert update_window() to XCB 2012-07-21 05:58:30 +08:00
David Hill
dbbf2709df convert ewmh_update_win_state() to XCB 2012-07-21 05:58:30 +08:00
David Hill
e3447e3952 replace ScreenCount() calls with XCB calls. 2012-07-21 05:58:30 +08:00
David Hill
2f1cecab3f Change some 'Window' types to xcb_window_t's. 2012-07-21 05:58:30 +08:00
David Hill
f2da41ebd0 convert grabbuttons() and partial unfocus_win to XCB 2012-07-21 05:58:30 +08:00
David Hill
64eabd5641 make ewmh_update_actions() use XCB. Also convert ewmh_hint
structure to XCB.
2012-07-21 05:58:30 +08:00
David Hill
ff9fc42a00 convert window_get_pid and partially custom_region to xcb 2012-07-21 05:58:30 +08:00
David Hill
f049b883c1 make get_iconic use xcb 2012-07-21 05:58:30 +08:00
David Hill
4b08cf2e01 make update_iconic() use xcb 2012-07-21 05:58:30 +08:00
David Hill
ba9be109b4 make setscreencolor use xcb 2012-07-21 05:58:29 +08:00
David Hill
376c5ec3f0 make setup_ewmh() use xcb 2012-07-21 05:58:29 +08:00
David Hill
e876d7de13 initial code to compile in xcb support.
many more diffs coming.
2012-07-21 05:58:29 +08:00
Reginald Kennedy
ef048ac6ee Fix issue where _NET_ACTIVE_WINDOW is ignored on unmanaged windows.
ok marco
2012-07-17 04:04:31 +08:00
Reginald Kennedy
52e931e498 Fix spawn_position to actually do what it is supposed to do. 2012-07-12 01:23:43 +08:00
David Hill
9c2fd87adb use XRRGetScreenResourcesCurrent instead.
XRRGetScreenResourcesCurrent is cheaper:  no hardware polling.
This seems to fix my garbaled console too.
2012-07-09 17:21:43 -04:00
Tiago Cunha
3088ae3cd6 Simplify limit retrieving. 2012-07-04 21:47:24 +01:00
Tiago Cunha
94a4eee141 Turn this into a function. 2012-07-04 21:37:20 +01:00
Reginald Kennedy
545774e963 Add backwards compatibility for the spawn_term binding. 2012-07-03 22:18:03 +08:00
Reginald Kennedy
cd1e9bacba Improve configurerequest handling.
Allow applications to change float geometry until manually resized by
the user.

Fix window mapping when managing a window
Move the window to the correct workspace first so that the region
dimensions are available to the app for proper sizing.

Improve fullscreen handling.
Prevent move or resize operations on fullscreen windows.

Add border flag to ws_win for window geometry calculations.

Utilize update_window instead of separate calls to XConfigureWindow.

ok marco
2012-07-03 03:31:15 +08:00
Reginald Kennedy
d66a94fce3 Fix status bar flicker by double-buffering the output.
Add a bar struct to contain the properties of each bar.

Eliminate redundant calls to set the bar colors.

ok marco
2012-07-03 01:03:48 +08:00
Tiago Cunha
934bbe1ff2 Add new character sequence used for padding.
Instead of inserting sequential spaces one by one, add support for
padding with the +< character pair. Uses the specified limit or one
otherwise.
2012-06-26 19:44:27 +01:00
Reginald Kennedy
dd4e0b8dd0 Fix 'term' action binding and defaults.
Note that 'program[term]' should be used to set the terminal; not
spawn_term.

Prevent width options from being set to negative values.

Change conf autorun example to xombrero.

Improve readability of enums.
(Based on patch submitted by Jason Woofenden <jason@jasonwoof.com>)

Sort conf_load switch cases to match enum.

ok marco
2012-06-27 01:30:46 +08:00
Reginald Kennedy
f6d686fcff Add horizontal_flip and vertical_flip layout options.
Based on patch submitted by Olivier Mauras <coredumb@coredumb.net>

ok marco
2012-06-12 21:14:13 +08:00
Reginald Kennedy
69e4733971 Fix issue replacing certain configuration bindings.
ok marco
2012-06-08 03:14:01 +08:00
Tiago Cunha
bfbcbe5c62 Add new window related character sequence.
Character pair +P outputs both window class and title separated by a
colon. Might be useful to some users and it's only a few lines of code.
2012-06-05 22:32:02 +01:00
Tiago Cunha
e67f9f1bfa Character sequence for the floating indicator. 2012-06-05 22:32:02 +01:00
Tiago Cunha
09526664b2 Missed a few spaces in the default format.
If not displaying the window title, add four spaces after the window
class. Noticed due to the previously related change.
2012-06-05 22:32:02 +01:00
Tiago Cunha
9fc72f5c49 Sprinkle some const. 2012-06-05 22:32:02 +01:00
Tiago Cunha
9e2f9895c3 No point having static here. 2012-06-05 22:32:02 +01:00
Tiago Cunha
a10363decb Technically, it's a tree, now. 2012-06-05 22:32:02 +01:00
Tiago Cunha
d37bb62834 Move a few spaces to the right place.
The format should only be manipulated by the bar_fmt function or the
user. Thus, delete extra space when outputting the window name and move
the strlcat(3) call that appends four spaces where it belongs. Inside
the window title conditional.

Noticed by LordReg.
2012-06-05 22:32:02 +01:00
Tiago Cunha
ae4071ff80 Limit window name to 64 characters by default. 2012-06-05 22:32:01 +01:00
Tiago Cunha
98fcba2bdb Support maximum length in the character pairs.
The specified length is used to limit the number of characters outputted
by the sequence. Thus, it's now possible to limit, for instance, the
window name length.

This fixes Flyspray bug #243.
2012-06-05 22:32:01 +01:00
Tiago Cunha
e8dd19c1f7 Warn the user if format is too long. 2012-06-05 22:32:01 +01:00
Tiago Cunha
96db1bf3c0 The screen number can be fetched from the region. 2012-06-05 22:32:01 +01:00
Tiago Cunha
8ce185e7ff Add the ability to format the status-bar output.
Introduced the new bar_format configuration file keyword that allows to
customize the status-bar by providing character sequences that are
replaced accordingly, effectively supplanting the enabled options. The
default output is retained, though.

Idea taken from tmux(1).
2012-06-05 22:32:01 +01:00
Tiago Cunha
d97dc68f36 Zap superfluous calls to bar_update.
Remove scattered calls to bar_update when switching workspaces and
cycling layouts, which are preceded by a focus function call. They
already are (as they should be) responsible for doing that.
2012-06-05 22:30:56 +01:00
Tiago Cunha
141dfdbda8 Refresh status-bar after moving a window. 2012-06-05 22:30:56 +01:00
Tiago Cunha
900f61bbbb Kill references before focusing on a new window.
Like the other focusing functions, make focus_prev call kill_refs before
trying to focus on a new window. This way, the current window references
are cleared like it should be when the very last window is destroyed.

Otherwise, the status-bar output will contain (while its alarm does not
expire) the class hint of the to be removed window.
2012-06-05 22:30:56 +01:00
Tiago Cunha
a7cda44d81 Don't call the status-bar wrapper function.
The update functions already check if the window related enabled options
are set. Just call it directly, instead. As a consequence, the wrapper
function can now be deleted.
2012-06-05 22:30:06 +01:00
Tiago Cunha
3ce4ba02b4 Reuse class hint in the status-bar.
The window's class hint is already retrieved by the manage_window
function, which is called when a new application is spawned. Therefore,
use it when displaying the application's class and name, instead of
fetching them again with XGetClassHint(3).

Besides, its error checking was incorrect, since it also returns zero on
error.
2012-06-05 22:30:06 +01:00
Tiago Cunha
21a44b58c7 Remove unused variable. 2012-06-05 22:30:06 +01:00
Tiago Cunha
999734e380 Fix a few style nits. 2012-06-05 22:30:06 +01:00
Reginald Kennedy
a658878aea Add new options to change focus behavior on window open and close.
ok marco
2012-06-06 00:36:49 +08:00
Reginald Kennedy
b7d49e02ee Fix input focus not being set in max_stack mode on new mapped windows.
ok marco
2012-06-06 00:04:14 +08:00
Reginald Kennedy
27902d3ddd Fix missing charset warnings with a less-constrained fallback font entry. 2012-05-26 18:32:08 +08:00
David Hill
325fce8801 convert from deprecated XKeycodeToKeysym to XkbKeycodeToKeysym 2012-05-16 00:22:59 -04:00
Reginald Kennedy
4501b122e6 Fix segfault caused by workspaces above 10 not being initialized. 2012-04-20 14:18:21 +08:00
Reginald Kennedy
b8de26993f Increase workspace hard limit to 22.
Add new keybindings for workspaces 11 through 22.
Defaults for ws_n and mvws_n are NOD+(F1-F12) and MOD+Shift+(F1-F12),
respectively.

Add a new configuration option 'workspace_limit' to make it possible for
the user to adjust the number of available workspaces.  Default is 10.

ok marco
2012-04-08 06:56:13 +08:00
Marco Peereboom
f7f28f5248 fix a real issue of an uninitialized variable, found by clang and we are now clang clean 2012-02-17 10:57:29 -06:00