Commit Graph

2331 Commits

Author SHA1 Message Date
2c6508a6a3 remove useless checks, size_t != ssize_t :) 2011-04-28 20:24:16 +02:00
528f486eee Make code compatible with yajl 2.0 *and* 1.0 2011-04-27 19:52:53 +02:00
28b9ed6eb3 Bugfix: Ensure that all outputs have a ->con before handling disabled outputs (Thanks JimdiGriz)
Steps to reproduce:
• xrandr --output VGA1 --auto
• xrandr --output LVDS1 --off
2011-04-27 10:18:46 +02:00
8a40dc0011 Use XDG_RUNTIME_DIR when available
XDG_RUNTIME_DIR is the volatile runtime data dir provided by modern
session manager such as systemd
2011-04-26 18:39:11 +02:00
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
cd6f93be3f Rename bind to bindcode
Also fallback when using just 'bind' to be backward-compatible
2011-04-18 23:52:45 +02:00
84b804cda6 x: Set pixmap as background window, saves a lot of CopyAreas 2011-04-18 21:10:50 +02:00
3d5af35fa4 Bugfix: Center floating windows with invalid coordinates on current ws 2011-04-18 19:36:10 +02:00
f613df48d2 Bugfix: Check if a floating window’s coordinates are within a different workspace when managing (Thanks Merovius)
Fixes: #297
2011-04-18 19:28:03 +02:00
60532a90e7 Bugfix: Assign floating cons to correct workspace when moving between monitors (Thanks dothebart)
Fixes: #371
2011-04-18 18:44:39 +02:00
36583ec6ee Bugfix: When moving floating cons to other workspaces, attach them to the workspace 2011-04-18 18:44:18 +02:00
02acf426d3 Bugfix: Don’t set the layout when it’s default layout anyways
Fixes some nasty side-effects
2011-04-02 22:08:38 +02:00
c3b4006f6b Rename new_container to workspace_layout 2011-04-02 21:49:35 +02:00
650eebc347 Implemented config key 'new_container' 2011-04-02 21:43:49 +02:00
21c7a69812 optimization: when moving floating windows, render/push only the floatingcon 2011-04-01 22:40:12 +02:00
d8bf633e56 Bugfix: Flush the Xlib connection after creating cursors
Fixes a race condition where the cursors were created after we were already
using them.
2011-04-01 21:57:08 +02:00
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
6419e42f6d bugfix: fix race condition where window titles were not correctly updated
Fixes: #351
2011-04-01 21:39:58 +02:00
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
b644fb5f26 x: recurse x_push_node in focus order. reduces flickering when switching workspaces 2011-04-01 20:40:32 +02:00
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
4fd4e619ec little coding style fixes, fix compilation warning 2011-03-21 23:54:13 +01:00
f0f7cb7478 If the socket path isn't specified, write it to /tmp. 2011-03-21 23:49:39 +01:00
39ee97fd82 FREE() already nulls the pointer 2011-03-21 23:49:16 +01:00
6d8784af98 Set the I3_SOCKET_PATH atom to the expanded path. 2011-03-21 23:46:03 +01:00
99ce340fea Focus cons when moving to a visible workspace on a different output (Thanks mseed)
Fixes: #355
2011-03-20 19:32:00 +01:00
67b37551d8 Bugfix: Fix switching workspaces on multi-monitor setups (Thanks mseed)
Fixes #356
2011-03-20 18:27:14 +01:00
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
b3ee50b184 Bugfix: Also update pixmaps when the position of the deco_rect has changed (Thanks fernandotcl) 2011-03-20 18:07:07 +01:00
e913e519f2 refactor handlers.{c,h}: declare the handlers static, remove unnecessary parameters 2011-03-20 16:53:12 +01:00
c130cefa93 Handle FocusIn events generated by clients and update decoration accordingly (Thanks mseed) 2011-03-20 16:26:36 +01:00
144deaaaf6 Remove debugging syncs 2011-03-20 14:29:48 +01:00
b25477b15e Re-implement rendering to pixmaps (double-buffering) and caching decorations 2011-03-20 14:25:09 +01:00
e835888a9e Bugfix: Actually re-attach dock clients when outputs get disabled (Thanks phnom)
Fixes: #348
2011-03-20 01:07:21 +01:00
e9a9a46795 Bugfix: Don’t use the workspace where focus is for deleting workspaces when switching (Thanks mseed)
Fixes: #353
2011-03-19 23:19:42 +01:00
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
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
626c65b0d8 Bugfix: correctly store the config path for using it for I3_CONFIG_PATH later 2011-03-19 21:50:13 +01:00
9344b9790c Bugfix: fix null-pointer dereference when IPC is disabled (Thanks Merovius) 2011-03-19 21:37:27 +01:00
65a3259b3c Set the I3_SOCKET_PATH and I3_CONFIG_PATH atoms on the X11 root window 2011-03-19 21:20:38 +01:00
8b9aedd2bf Bugfix: When there’s nothing to focus, focus the root window (Thanks fernandotcl, ThePub) 2011-03-19 20:43:06 +01:00
fd7e4b08f3 rendering: correctly draw background rect (Thanks phnom)
Fixes #347
2011-03-18 20:47:59 +01:00
3282bb4069 remove obsolete comment 2011-03-18 17:08:48 +01:00
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
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
36664c6289 Send WM_TAKE_FOCUS to clients when setting focus (fixes java swing problems) 2011-03-17 22:27:59 +01:00
65b05169d3 change the config parser to use default_orientation instead of new_container_orientation
It’s a shorter and probably more meaningful description as it is not
immediately clear what a container exactly is when first installing i3.
2011-03-17 17:55:53 +01:00
eeb5bdd66f cleanup code of workspace rotation on output changes 2011-03-17 17:53:56 +01:00
2f992f5c0e Added config key for default orientation of containers (new_container_orientation) and added support in randr.c for automatically changing the orientation when user does a xrandr rotate. 2011-03-17 17:43:35 +01:00
b484ed5f9d When making floating cons tiling, re-insert next to the next focused *tiling* con (Thanks mseed)
Fixes: #337 and #350
2011-03-14 23:50:29 +01:00