Commit Graph

2152 Commits (29a832a160a839fe1b1199c57b3078bc323eacaf)

Author SHA1 Message Date
Michael Stapelberg 073ecdd711 Revert "don’t fix coordinates/change focus/warp when source_output was scratchpad"
This reverts commit 9480801927.

This causes focus issues.
2015-01-23 17:11:05 +01:00
Michael Stapelberg 9480801927 don’t fix coordinates/change focus/warp when source_output was scratchpad 2015-01-23 17:07:31 +01:00
Michael Stapelberg 3b4ae812e3 Merge branch 'master' into next
Conflicts:
	src/render.c
2015-01-17 18:20:43 +01:00
Michael Stapelberg 8b96bb0298 Bugfix: render floating windows during global fullscreen (Thanks dmurph, Mats)
fixes #1393
2015-01-17 18:19:15 +01:00
Tony Crisci 69dd8ce398 Fix start_application() doc about which shell is used
Since this commit:

f691a55923

the shell that is used is the system's bourne shell (/bin/sh) and the
env variable SHELL is not considered.

No logic changes.
2014-12-22 09:48:03 +01:00
Tony Crisci 823b46a544 Include workspace con in workspace event
Send the affected workspace in the "current" property for each workspace
event for any type of workspace event that affects a particular
workspace.

fixes #1411
2014-12-22 09:47:31 +01:00
Mats e59a76e456 Extend the fullscreen command
Rather than just toggling the fullscreen modes, allow to set them
directly with:

    fullscreen enable|toggle [global]
    fullscreen disable

For compatibility, retain the previous command and its toggling behavior:

    fullscreen [global]

fixes #1120
2014-12-10 20:42:52 +01:00
Mats dc351fb291 Prevent workspace change during global fullscreen
While in global fullscreen, the workspace could be changed leaving the
fullscreen container still visible on top but losing its focus.
2014-12-10 20:24:32 +01:00
cornerman 58c65a64fe add deco_rect property to con in ipc response 2014-11-29 18:19:39 +01:00
Michael Stapelberg 105db325dc Revert "Bugfix: Set input focus with last timestamp"
This reverts commit 9cee8dac5e.

fixes #1383
2014-11-23 00:36:09 +01:00
Michael Stapelberg ef9b081a3e Bugfix: check if values are non-NULL before copying (Thanks xeen)
fixes #1397
2014-11-18 08:27:53 +01:00
Tony Crisci 8d031bfbf8 Handle _NET_CLOSE_WINDOW client message requests
> Pagers wanting to close a window MUST send a _NET_CLOSE_WINDOW client
> message request to the root window.

We interpret this message as a request to close the con for the given
window.

See: http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#idm140200472668896

fixes #1396
2014-11-17 09:08:42 +01:00
Tony Crisci bb1f857b00 bugfix: copy binding before run
Copy the binding struct before running it and use this copy to emit the
binding event.

This fixes a crash when the command `reload` is used in a binding when
the binding event is emitted.
2014-11-16 23:36:27 +01:00
Tony Crisci 6ba7728136 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.

fixes #1379
2014-10-05 21:06:11 +02:00
Tony Crisci fbaf084426 Implement the ipc 'binding' event
The binding event will be triggered when a binding is run as a result of
some a user action. The binding event has the following properties:

change: (str) Currently this will only be "run" but may be expanded in
the future. Included for consistency with other events.

binding: (map) the serialized binding

The "binding" member will have these properties:

input_type: (str) either "keyboard" or "mouse"

input_code: (int) the xcb keycode of the keyboard binding if it was
provided or the mouse button if it is a mouse binding.

symbol: (str) the string representation of the input code

command: (str) the bound command

mods: (list of str) a list of the modifiers that were pressed as string
symbols

