Commit Graph

166 Commits (48fd6416c667bc7f5e7e48271d7fb3e24f8b6a7f)

Author SHA1 Message Date
Fernando Tarlá Cardoso Lemos c0563af3e2 Bring back some more EWMH support. 2011-03-14 17:11:33 +01:00
Fernando Tarlá Cardoso Lemos b4e3dfd76b Add the "created" parameter to workspace_get.
If created is not NULL, *created is set to whether or not the
workspace has been just created.
2011-03-14 17:07:53 +01:00
Fernando Tarlá Cardoso Lemos 269d360f30 Some assertions to make the static analyzer happy.
Assertions give hints to the static analyzer about code paths
where we make assumptions. Used the Clang Static Analyzer.
2011-02-28 16:49:03 +01:00
Michael Stapelberg 9719b21243 refactor some places to use output_get_content() 2011-02-21 01:55:36 +01:00
Michael Stapelberg 7f89c71689 Implement dock mode, update testsuite
Currently, dock clients are only possible at the top.
2011-02-20 23:43:03 +01:00
Michael Stapelberg 834f4d7bc2 add missing function documentation 2011-02-14 23:17:30 +01:00
Michael Stapelberg 26a416e016 refactor tree_move() into src/move.c, change config (!), change testcase
Due to lots of cases which were added and added to tree_move(), the function
was not really easy to understand. For this refactoring, I wrote tree_move()
from scratch, thinking about (hopefully) all cases. The testsuite still passes.

The move command also has different parameters now. Instead of the hard to
understand 'before v' stuff, we use 'move [left|right|up|down]'.
2011-02-14 23:05:20 +01:00
Michael Stapelberg 3383437705 refactor some places to use con_descend_focused instead of duplicating code 2011-01-27 16:09:14 +01:00
Michael Stapelberg a6f0dcd250 Fix switching to a workspace on a different output 2011-01-08 12:03:03 +01:00
Michael Stapelberg 0ea15ed962 fix a problem with workspace switching when the focus got to the target workspace
This could explain some strange effects where workspaces would just stay blank.
We’ll see.
2011-01-08 00:38:10 +01:00
Michael Stapelberg 2312187439 RandR: use the next unused workspace instead of fixed counting 2011-01-05 00:26:23 +01:00
Michael Stapelberg 80ecd157f6 fix memleak: free con->name before overwriting it 2011-01-04 22:38:33 +01:00
Michael Stapelberg 1a40641462 workspace.{c,h}: remove obsolete code 2010-11-29 22:32:19 +01:00
Michael Stapelberg 3bab222aa7 Bugfix: Re-attach windows in correct order when switching layout (Thanks fernandotcl) 2010-11-28 01:51:16 +01:00
Michael Stapelberg 1de97a1f1f correctly sort numbered workspaces (+testcase)
Numbered workspaces (workspaces with a name containing only digits) will be
inserted in the correct order now. Named workspaces are always sorted after
numbered workspaces and in the order of creation.
2010-11-21 23:35:49 +01:00
Fernando Tarlá Cardoso Lemos ae22fe065f Send change:empty too. 2010-11-21 21:36:33 +01:00
Fernando Tarlá Cardoso Lemos 767dcea7ba Send the workspace focus change event. 2010-11-21 21:36:28 +01:00
Michael Stapelberg 39fa1d724a bugfix: don’t treat workspace as empty if they only have floating windows (+testcase) 2010-11-20 20:16:15 +01:00
Michael Stapelberg d760a1c7b2 Bugfix: don’t kill parent when currently in tree_close() for a child of this parent 2010-11-14 20:14:09 +01:00
Michael Stapelberg 945632ddcb Implement setting the WM_NAME of i3 container windows for debugging 2010-11-14 16:41:46 +01:00
Michael Stapelberg c6c084faa5 don’t close workspaces which are still visible (multi-monitor) 2010-11-12 17:34:13 +01:00
Michael Stapelberg 0925e8b7dc Implement sticky windows
The implementation works like this:
Containers can have a 'sticky-group' attribute. Imagine two different
containers (on two different workspaces) which have the same sticky-group.
Now you open a window in the first container. When you switch to the
other workspace, the window will be re-assigned to the other container.

