Commit Graph

230 Commits (10646eb0021403c1f1448339603b24c50da0e604)

Author SHA1 Message Date
Michael Stapelberg 78d25c4cd9 expose event handler: use x_deco_recurse 2011-07-10 22:06:16 +02:00
Michael Stapelberg 7d9ba707b3 x: Don’t pre-render the decoration for windows inside a stack which are not visible
Saves n-1 decoration renderings for n windows in a stack whenever a new window
gets added or removed.
2011-07-10 21:55:29 +02:00
Michael Stapelberg d7f9700ba4 x: use PolySegment instead of two PolyLine requests 2011-07-10 21:19:31 +02:00
Michael Stapelberg 8f4b95dccd x: change EnterNotify event mask only for mapped windows
Saves a few ChangeWindowAttributes requests.
2011-07-10 20:18:06 +02:00
Michael Stapelberg 37e0cf8346 x: copy the pre-rendered pixmap contents to a decoration window immediately after mapping
Reduces flickering.
2011-07-10 20:15:22 +02:00
Michael Stapelberg afef42a4ac x: set the contents of a decoration window immediately after changing its size
Reduces flickering. A window loses its contents when being resized, so we have
to restore them as fast as possible.
2011-07-10 20:08:40 +02:00
Michael Stapelberg 0d8dd571f8 x: when rendering stacked/tabbed cons, only update decoration once, saves some CopyAreas 2011-07-10 20:01:29 +02:00
Michael Stapelberg 64cfb2dbb1 Revert "x: Set pixmap as background window, saves a lot of CopyAreas"
This reverts commit 84b804cda6.
Turns out that it triggered graphic corruptions on ATI graphics cards (Thanks
aniou) with certain drivers.
2011-07-10 16:22:09 +02:00
Michael Stapelberg 71741d7620 Bugfix: Only set ENTER_WINDOW event mask for mapped windows (fixes focus problems)
Fixes focus problems when switching to empty workspaces or when going in/out of
fullscreen.
2011-07-04 13:41:02 +02:00
Michael Stapelberg fb9d77305e Implement 'fullscreen global' 2011-06-10 18:27:20 +02:00
Michael Stapelberg 1fc15d270e Bugfix: rendering cache also needs to consider con->pixmap_recreated for borders 2011-05-29 13:20:41 +02:00
Michael Stapelberg 446c9b7313 Bugfix: Set pixmap_recreated before rendering the decoration 2011-05-29 12:20:09 +02:00
Michael Stapelberg b49874dcb8 x: first create/render pixmap, then change window sizes (reduces flickering for new windows)
Especially in stacked cons.
2011-05-29 11:31:22 +02:00
Michael Stapelberg 272a86745e Bugfix: Free pixmaps when killing windows (Thanks Mike) 2011-05-22 23:32:59 +02:00
Michael Stapelberg 443753bea6 x.c: disable some of the debug output 2011-05-14 20:04:34 +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 4be3178d4d Bugfix: Don’t fill split cons etc. with client background color (fixes nested decoration rendering)
Fixes: #359
2011-05-11 22:01:09 +02:00
Michael Stapelberg 79323a0be0 Bugfix: Fix the client background rectangle calculation (Thanks Mike)
Really fixes #364.
2011-05-01 22:27:06 +02:00
Michael Stapelberg b401e08a5d Bugfix: For fullscreen cons, use a deco_height of 0 to correctly render the background color
This should fix #364.
2011-05-01 19:46:41 +02:00
Michael Stapelberg d28008aa63 Bugfix: Correctly render decorations in tabbed containers (don’t overlap)
This fixes a regression introduced in b644fb5f26.
2011-05-01 18:48:30 +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 84b804cda6 x: Set pixmap as background window, saves a lot of CopyAreas 2011-04-18 21:10:50 +02:00
Michael Stapelberg 21c7a69812 optimization: when moving floating windows, render/push only the floatingcon 2011-04-01 22:40:12 +02:00
Michael Stapelberg 26635a7595 x: skip creating pixmaps when the rect is actually invisible
This fixes a few X11 errors.
2011-04-01 21:54:45 +02:00
Michael Stapelberg 57447112ba x: skip x_draw_decoration when con is not mapped
This commit makes workspace switching completely free of cache misses, so
decorations are not re-rendered when switching workspaces.
2011-04-01 20:41:08 +02:00
Michael Stapelberg b644fb5f26 x: recurse x_push_node in focus order. reduces flickering when switching workspaces 2011-04-01 20:40:32 +02:00
Fernando Tarlá Cardoso Lemos 6d8784af98 Set the I3_SOCKET_PATH atom to the expanded path. 2011-03-21 23:46:03 +01:00
Michael Stapelberg 38173749f8 Bugfix: Also invalidate caches of the following cons in a split con on cache miss (Thanks fernandotcl) 2011-03-20 18:17:18 +01: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 c130cefa93 Handle FocusIn events generated by clients and update decoration accordingly (Thanks mseed) 2011-03-20 16:26:36 +01:00
Michael Stapelberg 144deaaaf6 Remove debugging syncs 2011-03-20 14:29:48 +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 03ea7cea28 Bugfix: also invalidate focused_id when the to_focus window is not mapped
This fixes a bug where focus might not be set correctly when changing workspaces
2011-03-19 22:54:53 +01:00
Michael Stapelberg b342d387a8 Handle saved_configpath in get_config_path, fix memleak in current_configpath handling, update atoms after reloading (Thanks fernandotcl) 2011-03-19 22:26:15 +01:00
Michael Stapelberg 8b9aedd2bf Bugfix: When there’s nothing to focus, focus the root window (Thanks fernandotcl, ThePub) 2011-03-19 20:43:06 +01:00
Michael Stapelberg fd7e4b08f3 rendering: correctly draw background rect (Thanks phnom)
Fixes #347
2011-03-18 20:47:59 +01:00
Michael Stapelberg 3282bb4069 remove obsolete comment 2011-03-18 17:08:48 +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 36664c6289 Send WM_TAKE_FOCUS to clients when setting focus (fixes java swing problems) 2011-03-17 22:27:59 +01:00
Fernando Tarlá Cardoso Lemos c0563af3e2 Bring back some more EWMH support. 2011-03-14 17:11:33 +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 c17b3b7560 remove left-over xcb_aux_sync (debugging code) 2011-03-06 21:56:15 +01:00
Michael Stapelberg 4f26316aaa x: disable all events while re-stacking windows, prevents unwanted EnterNotifys 2011-03-06 21:48:49 +01:00
Michael Stapelberg 4514146ed9 Use the combined geometry of children when setting a split container to floating (+testcase) (Thanks mseed)
Fixes #332
2011-03-06 02:39:15 +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 b800555161 Bugfix: check ->layout, not ->type for L_STACKED 2011-02-14 16:35:48 +01:00
Michael Stapelberg 07381ccb7b fix a rendering problem for split cons inside tabbed cons (Thanks julien)
This fixes #280.
2011-02-02 17:56:29 +01:00
Michael Stapelberg cbf4fcb9b5 Bugfix: Fix focus problems when switching workspaces by pushing the window stack before mapping 2011-01-21 21:49:56 +01:00
Michael Stapelberg 228b5c51ff change many LOG/printf messages to use DLOG 2011-01-07 20:58:58 +01:00
Michael Stapelberg bf2c18cc33 fix memleak: free X state structure 2011-01-04 22:39:24 +01:00
Michael Stapelberg 41eb810531 Bugfix: Don’t update focus when container is not mapped 2010-12-11 17:07:20 +01:00
Michael Stapelberg 8d5421e6a4 Bugfix: Invalidate focused_id to correctly focus new windows with the same ID 2010-12-11 17:03:53 +01:00
Michael Stapelberg 85b7e60bac Bugfix: Use separate child_mapped instead of checking state->initial (makes t/02-fullscreen.t pass)
This is necessary for windows which are mapped later, for example when there is
a fullscreen window in front of everything.
2010-11-28 22:09:26 +01:00
Fernando Tarlá Cardoso Lemos 69fc6449dc libXcursor support (themed cursors). 2010-11-28 13:01:45 +01:00
Michael Stapelberg 0cfebcb5b6 remove some debug messages 2010-11-27 18:05:45 +01:00
Michael Stapelberg 2c3e5dbc65 Bugfix: unmap windows in a separate step to avoid focus problems with fullscreen windows
This fixes an ugly bug with Adobe Flash in fullscreen mode, for example on
YouTube. See comments in the diff for some explanation.
2010-11-27 17:45:23 +01:00
Michael Stapelberg d47a1edf22 Bugfix: configure windows before mapping, correctly store window_rect instead of rect 2010-11-27 16:44:45 +01:00
Michael Stapelberg b2db9ac797 Bugfix: always reset state->initial to false, not only for different stacking order
As initial may be set to true again after initializing the window, we need to
ensure that it is properly cleared. Otherwise, this leads to ghost windows when
unmapping (such as the Xpdf about dialog) due to i3 issuing MapWindow after an
Unmap happened but before i3 actually received/handled the UnmapNotify.
2010-11-26 20:15:08 +01:00
Michael Stapelberg 97bc8f4b86 Bugfix: Don’t draw decorations of CT_FLOATING_CONs 2010-11-26 19:24:14 +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 69f29b2b8e Use the configured font to draw the decorations. 2010-11-15 12:24:16 +01:00
Michael Stapelberg a27af52706 fix floating focus behaviour, extend testcase 2010-11-14 22:35:44 +01:00
Michael Stapelberg d401703135 Bugfix: use rectangles instead of a polygon to avoid strange rendering errors
With the polygon, when using pidgin, having the buddy list in the middle of the
screen, 200 px width, full screen high, then opening the manage accounts
window, the decorations of the buddy list were visible on the accounts window.
2010-11-14 21:17:27 +01:00
Michael Stapelberg 5d7344af8a resize/unmap container x11 windows on demand (makes background images visible again) 2010-11-14 18:52:40 +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 e85bb09017 set withdrawn/normal state when unmapping/mapping (for xprop/java) 2010-11-14 13:53:47 +01:00
Michael Stapelberg 7c6f2dbfc6 Rendering fixes for stacking mode 2010-11-13 22:39:59 +01:00
Fernando Tarlá Cardoso Lemos 53b98fdc7e Paint the window decorations using the theme. 2010-11-13 19:17:08 +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 7415f14448 Add more documentation to functions/header files 2010-07-13 11:35:05 +02:00
Michael Stapelberg 60bdf87862 Bugfix: Push all following window stacking orders to X11 when the order of a single pair changed 2010-07-11 23:41:02 +02:00
Michael Stapelberg 64306e813e Bugfix: Ignore sequences of mapping/unmapping windows to avoid getting enter_notifies 2010-07-02 20:33:26 +02:00
Michael Stapelberg b14fa457e7 fix: to always abort we need to assert(false) 2010-05-31 23:08:16 +02:00
Michael Stapelberg 246d4627be re-enable sending fake configure notifies 2010-05-31 23:00:36 +02:00
Michael Stapelberg 68542f3c22 When assigning children to containers, reset their x window state 2010-04-17 16:41:20 +02:00
Michael Stapelberg 4796798074 better debug messages 2010-04-16 21:02:34 +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