Commit Graph

59 Commits

Author SHA1 Message Date
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