fixes #1210
2014-10-03 09:35:37 +02:00
Michael Stapelberg ea2552e852 Bugfix: use the command parser to properly extract workspace names
fixes #1377
2014-10-01 22:50:48 +02:00
Mats 7fe55090ec Don't draw borders wider than actual width
Rectangles passed to function xcb_poly_fill_rectangle are of type
xcb_rectangle_t and defined as:

    struct xcb_rectangle_t {
        int16_t  x;
        int16_t  y;
        uint16_t width;
        uint16_t height;
    }

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.
2014-10-01 22:29:43 +02:00
Tony Crisci fd8a2b0e51 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.

fixes #1368
2014-09-29 09:33:02 +02:00
Tony Crisci 8870edc2ca 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).
2014-09-21 02:55:11 +02:00
Michael Stapelberg 2fecf57699 Properly handle windows unsetting WM_TRANSIENT_FOR (Thanks Janus)
fixes #1351
2014-08-26 10:00:14 +02:00
aszlig 9058fc44e6 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).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-08-25 19:34:26 +02:00
Mats 5762456d89 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.
2014-08-11 09:49:49 +02:00
Michael Stapelberg 80db544e26 retina support: convert logical to physical pixels for default_border_width 2014-08-11 09:46:02 +02:00
Michael Stapelberg 89d3f93bec Merge branch 'master' into next 2014-08-08 20:16:40 +02:00
Michael Stapelberg fc88631534 Bugfix: don’t set focus in con_set_layout() on invisible workspaces
fixes #1338
2014-08-08 20:15:59 +02:00
Tony Crisci 034c82c0ac 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.

fixes #1322
2014-08-08 12:19:35 +02:00
Michael Stapelberg 67e00b3ab8 Merge branch 'master' into next 2014-07-23 09:48:26 +02:00
Tony Crisci 56c284af8e Bugfix: missed case for decoration rerender
Rerender the decoration when the container requires a pixmap and does
not have one.

fixes #1292
2014-07-23 09:48:20 +02:00
Michael Stapelberg 8e8afb2609 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.

fixes #1324
2014-07-20 23:49:08 +02:00
Michael Stapelberg 0d656dd05d don’t set names corresponding to debug colors, remove “sleep 1”.
The names were (mostly) internal to i3 anyway.

Hopefully this doesn’t break anything, but I really think this old
behavior needs to go now :).
2014-07-15 10:36:31 +02:00
Michael Stapelberg ee75821699 Merge branch 'master' into next 2014-07-15 10:28:51 +02:00
Michael Stapelberg 679a5de8cf Bugfix: properly restore workspace containers (Thanks vals)
fixes #1306
2014-07-15 10:27:42 +02:00
Tony Crisci 344f6be84a Handle WM_CLASS changes
http://tronche.com/gui/x/icccm/sec-4.html

> The WM_CLASS property (of type STRING without control characters)
> contains two consecutive null-terminated strings. These specify the
> Instance and Class names to be used by both the client and the window
> manager for looking up resources for the application or as identifying
> information.

i3 processes changes to WM_CLASS by updating the cached property and
running assignments. This allows the property to be used in criteria
selection.

fixes #1052
2014-07-15 09:18:40 +02:00
Tony Crisci 6bf7f8ef78 Always explicitly set border widths on manage
When a window becomes managed, explicitly set the current border width
to the default instead of relying on the default value of -1 to apply
the correct value.

Now that there are two different kinds of default borders, a border
width value of -1 is ambiguous. This can lead to different border widths
effectively being applied when the container changes from tiling to
floating, which is surprising behavior.

This commit extends behavior introduced in this commit to normal
borders:

7afe9cc78b

Explicitly set current border width when BS_PIXEL

fixes #1304
2014-07-11 00:33:20 +02:00
Tony Crisci 8e23dc881b i3bar: implement custom mouse wheel commands
Users can specify a command to run when a button was pressed on i3bar to
override the default behavior. Currently only the mouse wheel buttons
are supported. This is useful for disabling the scroll wheel action or
running scripts that implement custom behavior for these buttons.

Example:

bar {
    wheel_up_cmd nop
    wheel_down_cmd exec ~/.i3/scripts/custom_wheel_down
}

