Commit Graph

253 Commits

Author SHA1 Message Date
Michael Stapelberg
20b1fd4293 Skip FocusIn events with mode == NOTIFY_MODE_GRAB or NOTIFY_MODE_UNGRAB
According to the Xlib Programming Manual section 10.7.2 [1], these events are
generated when keyboard grabs activate/deactivate, while we are only interested
in focus changes which are done by other programs independend from the
keyboard.

[1] http://tronche.com/gui/x/xlib/events/input-focus/grab.html
2011-03-30 23:00:48 +02:00
Michael Stapelberg
e913e519f2 refactor handlers.{c,h}: declare the handlers static, remove unnecessary parameters 2011-03-20 16:53:12 +01:00
Michael Stapelberg
c130cefa93 Handle FocusIn events generated by clients and update decoration accordingly (Thanks mseed) 2011-03-20 16:26:36 +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
89ef41dadf re-implement support for MappingNotifys 2011-03-14 17:20:04 +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
0689f6d8f1 Bugfix: use tree_render() instead of x_push_changes() to re-render and update the stack 2011-03-06 20:45:03 +01:00
Michael Stapelberg
f6a21994bf Re-implement focus follows mouse for outputs
That is, moving your mouse pointer to a different workspace which does not have
any windows on it yet will correctly update the focus.
2011-03-03 16:36:18 +01:00
Michael Stapelberg
e0647b7fc2 Bugfix: don’t focus dock clients (Thanks mseed, mist)
Fixes #321 and #323
2011-03-03 13:59:42 +01:00
Fernando Tarlá Cardoso Lemos
f4ec0bceff Very minor issues found with statical analysis.
The Clang Static Analyzer uncovered those issues:

- The variable "changed" in handlers.c is written to, but it's
  never read since that specific write, so the write is not
  necessary.

- In util.c, "tail" may be NULL. In that case, we shouldn't pass
  it to strlen because strlen's behavior is not defined when s is
  NULL.

- In util.c, "write_index" is incremented twice. It's never used
  anymore after being incremented once, so the second increment is
  not necessary.
2011-02-28 16:48:22 +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
228b5c51ff change many LOG/printf messages to use DLOG 2011-01-07 20:58:58 +01:00
Michael Stapelberg
5098e45f23 Re-Implement support for RandR changes 2011-01-05 00:16:10 +01:00
Michael Stapelberg
38b231b848 handlers.c: remove obsolete code 2010-11-29 22:25:55 +01:00
Fernando Tarlá Cardoso Lemos
371ec037b8 Fix click to focus. 2010-11-29 22:09:05 +01:00
Michael Stapelberg
49308d5026 Bugfix: don’t update focus when moving mouse over stacked/tabbed decorations (Thanks fernandotcl) 2010-11-28 21:07:08 +01:00
Michael Stapelberg
61e3415ddc Bugfix: Add deco_height to bsr.y (to configure the floatingcon correctly). Fixes t/12-floating-resize.t 2010-11-28 20:43:35 +01:00
Michael Stapelberg
02b786509b Upon ConfigureRequests, send a generated ConfigureNotify (Thanks fernandotcl)
This fixes problems with GVim in stacking mode for example.
2010-11-28 13:19:49 +01:00
Michael Stapelberg
622b51a1ea Fix switching containers by moving the mouse over their decorations when in the same container 2010-11-28 01:13:18 +01:00
Michael Stapelberg
6fe0e58a64 Bugfix: Also render decorations of nearby cons when getting an ExposeEvent (Thanks fernandotcl) 2010-11-28 00:52:24 +01:00
Michael Stapelberg
3f3fa08b15 more debug for ClientMessages 2010-11-27 16:44:32 +01:00
Michael Stapelberg
6431d3d187 fix indention 2010-11-27 16:44:20 +01:00
Michael Stapelberg
962fe075b9 Bugfix: Upon ExposEvents, redraw decoration also for the window itself
In the meantime, windows can have decorations (borders) on their own frame, too.
2010-11-26 18:37:34 +01:00
Michael Stapelberg
e744b48b30 Bugfix: When handling an EnterNotify for a child window, access the correct con->layout 2010-11-26 18:18:40 +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
Fernando Tarlá Cardoso Lemos
ea1e9b20be Get rid of the remaining hardcoded height. 2010-11-15 12:25:06 +01:00
Michael Stapelberg
055bd18142 Bugfix: after the first UnmapNotify, unignore the event 2010-11-14 20:15:12 +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
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
8f7bd538d8 implement configure requests, adapt testcase
testcase does not pass 100% due to clients not being reparented correctly yet.
2010-11-12 21:41:10 +01:00
Michael Stapelberg
5c2758af26 Implement support for size hints (including test case) 2010-10-11 21:32:29 +02:00
Michael Stapelberg
61f9a79347 use decimal coordinates in debug message 2010-07-11 22:01:25 +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
14a312c152 more debug output 2010-06-02 17:04:26 +02:00
Michael Stapelberg
1c5adc6c35 Don’t ignore sequence in UnmapNotify, there might be multiple windows in one sequence
This would lead to i3 thinking that a new window was already managed if it
has the same X-ID as the old window. Instead, we need to fix the EnterNotify
problem in a different way.
2010-06-02 17:03:26 +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
def41582d1 re-render the three after calling parse_cmd 2010-05-14 23:41:17 +02:00
Michael Stapelberg
8c5d824fa8 Ignore UnmapNotify events generated by reparenting 2010-05-14 23:37:56 +02:00
Michael Stapelberg
7adf921bc3 use the new parser for handling keybindings 2010-05-11 23:04:47 +02:00
Michael Stapelberg
c4d87e2f81 handle destroynotify events 2010-04-17 17:27:53 +02:00
Michael Stapelberg
d973f30fc2 push X11 changes after a window is mapped 2010-04-17 16:43:34 +02:00
Michael Stapelberg
c56867792a handle client messages (fullscreen window state) 2010-04-17 13:54:45 +02:00
Michael Stapelberg
2534f21940 ignore sequence of unmapnotify events (generates enternotify events) 2010-04-16 20:56:49 +02:00
Michael Stapelberg
24725cd94a re-add fullscreen mode 2010-04-13 20:51:43 +02:00
Michael Stapelberg
8959c5005f cleanups 2010-04-13 19:33:40 +02:00
Michael Stapelberg
8e5a831e27 re-add focus follows mouse handling 2010-04-13 18:43:37 +02:00
Michael Stapelberg
dd7acf73e9 re-add support for legacy window titles (WM_NAME) 2010-04-13 17:46:54 +02:00
Michael Stapelberg
fd8735a6fd correctly update/display window title/class 2010-04-13 17:22:34 +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