Commit Graph

191 Commits (6f72970ece75a12913d2009e6f02946073772ab1)

Author SHA1 Message Date
Michael Stapelberg 4fcbb7980e work around clients setting 0xFFFF as resize increments
I am not sure if behaviour is specified for this case, but as the
workaround is not really a big deal, why bother…
2010-02-20 20:32:43 +01:00
Michael Stapelberg 0b6b8e8380 Bugfix: Use both parts of WM_CLASS (it contains instance and class) (Thanks fallen)
Actually, WM_CLASS contains two null-terminated strings, so we cannot
use asprintf() to get its value but rather use strdup() to get both
of them. Both values are compared when a client is matched against
a wm_class/title combination (for assignments for example).
2010-02-12 12:12:25 +01:00
Michael Stapelberg 88b9700cdb Invert logic for the last commit
This makes it more clear that the option is meant to be a special
case (it *disables* part of the focus handling). Also, when
initializing the config data structure with zeros, it will get
initialized with the right value.

Furthermore, the config file parser now also accepts various values
which represent "true", not only numbers.
2010-01-29 21:58:50 +01:00
Kim Silkebækken (lokaltog) 7f10970fc7 Added focus_follows_mouse config option 2010-01-29 21:58:50 +01:00
Michael Stapelberg 848d9c1b01 Make containers containing exactly one window behave like default containers
Starting from this commit, a borderless window will always be
borderless if it is the only window in a container. For example,
you can have Firefox borderless in a tabbed container and as soon
as the download manager or a viewer gets opened, the container
will be rendered like a normal tabbed container.

This solves the user-interface dilemma of borderless/1-px-border
windows inside stacked/tabbed containers, at least for this special
case. Thanks to Merovius for this suggestion.
2009-12-22 23:40:06 +01:00
Michael Stapelberg 6ef0d1fa79 Touch each log message and classify it as DLOG (debug), ELOG (error) or LOG (verbose) 2009-12-19 22:40:23 +01:00
Michael Stapelberg ddf3119552 Bugfix: Don’t resize client after base_height changes if client is in fullscreen mode 2009-12-08 20:52:19 +01:00
Michael Stapelberg 5329ed0158 Bugfix: Resize client after updating base_height/base_width (Thanks Merovius)
This fixes the problem that urxvt/xterm "lost" a line of space before
being resized the first time.
2009-11-23 09:42:38 +01:00
Michael Stapelberg d2a88f7089 Bugfix: Don’t ignore urgency flag when the client wants to clean it (Thanks Syntropy) 2009-11-23 08:35:40 +01:00
Michael Stapelberg 29464dc791 Bugfix: Don’t set the urgency flag if the window is currently active 2009-11-20 15:55:54 +01:00
Michael Stapelberg c5da7bd266 Bugfix: Fix resizing of floating windows in borderless/1-px-border mode (Thanks Grauwolf)
Calculations were wrong (they simply didn’t take into account that
there is more than one border style, the code was from before we
implemented that…). We cannot directly set child_rect to the coordinates
as resize_client takes rect and calculates the child_rect, so we need
the new lines of code for this bugfix in any case (rect needs to be
updated).
2009-11-18 22:53:17 +01:00
Michael Stapelberg 82c32616e1 Bugfix: Correctly clear the urgency hint if a window gets unmapped without clearing the hint 2009-11-18 20:20:54 +01:00
Michael Stapelberg c0c4dd2978 Disable XKB instead of quitting with an error (Thanks sur5r)
This is necessary for running i3 in Xvnc for example.
2009-11-13 00:30:42 +01:00
Michael Stapelberg 316f62dfda Fix rendering of 1-px-border windows which require background filling 2009-11-08 13:04:14 +01:00
Michael Stapelberg 80551834d2 Bugfix: Allow dock clients to reconfigure their height (Thanks Grauwolf) 2009-10-23 16:07:03 +02:00
Michael Stapelberg 04884ab8cd Bugfix: Fix NULL pointer dereference when reconfiguring screens
This did not happen all the time. It seems like you need to have a
container which is in stacking/tabbing mode on the screen which
is being reconfigured. (when doing xrandr --output VGA1 --off for
example)
2009-10-12 18:31:31 +02:00
Michael Stapelberg df58981b57 Bugfix: Correctly restore the focus to the root screen after unmapping the last client (Thanks Rasi)
Sometimes, it may happen that the focus is "nowhere" and thus the
user is stuck. This was often the case with opera, sometimes with
pcmanfm. See ticket #118.
2009-10-07 20:26:13 +02:00
Michael Stapelberg 2b70e05ee9 Refactor workspaces to be stored in a TAILQ instead of an array
This fixes many problems we were having with a dynamically growing
array because of the realloc (pointers inside the area which was
allocated were no longer valid as soon as the realloc moved the
memory to another address).

