Commit Graph

4060 Commits

Author SHA1 Message Date
haptix@web.de
4937788e8d Fix wrong placement of i3bar when connecting/disconnecting outputs
When connecting or disconnecting an output, i3bar reconfigures its
windows. This also included an unmapping of the bars, and a remapping of
all docked bars. Thus, the bars were misplaced when a monitor was
disconnected.

This commit assures that the remapping of the bars only takes place,
when the mode has actually changed. This patch also takes care of an
inconsistency when pressing the bar_modifier while switching the mode.
Also, the xkbDisplay is now closed correctly, when deregestering the xkb
keyevents.
2013-05-30 12:18:27 +02:00
Michael Stapelberg
8353a387c9 Merge branch 'master' into next 2013-05-28 19:56:57 +02:00
Michael Stapelberg
aa8d9214a6 Merge branch 'fix-unmap' 2013-05-28 19:56:57 +02:00
Michael Stapelberg
62ef7834b0 Bugfix: Unmap windows before reparenting them to the root window (fixes Mathematica) (Thanks psychon)
Some apps such as Mathematica send a synthetic UnmapNotify event without
properly unmapping their window first. This change makes sure that
happens and fixes an annoying bug with Mathematica where some unmanaged
windows would stay around, but you couldn’t do anything with them.

Thanks to psychon (current awesome maintainer) for helping with the
diagnosis!

fixes #787
2013-05-28 19:52:01 +02:00
Michael Stapelberg
e979f16ddb manage.c: use xcb_discard_reply() instead of free()ing the reply (Thanks psychon) 2013-05-28 18:57:26 +02:00
haptix@web.de
e3913093b6 introduced i3 command for changing the hidden state and the mode of i3bar
The hidden_state and mode of each i3bar instance can now be controlled from within i3.
Therefore, two new i3 command were introduced:
    _
    bar hidden_state show|hide|toggle [<bar_id>]

    show: always show the bar
    hide: normal hide mode
    toggle: toggle between show and hide (individually for each bar)
    _
    bar mode dock|hide|invisible|toggle [<bar_id>]

    hide,dock: like before
    invisible: always keep the bar hidden
    toggle: toggle between dock and hide (individually for each bar)

This patch introduces a hidden_state ("hidden_state hide|show") in the
barconfig, which indicates the current hidden_state of each i3bar
instance. It only affects the bar when in hide mode. Additionally, a new
invisible mode was introduced. In order to change the hidden_state or
mode of the bar from i3, a barconfig-update event was introduced, for
which a bar can subscribe and the bar then gets notified about the
currently set hidden_state and mode in its barconfig.

For convenience, an id field ("id <bar_id>") was added to the barconfig, where one can
set the desired id for the corresponding bar. If the id is not specified, i3 will
deterministically choose an id; otherwise, with the previous random approach for finding
a new id, which is actually not shared with i3bar, as it would determine its id on
startup, the event-subscription would be destroyed on reload. Still, this issue remains
when manually changing the bar_id in the config and then reloading.

fixes #833, #651
2013-05-25 23:00:36 +02:00
haptix@web.de
f0eba6d15c Fix problem when moving fullscreen window to scratchpad
When moving a fullscreen window to scratchpad with 'move scratchpad', the
focused window would stay fullscreen.

Also, when having a container in fullscreen mode and then focusing a child of
this container and moving it to scratchpad, it would enable fullscreen for
the child window.

This patch fixes both problems, so the scratchpad window is always floating.
2013-05-25 22:59:27 +02:00
Diego Ongaro
609496d13f Draw indicator border only for split layouts
In order to distinguish split layouts from tabbed/stacking layouts when
only one window is shown, do not draw the indicator border for tabbed or
stacking layouts.
2013-05-22 19:35:33 +02:00
Diego Ongaro
96575e14a0 Give layout enum a name: layout_t 2013-05-22 19:35:07 +02:00
Arun Persaud
55a338c919 i3-msg.man: updated man page to include all options
-s, -v, -q and -h options were not documented.
2013-05-21 19:46:09 +02:00
Thomas Adam
ed1d13b0a1 i3bar: Fix pixel offset calculation in dual-head
When running i3bar on a dual-head display with workspaces enabled in i3bar's
config, the second monitor wouldn't use a correct x position offset and
would draw its label too close to the screen's edge.  In comparison to the
first monitor, this is inconsistent because that starts with a pixel offset
of 1.
2013-05-20 15:09:15 +02:00
Diego Ongaro
dc522b630c contrib/gtk-tree-watch.pl: Remove bogus default socket path
The default i3 socket path was set to "/tmp/nestedcons". This isn't
going to work for most people.
2013-05-05 12:58:04 +02:00
Diego Ongaro
1b8e8822b9 contrib/dump-asy.pl: Display nicer double-quotes
The right way to do this in LaTeX is ``foo'', not "foo".
2013-05-05 12:56:22 +02:00
Diego Ongaro
22ca203b80 contrib/dump-asy.pl: Fix $ and & in window titles
These would produce asy/LaTeX parse errors before.
2013-05-05 12:55:54 +02:00
Michael Stapelberg
bdccf26f39 Merge branch 'fix-aspect' 2013-04-23 07:18:39 +02:00
Michael Stapelberg
0f6b5fe8da Merge branch 'master' into next 2013-04-23 07:18:39 +02:00
Clément Bœsch
b7da2dbcd8 render_con: fix height rounding in aspect ratio computation
With a 484x292 window and proportion of 488x294, new_height is
291.590164 after the loop, causing a rounding issue leading to a window
of 484x291.
2013-04-23 07:18:35 +02:00
Michael Stapelberg
423f2e264f Merge branch 'fix-resize' 2013-04-15 21:01:27 +02:00
Michael Stapelberg
06730f44e6 Merge branch 'master' into next 2013-04-15 21:01:27 +02:00
oblique
a93e1e5c59 Ensure that resize will take place even if pixel is smaller than size increments.
fixes #1011
2013-04-15 20:59:51 +02:00
Michael Stapelberg
412b15b6b8 Merge branch 'fix-tray-output' 2013-04-14 22:54:36 +02:00
Michael Stapelberg
8247f44e95 Merge branch 'master' into next 2013-04-14 22:54:36 +02:00
Michael Stapelberg
72c279bc39 Bugfix: fix crash when not having tray_output configured (Thanks Layus) 2013-04-14 22:54:15 +02:00
Michael Stapelberg
9a91eb83c2 Merge branch 'fix-ipc-fd' 2013-04-14 10:14:51 +02:00
Michael Stapelberg
70d28bc7af Merge branch 'master' into next 2013-04-14 10:14:51 +02:00
Michael Stapelberg
fa1b436fca Bugfix: mark IPC fd CLOEXEC (Thanks Layus)
Without this fix, children of i3bar would inherit the file descriptor of
the IPC connection to i3. Therefore, even if i3bar exits with SIGSEGV,
the connection to i3 stays open. Because nobody actually reads any
messages by i3, the buffer will fill up and i3 can’t deliver any more
messages, and thus busy-loops at that point.

