Commit Graph

1871 Commits

Author SHA1 Message Date
bdc078914b i3: Replace loglevels by a global debug logging
File-limited were not used nor really useful
Besides, they are painful to maintain in Makefile rules compared to the
benefit
2012-07-22 18:41:12 +02:00
c5d0472158 Explicitly disconnect in the 'exit' command
This fixes a race condition when running the tests. I think that the X11
server has more time to clean up the resources when we do an explicit
disconnect. The symptom I was seeing was that sometimes, i3 couldn’t
become the window manager on one of the Xdummy instances.
2012-06-29 23:13:25 +02:00
072daa94b3 Merge branch 'master' into next 2012-06-27 17:49:36 +02:00
6e9bbe67ce Bugfix: fix reload crashes in rare cases (Thanks Tucos)
Depending on the memory layout, it could happen that bind->command was
exchanged with something else while the parser still accessed it.

Therefore, we now copy the command and let the parser use that copy.
2012-06-27 17:48:22 +02:00
7afb33d8f8 Merge branch 'master' into next 2012-06-25 21:44:20 +02:00
6146f39b8a when using i3 -C, don’t send remaining arguments via IPC (Thanks Somelauw) 2012-06-25 21:43:41 +02:00
ecd238b65e ignore "current" when searching for named workspaces 2012-06-03 19:44:42 +02:00
2afecaf355 Add a new command 'move to workspace current'
Added a new command 'move to workspace current' which can be used
with criteria to move a window to the current workspace.
2012-06-03 19:42:56 +02:00
51173baf28 Fix 'move to workspace' when used with criteria
When moving window from other (not current) workspace to another
workspace with criteria we should stay on current workspace.

And we should exit early when criteria was specified but didn't
match any window.
2012-06-03 19:41:45 +02:00
4611f875ff Fix a mistake in comment 2012-06-03 19:38:43 +02:00
fffc53c246 Restrict "move to workspace" commands in fullscreen. 2012-06-03 16:24:53 +02:00
4452bfb942 Prevent moving out of fullscreen containers. 2012-06-03 16:24:53 +02:00
8bf4e9e059 Restrict directional focus in fullscreen.
This reuses the same fullscreen focus logic to ensure that focus
doesn't escape a fullscreen container.
2012-06-03 16:24:53 +02:00
250c260eaa Allow focus child/parent when in fullscreen.
This is now restricted according to the already defined fullscreen
focus constraints. Test case 157 was removed, as we don't prevent
level up/down in fullscreen anymore. Those commands are properly
tested in fullscreen by test case 156.

Fixes: #612
2012-06-03 16:24:53 +02:00
da1e232757 Refined the fullscreen focus constraints.
Basically, a focus change can't escape a fullscreen container. The
only exception is per-output fullscreen containers, as you should
be able to focus a container in a different workspace in this case.

This is an improvement on 4eab046e, now considering the difference
between global and per-output fullscreen and taking the tree
structure into account to determine what escaping the fullscreen
container means. It only affects targeted focus commands in the
form "for_window [...] focus", but it lays the foundation for
forthcoming fixes to all other focus commands.
2012-06-03 16:24:53 +02:00
e969ed502b Merge branch 'master' into next 2012-05-16 06:24:53 +02:00
ec4e6d1cdf Fix stray workspaces "number 1" being created when having workspace number 1 in your config 2012-05-16 06:24:16 +02:00
ed957d60a7 Merge branch 'master' into next 2012-05-09 21:08:28 +02:00
4eab046e8f Allow focus w/ target when in fs in some cases.
If the target is in a different workspace, there's no reason why
we wouldn't allow the user to focus it. We already allow this when
focusing a workspace, for example.
2012-05-09 21:08:19 +02:00
eab9f46c33 Merge branch 'master' into next 2012-05-09 20:39:26 +02:00
edae08a4d9 maybe_back_and_forth now sets render_tree 2012-05-09 20:38:41 +02:00
42dcb4e8c4 make maybe_back_and_forth static 2012-05-09 20:34:40 +02:00
b88ab981fd bugfix: less differentiation between named and numbered workspaces
calling workspace by number now also checks for switching back and forth
and creates a new workspace if no workspace starting with that number is
found

