Commit Graph

126 Commits

Author SHA1 Message Date
Michael Stapelberg
3b7f4d428e Correctly restore focus after in-place restarts
Note: This change requires two in-place restarts when you are upgrading
in-place from an old version.

Fixes #611
2012-01-21 18:35:15 +00:00
Michael Stapelberg
fd8e1c98c9 Merge branch 'master' into next
Conflicts:
	src/handlers.c
2012-01-18 19:18:22 +00:00
Michael Stapelberg
2d14ced024 Bugfix: Respect WM_HINTS.input for WM_TAKE_FOCUS clients
This fixes problems with Qt apps (like Quassel) and apparently Eclipse since
the last commit.
2012-01-18 19:16:57 +00:00
Michael Stapelberg
019347b14c update comment in include/data.h 2011-12-30 11:23:15 +01:00
Michael Stapelberg
08986a1798 Implement scratchpad functionality (see userguide) 2011-12-21 23:15:32 +00:00
Fernando Tarlá Cardoso Lemos
340592a532 Invalidate cached pixmaps on reload and redraw.
After a reload, the drawing parameters for the decorations might
have changed, so we need to invalidate the cache and force a redraw
of the currently visible decorations. Also, don't leak the previous
font when reloading by freeing it before parsing the config.
2011-11-26 21:51:49 +00:00
Michael Stapelberg
561cf3719f little style fixes 2011-11-21 21:48:24 +00:00
Michael Stapelberg
bbfbd28dfa Add a --no-startup-id flag for exec (command), exec (config), exec_always (config) 2011-10-25 22:18:17 +01:00
Michael Stapelberg
726f2a1e5a normalize file headers across **/*.{h,c} 2011-10-25 21:19:38 +01:00
Michael Stapelberg
a58018cf66 Add libi3/load_font, use it everywhere
…except for i3bar, which needs slightly more information about the font
2011-10-23 22:37:11 +01:00
Michael Stapelberg
2ad4fbb34a startup: delete the startup sequence upon completion, make the timeout complete it 2011-10-10 15:54:18 +01:00
Michael Stapelberg
ae7dec2774 Move the includes after the include guard, no need to include these files more than once 2011-10-10 15:54:17 +01:00
Michael Stapelberg
499d89bdb0 Keep track of startup notifications in a TAILQ, save workspace 2011-10-10 15:54:17 +01:00
Michael Stapelberg
b3adaa2983 Implement the window_role criterion (checks WM_WINDOW_ROLE)
Closes: #446

This is handy for matching specific windows of a multi-window application, for
example only Pidgin’s buddy list window.
2011-09-18 16:05:10 +01:00
Michael Stapelberg
dc790cfa32 Bugfix: Correctly free old assignments when reloading
Fixes #516
2011-09-11 23:41:46 +01:00
Michael Stapelberg
2fc54aadf1 Implement support for PCRE regular expressions for all criteria (for_window, commands, assignments) 2011-09-10 23:53:11 +01:00
Michael Stapelberg
e97a7e34f7 Bugfix: Re-implement reconfiguring height of dock windows (+test) (Thanks thomasba) 2011-08-27 13:47:10 +02:00
Claudio Marforio
cc24a96e96 patch to allow exec_always in configure file
fixed indentation, updated docs
2011-07-12 18:23:14 +02:00
Michael Stapelberg
2c68c234ea Implement assignments for (named) workspaces, with '~' compatibility (floating) 2011-05-23 18:41:17 +02:00
Michael Stapelberg
5ae4620a24 Time Lord technology: for_window config directive to run arbitrary cmds
An example to set all XTerms floating:
    for_window [class="XTerm"] mode floating

To make all urxvts use a 1-pixel border:
    for_window [class="urxvt"] border 1pixel

A less useful, but rather funny example:
    for_window [title="x200: ~/work"] mode floating

The commands are not completely arbitrary. The commands above were tested,
others may need some fixing. Internally, windows are compared against your
criteria (class, title, …) when they are initially managed and whenever one of
the relevant values change. Then, the specified command is run *once* (per
window). It gets prefixed with a criteria to make it match only the specific
window that triggered it. So, if you configure "mode floating", i3 runs
something like '[id="8393923"] mode floating'.
2011-05-15 20:10:25 +02:00
Michael Stapelberg
3f45d3c447 re-implement assignments of workspace to specific outputs 2011-05-14 22:19:58 +02:00
Michael Stapelberg
167bdd26b7 Argument for 'kill' for killing a specific window (now default) or the whole client (+test)
Use 'kill window' to kill a specific window (for example only one specific
popup), use 'kill client' to kill the whole application (or X11 connection to
be specific).
2011-05-13 20:41:03 +02:00
Michael Stapelberg
3d1acd6c2f re-implement assigning windows to workspaces 2011-05-02 23:29:26 +02:00
Michael Stapelberg
3721bcb868 Bugfix: Ignore EnterNotifies generated by UnmapNotifies
Actually, commit 1c5adc6c35 commented out code
without ever fixing it. I think this was responsible for the 'workspace
switching sometimes does not work' bug. My observations:

Had it again today and analyzed a log of it. Looks like after unmapping the
windows on one workspace (in my case: chromium, eclipse, urxvt, focus on
eclipse) we get UnmapNotify events for chromium and eclipse, but then we get an
EnterNotify for the terminal (due to unmapping the other windows and therefore
mapping the terminal under the cursor), only afterwards the UnmapNotify
follows.

So, there are two things wrong with that:

• We handle EnterNotifys for unmapped windows

• Unmapping windows sometimes works in a sequence, sometimes the sequence gets
  split. Not sure why (if unmapping can take longer for some windows or if our
  syncing is wrong -- but i checked the latter briefly and it looks correct).
  Maybe GrabServer helps?

• We don’t ignore EnterNotify events caused by UnmapNotifies. We used to, but
  then there was a different problem and we decided to solve the EnterNotify
  problem in another way, which actually never happened (commit
  1c5adc6c35).
2011-04-19 21:50:56 +02:00
Michael Stapelberg
b3ee50b184 Bugfix: Also update pixmaps when the position of the deco_rect has changed (Thanks fernandotcl) 2011-03-20 18:07:07 +01:00
Michael Stapelberg
5e42863c7d remove unused struct Colorpixel 2011-03-20 16:35:08 +01:00
Michael Stapelberg
b25477b15e Re-implement rendering to pixmaps (double-buffering) and caching decorations 2011-03-20 14:25:09 +01:00
Michael Stapelberg
82e286ed7c Only send WM_TAKE_FOCUS when the client supports it in the protocols atom
Fixes opening xterm, for example
2011-03-18 17:07:56 +01:00
Michael Stapelberg
0639a7d95b Make i3 compatible with the very latest xcb
This involves:
 • Compiling with xcb-util instead of xcb-{atom,aux} (they merged the libraries)
 • Not using xcb-{event,property} anymore (code removed upstream)
 • Not using the predefined WINDOW, CARDINEL, … atoms (removed upstream)
 • Using the new xcb_icccm_* data types/functions instead of just xcb_*
   (for example xcb_icccm_get_wm_hints instead of xcb_get_wm_hints)

Also I refactored the atoms to use x-macros.
2011-03-18 14:39:27 +01:00
Michael Stapelberg
76e978bfb3 fix small warnings when compiling with DEBUG=0 2011-03-14 23:17:52 +01:00
Michael Stapelberg
f162e7efaa refactor font caching to just save the ID instead of mainting a cache with pattern→id-mapping 2011-03-10 23:20:17 +01:00
Michael Stapelberg
ffc71859a3 Implement support for top/bottom dock clients (according to _NET_WM_STRUT_PARTIAL or requested position) 2011-02-21 14:27:32 +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
28dd226259 refactor code for removing children from a con
Let’s see how this callback stuff will work out. If it doesn’t work out well,
we will remove it.
2011-02-14 18:08:36 +01:00
Michael Stapelberg
fe851b85f0 RandR: respect primary output 2011-01-27 15:40:02 +01:00
Michael Stapelberg
83f6e445a0 Bugfix: Don’t use ->old_parent for floating cons (Thanks eelvex)
Instead, we attach them to their workspace when toggling back to tiling. This
makes more sense; afterall, floating clients are always directly below a
CT_WORKSPACE container.
2011-01-08 00:44:03 +01:00
Michael Stapelberg
23b4271e1c fix enum value 2011-01-07 03:01:58 +01:00
Michael Stapelberg
5098e45f23 Re-Implement support for RandR changes 2011-01-05 00:16:10 +01:00
Fernando Tarlá Cardoso Lemos
a1dd74da5a Implement default border styles (thanks litemotiv). 2010-12-27 13:10:45 +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
Michael Stapelberg
fab8b84db7 ipc: fix current_workspace 2010-11-21 22:12:34 +01:00
Michael Stapelberg
db651679c5 Bugfix: Properly ignore UnmapNotify events (especially for floating windows)
This fixes the bug which caused floating windows to be visible even when
switching to a different workspace.

Instead of ignoring a specific sequence, we now set an ignore_unmap counter for
each container. (So, should containers be closed too early or stay open even if
they should be closed, we probably need to have a closer look at the counter.
At the moment, it is increased by one on reparenting and unmapping (for
workspace changes) and decremented by one on each UnmapNotify event).

This system is better because a sequence does not describe a single unmap or
reparent request but a request to X11 on the network layer -- which can contain
multiple requests.
2010-11-20 19:11:43 +01:00
Michael Stapelberg
76c07900c2 take into account x11 border_width settings (fixes uxterm border issue) 2010-11-14 23:44:13 +01:00
Michael Stapelberg
432073dbe5 implement support for WM_TRANSIENT_FOR, expand testcase 2010-11-13 01:19:21 +01:00
Michael Stapelberg
ad9be5402a Implement support for WM_CLIENT_LEADER 2010-11-12 23:46:03 +01:00
Michael Stapelberg
6eb7f2a01d lexer/parser: implement 'border' command 2010-11-12 18:41:54 +01:00
Michael Stapelberg
5c2758af26 Implement support for size hints (including test case) 2010-10-11 21:32:29 +02: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
160c12ed9a recognize dock windows (and support matching them) 2010-08-15 12:18:27 +02:00
Michael Stapelberg
0411299e4c fix typo 2010-08-15 12:18:05 +02:00