An obvious problem which is not covered with the code at the moment is
having two containers with the same sticky-group visible at the same time.
2010-09-01 18:11:01 +02:00
Michael Stapelberg 32be3af109 Re-implement support for the urgency hint, extend t/13-urgent.t
The actual rendering will follow
2010-06-02 17:55:10 +02:00
Michael Stapelberg b467242d69 Make splitting a container which was already split a noop 2010-06-01 22:45:18 +02:00
Michael Stapelberg e67c712f31 cleanup: introduce CT_WORKSPACE as type to avoid having to check parent->type 2010-05-31 00:11:11 +02:00
Michael Stapelberg 2d52ecf071 Add parameter to reparent windows instead of killing them when closing a container
Necessary because when windows are unmapped, they are not necessary to
be killed (an application can unmap it temporarily).
2010-05-15 00:16:59 +02:00
Michael Stapelberg 65e9036837 bugfix: don’t clean up workspace when switching to the same workspace 2010-05-09 23:20:49 +02:00
Michael Stapelberg 138a790cd0 clean up old workspace when switching (makes test 2 of t/16-*.t pass) 2010-04-16 20:59:21 +02:00
Michael Stapelberg 4206db2839 workspace.c: update header, reformat 2010-04-13 16:43:08 +02:00
Michael Stapelberg 6aa6fa0af0 correctly focus workspaces 2010-04-13 16:41:23 +02:00
Michael Stapelberg c145f7e529 first step of the big refactoring ("tree" branch).
From here on, we can track changes. It made no sense to put the
development up to this point into git.
2010-04-13 13:17:39 +02:00
Michael Stapelberg 6fd56757f0 Bugfix: Assign all workspace to new outputs as new outputs get available (Thanks badboy) 2010-03-26 00:13:28 +01:00
Michael Stapelberg 0f7ac09c7b Bugfix: Don’t unmap windows when current workspace gets reassigned
Steps to reproduce were:
1) xrandr --output VGA1 --auto --left-of LVDS1
2) open a terminal on VGA1
3) xrandr --output VGA1 --off
2010-03-24 16:06:21 +01:00
Michael Stapelberg 77efb29d9f ipc: send a workspace event when the urgency flag changes 2010-03-20 03:09:42 +01:00
Michael Stapelberg 2df1fb8ac8 Implement disabling the internal workspace bar 2010-03-14 12:59:45 +01:00
Michael Stapelberg 3db4890683 ipc: implement events, cleanup the code a bit 2010-03-12 21:05:05 +01:00
Michael Stapelberg 5f370b494c bugfix: don’t remap stack windows errnously when changing workspaces
This fixes ticket #193 (long-standing rendering bug).
2010-03-12 00:41:40 +01:00
Michael Stapelberg 9a9ba1b859 ipc: implement GET_WORKSPACES message type
This is the foundation to use dzen2 or similar as a complete
replacement for the internal workspaces bar.

A testcase is included, more documentation about the IPC interface
will follow.
2010-03-11 15:58:39 +01:00
Michael Stapelberg 4dfe61c2d4 Fixes for the last commit: check outputs instead of workspaces, correctly reset state when switching workspaces, little style fixes 2010-03-08 11:15:31 +01:00
Axel Wagner 9c77b0f9a1 Implement screen-spanning fullscreen-mode (command: 'fg')
This closes ticket #188
2010-03-08 11:15:31 +01:00
Michael Stapelberg 8d648b4e37 Update function names, variable names and documentation for the RandR changes 2010-03-05 16:18:41 +01:00
Michael Stapelberg 8b192ac7ed Bugfix: Correctly hide/show workspaces when enabling new outputs, correctly handle focus (Thanks Merovius) 2010-03-05 15:22:12 +01:00
Michael Stapelberg 718d62a3cd Bugfix: Fix clone mode with new RandR code (Thanks Merovius) 2010-03-05 14:32:48 +01:00
Michael Stapelberg d73f1748db Remove superfluous definitions (Thanks Merovius) 2010-03-05 01:59:52 +01:00
Michael Stapelberg aae824b1f3 Change workspace assignments to use the RandR output name instead of <screen> 2010-03-02 13:35:43 +01:00
Michael Stapelberg 818e02ef35 huge change: implement RandR instead of Xinerama
Thanks to Merovius for doing a proof of concept on this one and
being a driving force behind the idea.