fixes #995
2013-04-14 10:12:21 +02:00
haptix@web.de
90bfbac107 fix font display height in i3bar
Increase the drawing area height, in order to prevent the font from being cut off.

fixes #992
2013-04-13 19:49:06 +02:00
haptix@web.de
a9aad872ee unhide hidden i3bar when mode is active
This patch also handles unhiding of i3bar in case the i3bar modifier key is
pressed for activating a new binding mode.
2013-04-13 10:16:34 +02:00
Eric S. Raymond
adc16f0e90 Document fixes and workarounds for test failures. 2013-04-11 22:37:58 +02:00
Eric S. Raymond
d0fbc10aca Typo and usage fixes in documentation and comments. 2013-04-11 22:37:39 +02:00
haptix@web.de
921967c729 unhide hidden i3bar when mode is active
fixes #961
2013-04-11 22:35:54 +02:00
haptix@web.de
402c3db7ac restore i3bar compatibility with libyajl version 1
fixes #1004
2013-04-07 15:54:20 +02:00
Michael Stapelberg
0659a0d98c raise fullscreen windows on top of all other X11 windows
Note that this is ineffective for dunst’s notifications because dunst
re-raises them as soon as they get obscured. It does work for dzen2
however, which was the original use-case.

fixes #569
2013-04-07 15:38:00 +02:00
Michael Stapelberg
3f525eba41 docs/wsbar: update (we have i3bar now, i3-wsbar is just an example)
fixes #735
2013-04-07 10:24:38 +02:00
Michael Stapelberg
cd001a49f6 Merge branch 'fix-tab-width' 2013-04-07 10:00:42 +02:00
Michael Stapelberg
bb22e232ad Merge branch 'master' into next 2013-04-07 10:00:42 +02:00
Michael Stapelberg
9f353996fe tabbed: floor(), put extra pixels into the last tab (Thanks xeen)
This is the only sane way I can think of to deal with the problem that
the screen size may not be dividable by the amount of tabbed children
(e.g. 1280 / 41 = 31.219512…).

fixes #645
fixes #791
2013-04-07 10:00:28 +02:00
Michael Stapelberg
114d7bf262 docs/multi-monitor: nVidia ≥ 302.17 works just fine (Thanks HedgeMage) 2013-04-06 22:49:14 +02:00
Michael Stapelberg
4f72c5c5fc Merge branch 'fix-floating-size' 2013-04-02 23:59:48 +02:00
Michael Stapelberg
0b000b1464 Merge branch 'master' into next 2013-04-02 23:59:48 +02:00
Michael Stapelberg
0901720a24 Bugfix: fix floating window size with hide_edge_borders (+test)
fixes #998
2013-04-02 23:59:26 +02:00
haptix@web.de
2926ddb69f ipc: use correct workspace in workspace change event
fixes #990
2013-04-02 22:27:04 +02:00
haptix@web.de
43bf72fc5d add testcase for the workspace-focus ipc event 2013-04-02 22:27:04 +02:00
Michael Stapelberg
bfc2cbc69a t/201-config-parser: add test for quotes in comments 2013-04-02 22:27:04 +02:00
Eelis van der Weegen
7f5a18e093 Add 'line' as a configuration parsing primitive
…and use it for ignoring comment lines, so that quotes in them
doesn't cause problems anymore.
2013-04-02 22:26:29 +02:00
Michael Stapelberg
82b59788ac userguide: mention forgotten layout splitv/splith (Thanks Eelis) 2013-03-30 13:03:35 +01:00
Simon Elsbrock
6b0efac483 i3bar: fix usage description, make -b happen 2013-03-29 09:55:03 +01:00
Philippe Virouleau
0a3d42c21e Fix scratchpad_show
Test if window is in scratchpad
    Test if function is called without criteria
    Updated testcase
2013-03-27 21:51:13 +01:00
Yuxuan Shui
18148205b6 Don't dup2() the parent's stdout to child's stdin.
There're DLOG()s, seriously.
2013-03-24 09:55:46 +01:00
enkore
58e68940f6 Add click events to i3bar
If the statusline generator (i.e. i3status) specifies click_events:true
in the protocol header, i3bar will write a JSON array on it's stdin
notifying it if the user clicks on a block.

The exact protocol is documented in docs/i3bar-protocol.
2013-03-21 23:55:30 +01:00