shdown [Sat, 21 Mar 2015 16:41:38 +0000 (19:41 +0300)]
i3bar: fix click events for workspace buttons with long statusline
This combines detecting of current and clicked workspaces into one cycle
and then checks if the x coordinate of the clicked point is greater than
the workspace buttons width.
Ingo Bürk [Sat, 21 Mar 2015 16:10:20 +0000 (17:10 +0100)]
Allow referencing the workspace by number.
This allows "--workspace 3" for numbered workspaces, e.g., if the name is actually
"3:foo". This introduces the same functionality the IPC already offers in many places.
shdown [Sat, 21 Mar 2015 16:08:40 +0000 (19:08 +0300)]
i3bar: cut long statuslines from the left
This draws the statusline after drawing (and calculating width of) the
workspace buttons and fixes calculation of its maximum visible width.
This (hopefully) guarantees that these two will never overlap.
shdown [Sat, 21 Mar 2015 16:00:11 +0000 (19:00 +0300)]
i3bar: fix clearing of the statusline pixmap
This fixes the bug when statusline pixmap wasn't entirely cleared that
caused random artifacts to appear when the statusline width is greater
than the screen width.
Ingo Bürk [Wed, 18 Mar 2015 20:37:37 +0000 (21:37 +0100)]
Make the --workspace optional by defaulting to the focused workspace.
If no option is given, i3-save-tree should default to the currently focused workspace.
Specifying both --workspace and --output will still yield an error.
Tony Crisci [Mon, 16 Mar 2015 03:30:00 +0000 (23:30 -0400)]
bugfix: workspace rename focus mismatch
When renaming a workspace on another output that moves the workspace to
the current output, the renamed workspace would be shown even though it
does not contain the focused container.
Explicitly show the focused workspace after the move. This is necessary
because `workspace_move_to_output` will show the workspace that is
moved.
shdown [Sun, 15 Mar 2015 07:32:17 +0000 (10:32 +0300)]
Fix incorrect y-offset for text in i3bar (2)
014aa7ff7441a8a2bb53bd0956aff61faaf6f37f fixed incorrect align of small
symbols, but also introduced a problem with texts with mixed large and
normal symbols. Fix it by centering the text vertically only if its
height is smaller that the saved font height.
Fixes #1543.
Before this commit, placeholder windows had any matches that were
defined in the JSON file, _followed_ by an i3-internal match that
ensures the placeholder X11 window gets swallowed into the placeholder
i3 container.
The problem was that the first successful match was deleted, and if
users specified a criterion (title=IPython) that matched the placeholder
window itself (name=IPython), then that match is deleted and the
i3-internal match is kept. This results in the actual window the user
wants to match not being swallowed, and the placeholder window not
displaying any criteria.
Michael Tipton [Tue, 3 Mar 2015 07:44:28 +0000 (23:44 -0800)]
Fix scrolling in window decoration with hidden cursor.
If the mouse cursor is hidden (by unclutter, for example), then scrolling
in the window decoration creates an event with a child
(i.e. event->child != XCB_NONE). This causes route_click() to be called
with dest=CLICK_INSIDE, which prevents scrolling through a stacked layout.
To fix this, check if a click is in the window decoration _before_
checking if the event has a child.
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.
When using Pango to draw text in i3bar, the y-offset of the text is
incorrectly calculated in case all characters in the string to draw are
smaller than the cached font height. Fixes #1494.
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.