Using RandR instead of Xinerama means that we are now able to use
the full potential of the modern way of configuring screens. That
means, i3 now has an idea of the outputs your graphic driver
provides, which allowed us to get rid of the ugly way of detecting
changes in the screen configuration which we used before. Now, your
workspaces should not be confused when changing output modes anymore.

Also, instead of having ugly heuristics to assign your workspaces
to (the screen at position X or the second screen in the list of
screens) you will be able to just specify an output name.

As this change basically touches everything, you should be prepared
for bugs. Please test and report them!
2010-03-02 12:47:21 +01:00
Michael Stapelberg 75aac5bc02 ewmh: implement support for _NET_WORKAREA (rdesktop can use that)
Please note that rdesktop’s -g workarea option will not work on
64-bit systems at the moment because of a bug in rdesktop (see the
rdesktop-devel mailing list).
2009-12-31 17:48:41 +01:00
Michael Stapelberg e900a8d23d xinerama: correctly put windows which are assigned to a specific screen on that screen when it becomes available (Thanks badboy) 2009-12-21 22:30:08 +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 52945486fd Bugfix: Also fix horizontal resizing
The same problem as in the commit before this one was present. Additionally,
the dock_clients and internal bar were not taken into account everywhere.
2009-11-22 14:32:40 +01:00
Michael Stapelberg c4df9f1d95 Bugfix: Correctly initialize workspaces when initializing > 1 workspace (Thanks Mirko) 2009-09-29 22:25:08 +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 9ec6ea61de Bugfix: Don’t crash when changing workspace when there is more than one column 2009-09-29 12:21:07 +02:00
Michael Stapelberg d230b2bb1a Bugfix: Create new workspace when there are no free existing ones to assign (Thanks msi)
As the workspaces are now created dynamically, we cannot rely on
the workspaces to be there when we need them without creating them.
On the other hand, this eliminates the case that there are no workspaces
to assign to a new screen, because now we can just create one.
2009-09-28 18:02:11 +02:00
Michael Stapelberg e101940c5e Implement options to change the default mode of containers
The following new directives have been implemented for the configuration
file:

	new_container <default|stacking|tabbed>
	new_container stack-limit <cols|rows> <value>

Note that they require using the new lexer/parser, which you can
do by passing -l to i3 when starting.
2009-09-27 23:08:27 +02:00
Michael Stapelberg 226664d288 Remove debug message 2009-09-27 23:04:41 +02:00
Michael Stapelberg 9b1699f4c4 Add documentation for workspace_get() 2009-09-27 15:20:47 +02:00
Michael Stapelberg f38809288a Make number of workspaces dynamic (no longer limited by 10)
Warning: This is not yet thoroughly tested, so be prepared to
encounter some segfaults. Please enable logging and coredumps,
so we can fix bugs quickly.
2009-09-27 14:00:54 +02:00
Michael Stapelberg 6f2638f526 Bugfix: Correctly warp pointer *after* rendering the layout
This is necessary because otherwise the window into which the
pointer is warped still is at its old position, so that the pointer
will effectively be warped onto the wrong screen in case of moving
a window to another screen.
2009-09-12 18:46:52 +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 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 6192975a04 Bugfix: Don’t crash when the font is specified after the workspace names in configfile (Thanks xiaodong) 2009-08-07 15:48:13 +02:00
Michael Stapelberg 7cfe520755 Bugfix: Don’t hide assigned clients to inactive but visible workspaces (Thanks xeen) 2009-08-02 22:31:52 +02:00
Michael Stapelberg a753684ac5 cache text_width for named workspaces, fix memory leak 2009-08-02 21:32:35 +02:00
Michael Stapelberg e6198ad6c8 Some little fixes for bapt’s patch, use predict_text_width, support UTF8, pre-render workspace names 2009-07-28 13:55:09 +02:00