Steven McDonald [Sun, 1 Mar 2015 07:30:45 +0000 (18:30 +1100)]
Fix key bindings on big-endian platforms
input_code is a uint16_t, but xcb_keycode_t is uint8_t, meaning that
only the first byte of input_code is inspected by memmem. On
little-endian platforms, this code would have worked by accident, since
the first byte of input_code represents the 8 least significant bits.
However, on big-endian platforms the first byte is the 8 most
significant bits, which means memmem is scanning bind->translated_to
for the wrong keycode (probably 0).
In order to work correctly on big-endian and little-endian platforms,
simply typecast input_code to an xcb_keycode_t and pass that to memmem.
The observed behaviour associated with this bug is that key bindings
don't work at all. This patch has been tested on an iBook G4 running
OpenBSD -current, and key bindings work properly with this fix applied.
Tony Crisci [Sat, 21 Feb 2015 22:34:26 +0000 (17:34 -0500)]
Config: use default system monospace
Use the default monospace font for the system in the default config.
This should be a bit more portable for systems that do not have the
recommended font installed.
Tony Crisci [Thu, 12 Feb 2015 19:45:34 +0000 (14:45 -0500)]
i3bar: use Pango markup
Parse text within workspace buttons and the i3bar statusline as Pango
markup. This lets people specify things like font weight, text color,
background color, font size, and font family in the text of i3bar.
Ingo Bürk [Wed, 11 Feb 2015 19:34:43 +0000 (20:34 +0100)]
Make click events on status blocks work if 'workspace_buttons no' is set.
1. Always subscribe to click events for i3bar.
2. Exit the click event handler if no current workspace was found only after clicks on status blocks have been handled.
Lukas K [Tue, 27 Jan 2015 21:58:48 +0000 (22:58 +0100)]
Support _NET_WM_MOVERESIZE
Add support for the _NET_WM_MOVERESIZE client message. This message
enables clients to initiate window moving or resizing. Toolkits like
Gtk3 use this message when the user drags a client-side decorated window
by its title bar. When Gtk detects that the window manager does not
support this client message, it uses a slow fallback implementation.
Tony Crisci [Tue, 10 Feb 2015 19:26:22 +0000 (14:26 -0500)]
Update bar font config on reload
Dynamically update the font when the `reload` command is called by
reloading the font with `xcb_init_late` and adjusting the size of the
bar by updating the output dimensions with a call to the ipc.
Tony Crisci [Fri, 30 Jan 2015 01:52:52 +0000 (20:52 -0500)]
Add mouse binding pointer position configuration
Add the `--whole-window` switch for mouse bindings. This switch controls
what part of the container the pointer must be over to trigger a mouse
binding. The default is to only trigger mouse bindings over the
titlebars. With this switch, a mouse binding will be triggered over the
main part of the window as well.
This is a breaking change to the previous behavior, which would trigger
a mouse binding with a modifier over any part of the window.
merge the formerly debian-specific x-terminal-emulator patch
I think instead of maintaining distribution-specific patches forever,
it’s a bit easier to have them applied upstream, especially since they
don’t break anything.
Tony Crisci [Sun, 5 Oct 2014 18:50:30 +0000 (14:50 -0400)]
Bugfix: check symbol for NULL in binding json dump
When dumping a binding, as is done during the binding event, check
symbol for NULL. If it is, dump json null. This prevents a crash when
running a binding that was configured with bindcode.
Tony Crisci [Wed, 1 Oct 2014 23:26:52 +0000 (19:26 -0400)]
Testcases: Use Xephyr instead of XDummy
Replace the XDummy script with Xephyr. This is done because of some
changes in the Xorg server that make XDummy difficult to use.
Rename library internal variables and function names to replace "xdummy"
with "xserver" to show this change (except for renaming the package and
lib file for better git history).
Rename the switch `--keep-xdummy-output` to `--keep-xserver-output`.
This switch should now be rarely used because Xephyr requires less set
up.
Replace "xdummy" with "xephyr" in comments and utility help
information. Update docs to show the new dependency.
The rectangles for the right and lower border had a width and height,
respectively, greater than the actual border width.
Furthermore, offset the bottom border to not overlap with the right one
and, for the top border, use r->width instead of con->rect.width as with
the other borders.
Tony Crisci [Mon, 22 Sep 2014 05:09:25 +0000 (01:09 -0400)]
IPC: set ws reply "num" member to -1 when named
When a named workspace (i.e., a workspace that has a name that does not
begin with text that can be parsed as an integer greater than or equal
to zero) is represented by the ipc as a workspace json object such as
can be queried with `i3-msg -t get_workspaces`, set the num property to
-1 instead of json null.
This is for convenience of ipc consumers using type-constrained
languages such as C which have difficulty cleanly expressing nullable
integers.
Tony Crisci [Sat, 20 Sep 2014 21:21:08 +0000 (17:21 -0400)]
Do not resend focus on click
Do not set focused_id to XCB_NONE in route click to force resend focus,
in some cases to an already focused window.
Sending focus again on click is not necessary and may cause problems
with certain wine or mono apps. Resending focus makes combo boxes not
work in Office 2010.
This effectively reverts commit 250577da, so in case this commit causes
any problems with Eclipse to resurface, we’ll revert this commit in
favor of 250577da (the Eclipse-related bug fix).
aszlig [Sat, 2 Aug 2014 05:01:15 +0000 (07:01 +0200)]
Allow to validate the config file without X.
We're going to call parse_configuration() very early if -C is given on
the command line. Instead of the previous "only_check_config", which has
been a global variable, we now simply pass use_nagbar as false if we're
just validating.
This causes the whole parsing to run without X and of course without
starting nagbar and displaying the errors to standard out/error instead.
The return code of parse_configuration() is now a boolean which
represents whether an error occured during parsing and the programs exit
code is returned accordingly.
Although the config parser still has a lot of side-effects, we now can
parse without the need to have an XCB connection. A nicer implementation
would be to just set the new font and load it just after we're done
parsing, but to ensure we don't break functionality we just load a dummy
FONT_TYPE_NONE if XCB isn't available. The main reason for going this
route is that it's a bit difficult to test fonts in a distribution
agnostic way without bundling fonts with i3 (or Xdummy to be more
exact).
Mats [Fri, 1 Aug 2014 18:07:04 +0000 (20:07 +0200)]
Align lower line of bar decoration to border width
In normal border style, two horizontal lines are drawn to outline the
bar decoration. The lower line leaves a gap to the left and right to
align with the border. This gap was hardcoded to 2 pixels. Now it
matches the current border width, if any.
In stacked layout, only the bottommost bar is aligned. In tabbed layout,
no gaps are left in order to close the outline and make the notion of a
tab more clear.
Tony Crisci [Mon, 28 Jul 2014 02:32:50 +0000 (22:32 -0400)]
Raise floating windows on `focus [direction]`
Raise a window when cycling focus between floating windows with `focus
[direction]` command so that newly focused windows are rendered on top
of other windows.
This is done by placing the window last in the floating nodes of the
parent and reordering the stack so the relative order is preserved.
Bugfix: add a sync call to i3bar to confirm reparents before exiting
Without this call, sometimes the tray icon windows are reparented into
i3’s container around the i3bar window, i.e. into the next remaining
window in the window hierarchy. Since i3 then closes that container
(since the i3bar window itself was closed), the tray window will also
get closed. In general, this weird interaction (getting reparented and
then closed) is not well received by tray icon providers :).
Remove TODO for cycling through the floating z-index.
I think this is not a good feature to have. It shouldn’t be necessary
for a tiling window manager that explicitly discourages the use of
floating windows.