fixes #1104
2014-07-10 22:40:12 +02:00
Tony Crisci 0514be8d4b Handle EWMH requests to change current desktop
This request is used by pagers and bars to change the current
desktop likely as a result of some user action. We interpret this as
a request to focus the given workspace.

for more information see:

http://standards.freedesktop.org/wm-spec/latest/ar01s03.html#idm140251368135008
2014-07-10 22:39:42 +02:00
Tony Crisci 196e748e94 bugfix: default floating border regression
Fixes a bug where a normal floating default border is not applied when
the default tiling border is set to a pixel value.

This bug was introduced in this commit:

43b447855d

Consider motif border for floating geometry

Fixes a comment that claimed default floating border could override
motif hints, which was never the case.

fixes #1305
2014-07-10 22:32:27 +02:00
Tony Crisci 7381b50587 Make absolute floating move work with criteria
Make commands of type `move [window|container] [to] [absolute] position
<px> [px] <px> [px]` work with command selection criteria.

fixes #1301
2014-07-02 19:07:08 +02:00
Tony Crisci bb24db1986 Bugfix: _NET_SUPPORTED property fixes
Fix a typing mistake that may cause _NET_SUPPORTED root property to
become corrupted.

This bug was introduced in:

Implement EWMH number of desktops property

http://code.stapelberg.de/git/i3/commit/?h=next&id=b47f480728a6d053c117e4b99ee4c78d99ba6a71

Additionally adds one missing atom to _NET_SUPPORTED.

fixes #1298
2014-07-01 23:43:14 +02:00
Michael Stapelberg 0279401528 Merge branch 'master' into next 2014-06-28 13:05:40 +02:00
Michael Stapelberg 1f9057bc4b Revert "Disable render-time pointer warps if asked"
This reverts commit b109b1b20d.

Turns out the change in behavior was unexpected by a number of users, so
let’s revert it and make those users that want this behavior configure
it explicitly.

Sorry for the back-and-forth here.
2014-06-28 13:04:52 +02:00
Michael Stapelberg 2d28273cac Merge branch 'master' into next 2014-06-28 13:01:48 +02:00
Tony Crisci 7afe9cc78b Explicitly set current border width when BS_PIXEL
When a window becomes managed, if the config specifies a pixel border
style, explicitly set the current border width so it does not change
when the container changes from tiling to floating.

fixes #1266
2014-06-28 13:00:59 +02:00
Michael Stapelberg 01a2c5a3f1 Merge branch 'master' into next 2014-06-27 09:05:32 +02:00
Michael Stapelberg c159fc4197 Bugfix: create the directory for storing the restart state (Thanks hjem)
fixes #1303
2014-06-27 09:04:51 +02:00
Michael Stapelberg 80007828c3 cleanup: src/i3.mk: add XKB_COMMON_CFLAGS when compiling i3 2014-06-25 17:58:16 +02:00
Michael Stapelberg b91cd347e4 Merge branch 'master' into next 2014-06-24 09:57:05 +02:00
Michael Stapelberg 5c30c6ca80 add log messages for the detected DPI
Currently, the DPI is only logged when pango fonts are used, which is
often not the case when people report problems with the DPI detection.
2014-06-24 09:56:31 +02:00
Tony Crisci 136b3e345b Handle WM_CHANGE_STATE requests for iconic state
http://tronche.com/gui/x/icccm/sec-4.html#s-4.1.4

 > IconicState - The client's top-level window is iconic (whatever that
 > means for this window manager). The client can assume that its
 > top-level window is not viewable, its icon_window (if any) will be
 > viewable and, failing that, its icon_pixmap (if any) or its
 > WM_ICON_NAME will be displayed.

For these requests, we just close the window.

fixes #1279
2014-06-24 09:39:12 +02:00
Tony Crisci ca5137eeba remove unneeded render on map request
manage_window() will call tree_render() when appropriate, so pushing
changes to X here is not needed.
2014-06-24 09:32:14 +02:00