also removed the obsolete tree_render() in favor of setting
cmd_output->needs_tree_render to true
2012-05-09 20:33:59 +02:00
1c0b542c07 Merge branch 'master' into next 2012-05-09 20:06:45 +02:00
62d3329906 remove dead code
This was a left-over of commit 9d68d780e2
2012-05-09 20:00:46 +02:00
a9b57a44a9 Remove set but never read variable
This was due to the changes in commit d25e77ce75
2012-05-09 19:56:21 +02:00
2a0fb1db69 Merge branch 'master' into next 2012-05-09 19:47:19 +02:00
eeb6ff9237 Move is_debug_build() to libi3/ 2012-05-09 19:12:20 +02:00
d13ba7ca53 Fix floating precision bug
When calculating coordinates we should multiply at first otherwise
we lose precision when i3 is compiled without sse2 support.

The following code prints "Res1: 348 Res2: 349" when compiled with
-O0 -mno-sse2 and "Res1: 349 Res2: 349" with -O0 -msee2.

Note that -msse2 is default flag on 64bit OSes.

int main() {
  double a = 349.0 / 768;
  double b = 349.0 * 768;
  int res1 = a * 768;
  int res2 = b / 768;
  printf("Res1: %d Res2: %d\n", res1, res2);
  return 0;
}

Thanks guys for helping me to hunt down this one.
2012-05-06 14:13:59 +02:00
bbe607899c Send proper error messages upon parser failures, use yajl for generating command replies
Fixes: #693
2012-05-02 22:01:50 +02:00
5a29eb20e0 Fix spelling of success
Fixes: #695
2012-05-02 20:20:45 +02:00
280a35717b log.c: len is always positive, remove useless check (Thanks Marcus) 2012-05-02 20:07:59 +02:00
eedd1a64d7 Make log.c figure out the physical amount of memory on Mac OS X (Thanks Marcus) 2012-05-02 20:05:07 +02:00
cc9f0ab353 bump copyright in --version (Thanks joepd) 2012-04-22 13:04:24 +02:00
2c23eb4c75 cfgparse: accept force-xinerama as a synonym of force_xinerama 2012-04-21 12:48:34 +02:00
1bb165a29a tests: warp the pointer to in multi-monitor tests to avoid flaky tests 2012-04-09 14:48:57 +02:00
0f10ccdf12 Implement fake-outputs option (cmdline, cfg) for multi-monitor testing
This kills the dependency on xdmx and makes the testsuite simpler
and more flexible (in the output sizes / configurations).
2012-04-09 14:28:36 +02:00
fa6a3d57d2 Only resize when the left/right mouse button is used, not when scrolling (Thanks eeemsi) 2012-04-08 21:04:21 +02:00
eec41d1276 Fix warning: properly initialize 'workspace' variable 2012-04-08 20:45:49 +02:00
373b4ad74a Implement 'rename workspace <old_name> to <new_name>' 2012-04-08 20:40:00 +02:00
ad513b4799 Implement 'move [container|window] to workspace number <number>' 2012-04-08 20:33:46 +02:00
72078c704e Implement 'workspace number <number>' to switch to named workspaces 2012-04-08 19:17:46 +02:00
42bbdbdfc1 Prevent changing focus outside a container when scrolling on the decorations
Fixes: #557
2012-04-08 18:33:45 +02:00
849e06f21e Replace the old fullscreen container when requesting fullscreen
Fixes: #510
2012-04-08 17:53:37 +02:00
2d110c90e6 Implement resize <grow|shrink> <width|height>, use it in the default config
Fixes: #576
2012-04-08 16:00:15 +02:00
250577da36 Force WM_TAKE_FOCUS event to be sent when clicking
This fixes more problems with Eclipse.
See also commit 1962c30dfb
2012-04-07 16:24:53 +02:00
a29eece9dc Bug 676: if scratchpad window is active on a non-visible workspace, then "scratchpad show" should move it to the current visible workspace. 2012-04-05 18:10:45 +02:00
9a58c1fcaa Added option to select primary display on tray_output 2012-04-05 14:42:07 +02:00
206b96202c Use (void) instead of () for functions without args (Thanks fernandotcl)
See also:
http://article.gmane.org/gmane.linux.kernel/1268792

The C compiler will handle (void) as "no arguments" and () as "variadic
function" (equivalent to (...)) which might lead to subtle errors, such
as the one which was fixed with commit 0ea64ae4.
2012-03-31 10:53:04 +02:00
e19c7b7bae A few style fixes for the previous commit 2012-03-26 17:00:35 +02:00