Again, this is a rather big change, so expect problems and enable
core-dumps.
2009-09-29 19:45:41 +02:00
Michael Stapelberg 8f67eba044 Implement modes. Modes allow you to use different keybindings and switch between them.
For example, you can create a mode which will let you resize windows
with some easy to use keys. So, instead of binding a combination
of your homerow and modifiers to resize, like this:

	bind Mod4+44 resize right +10
	bind Mod4+45 resize right -10
	...

You can instead define a new mode:

	mode "resize" {
		bind 44 resize right +10
		bind 45 resize right -10
		...
		bind 36 mode default
	}

	bindsym Mod4+r mode resize

So, if you press Mod4+r now, your keybindings will be set to the ones
defined in your resize mode above. You can then use your homerow
(without any other modifier) to resize the current column/row and
press enter to go back to the default mode when you are done.

Note that using this option requires you to enable the new lexer/parser
by passing the -l flag to i3 when starting.
2009-09-27 18:45:39 +02:00
Michael Stapelberg d9ca8e8d1a Move handler for clicking to its own file 2009-09-22 18:07:25 +02:00
Michael Stapelberg 775d3a0d91 Make gcc happy about some possibly uninitialized variables (Thanks badboy)
This warning only showed up with CFLAGS=-O2.
The variables in question could never be uninitialized because
they were definitely set, have a look at the code. But anyways,
less warnings is always a good thing ;-).
2009-09-15 16:58:10 +02:00
Michael Stapelberg ce40f79c47 Implement right mouse button + dragging to resize tiling clients aswell 2009-09-12 19:51:50 +02:00
Michael Stapelberg cef5778097 Bugfix: Fix clicking on stack windows in tabbed mode (Thanks Atsutane) 2009-09-10 21:05:29 +02:00
Michael Stapelberg ff1ae52e6b Fix compilation warning because of missing braces 2009-09-10 16:29:23 +02:00
Michael Stapelberg 9f02fb7a3a Bugfix: Don’t handle WM_HINTS if it is not set (Thanks mxf) 2009-09-10 16:27:50 +02:00
Michael Stapelberg 2ff2a6a315 Implement the urgency hint for windows/workspaces
Thanks to Mikael for bringing it to my mind. This change introduces
two new color classes, client.urgent and bar.urgent. By default,
urgent clients are drawn in red (colors by Atsutane).
2009-09-06 22:40:11 +02:00
Michael Stapelberg 39f002e0b1 Bugfix: Don’t call resize_client if the width/height increment properties did not change
This avoids an endless loop, preventing clients to go to fullscreen
2009-08-25 23:16:17 +02:00
Michael Stapelberg 55b1bf4582 Bugfix: Correctly use base_width/base_height and size increment hints, correctly send fake configure notify events 2009-08-23 21:49:38 +02:00
Michael Stapelberg d9d4d9fff1 Implement tabbing
Use command "T" to switch to tabbing
2009-08-22 09:07:23 +02:00
Michael Stapelberg c7ba95e79d Implement resizing floating clients with Mod1 + right mouse button 2009-08-22 07:49:28 +02:00
Michael Stapelberg 4b3ea4d524 Bugfix: Don’t crash when clients set an invalid leader hint 2009-08-19 10:56:42 +02:00
Michael Stapelberg 44d9111d65 More log cleanups 2009-08-11 15:23:58 +02:00
Michael Stapelberg 556f180290 Bugfix: Fix screen wrapping, cleanup some log messages
Before this fix, you could go upwards and select the screen which
was at the rightmost because it also was the one topmost (if all
screen’s top position is equal).
2009-08-11 15:02:30 +02:00
Michael Stapelberg dd134a74ef Implement support for width_inc and height_inc of size hints
This fixes the problem where you saw old window contents when resizing
a window (due to opening new windows or similar), especially in terminals.
2009-08-11 14:08:04 +02:00
Michael Stapelberg b9636ceeec Set WM_STATE_WITHDRAWN when unmapping, unmap windows when destroying (Thanks xeen)
Seems like java apps need it. Also, you probably want to use XToolkit,
when you have to work with java apps:

export AWT_TOOLKIT=XToolkit
2009-08-11 12:16:10 +02:00
Michael Stapelberg 47a798ac4a Implement assignments of workspaces to screens, big cleanup of workspace code
Please test this! Plug in screens, unplug them, use your video projector,
change resolutions, etc.

To use the assignments, use the following syntax:
workspace <number> [screen <screen>] [name]

Where screen can be one of:
<number> (It is not provided that these numbers stay constant, so use with care)
<x>x<y> (Coordinates where the screen starts, so 1280 will be fine to match the
	 screen right of the main screen if your main screen is 1280 pixels
	 width. However, 1281 will not match)
<x>
x<y>

Some examples follow:

 workspace 1 screen 0
 workspace 1 screen 1
 workspace 1 screen 1280x0
 workspace 2 screen 1280
 workspace 3 screen x0
 workspace 3 screen 1 www
 workspace 4 screen 0 mail
2009-08-08 19:51:51 +02:00
Michael Stapelberg 7cdaa1b277 Implement support for using key symbols in configuration file
Use "bindsym" instead of "bind". You have to use the names of keys
as in xmodmap. To get a list of currently bounud symbols, use
xmodmap -pke

Technical quirk: Xlib generated MappingNotify events upon
XkbMapNotify events (from XKB, as the name says). XCB does not yet
have support for XKB, thus we need to select and handle the event
by ourself. Hopefully, this will change in the future.
2009-08-07 15:35:12 +02:00
Michael Stapelberg 3bd724f08d Bugfix: Track the user’s pointer over the root window and update current workspace (Thanks xeen)
When not having any windows on the first workspace, switching to the
second workspace using your mouse was not registered by i3.
2009-08-06 00:59:48 +02:00
Michael Stapelberg 3114d6821d Add support for WM_CLIENT_LEADER, put floating windows mapping to (0x0) to center of leader/workspace 2009-08-05 00:39:55 +02:00
Michael Stapelberg af3972aa9f Bugfix: Recognize clicks as client clicks (opposed to border_clicks) when clients send them for their parent window
See comment, happened for example with xfontsel. You normally got
to see the resize bar (when having >1 column, of course).
2009-08-04 22:47:42 +02:00
Michael Stapelberg 4c373c2128 Fix clicking on workspaces in internal bar (with named workspaces) (Thanks bapt) 2009-08-04 22:27:01 +02:00
Michael Stapelberg 19abb63393 s/Mod1/floating_modifier (Thanks badboy) 2009-08-02 22:58:23 +02:00
Michael Stapelberg 91aeed0442 Resolve documentation FIXMEs, remove an unnecessary struct 2009-06-29 22:20:35 +02:00
Michael Stapelberg 0305c1dc0e Bugfix: Use ->workspace instead of ->container 2009-06-28 01:58:00 +02:00
Michael Stapelberg acf1eb0c92 Don’t allow floating clients to reconfigure themselves when in fullscreen (Thanks Volker) 2009-06-28 01:52:06 +02:00
Michael Stapelberg 28c4b045d6 Merge branch 'next' (3.β is stable now) 2009-06-26 13:27:06 +02:00
Michael Stapelberg 27a418f454 Bugfix: Correctly remove fullscreen floating clients when unmapping (Thanks Volker) 2009-06-26 04:15:21 +02:00
Michael Stapelberg aa2f20ce26 Bugfix: Correctly handle floating windows when unmapping, fix focus bug when moving 2009-06-25 13:31:58 +02:00
Michael Stapelberg 62c8d58d82 Implement the configuration option floating_modifier and document it 2009-06-24 20:31:00 +02:00
Michael Stapelberg 675d28dd54 Bugfix: Check screen for NULL, free client memory correctly (Thanks dirkson) 2009-06-24 19:22:09 +02:00