Go to file
Pavel Löbl 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
debian debian: install the RELEASE-NOTES as upstream changelog for now 2012-04-25 23:21:10 +02:00
docs ipc: update the links to the python libraries on github (Thanks BusMaster) 2012-04-14 20:32:41 +02:00
i3-config-wizard i3-config-wizard: use fgetln on OpenBSD, too (Thanks David Coppa) 2012-02-21 15:23:58 +01:00
i3-dump-log shmlog: store meta information in the buffer itself, store path as X11 atom 2012-01-06 23:40:07 +00:00
i3-input shmlog: store meta information in the buffer itself, store path as X11 atom 2012-01-06 23:40:07 +00:00
i3-msg shmlog: store meta information in the buffer itself, store path as X11 atom 2012-01-06 23:40:07 +00:00
i3-nagbar i3-nagbar: add -t to the synopsis (Thanks gamo) 2011-12-07 18:19:11 +00:00
i3bar i3bar: don’t immediately redraw bars after kicking tray clients 2012-04-24 12:04:35 +02:00
include Send proper error messages upon parser failures, use yajl for generating command replies 2012-05-02 22:01:50 +02:00
libi3 Use (void) instead of () for functions without args (Thanks fernandotcl) 2012-03-31 10:53:04 +02:00
man a few little corrections for the previous commit 2012-04-23 23:21:51 +02:00
parser-specs Implement 'rename workspace <old_name> to <new_name>' 2012-04-08 20:40:00 +02:00
render-tree add proof-of-concept perl script to render the tree to SVG 2011-02-21 20:00:56 +01:00
src Fix floating precision bug 2012-05-06 14:13:59 +02:00
testcases t/141-resize.t: do not compare float values directly. use i3test.pm::cmp_float which compares using precision of 1e-6. 2012-05-05 19:15:43 +02:00
tests implement TAILQ_SWAP (only for consecutive elements, order relevant) and use it 2011-02-15 02:21:23 +01:00
yajl-fallback/yajl Make code compatible with yajl 2.0 *and* 1.0 2011-04-27 19:52:53 +02:00
.gitignore replace the refcard with an HTML version (by SardemFF7) 2012-04-12 16:04:29 +02:00
common.mk don’t link against librt on Mac OS X (Thanks Marcus) 2012-05-02 20:06:57 +02:00
DEPENDS debian: use ${perl:Depends}, remove perl from build-deps, update recommends 2011-10-23 16:53:16 +01:00
dump-asy.pl ipc: adapt dump-asy.pl for the new orientation format 2011-01-08 00:45:10 +01:00
generate-command-parser.pl Refactor the interface of commands.c 2012-02-15 20:57:25 +00:00
GOALS Add GOALS file with anti-autotools 2009-02-09 20:56:29 +01:00
gtk-tree-watch.pl perl: use get_tree instead of get_workspaces 2010-11-21 21:42:28 +01:00
i3-migrate-config-to-v4 Introduce synonyms: 'move to workspace' and 'move container to workspace' and 'move window to workspace' 2012-01-10 22:16:09 +00:00
i3-sensible-editor update i3-sensible-* (Thanks Han) 2011-12-29 00:01:49 +01:00
i3-sensible-pager update i3-sensible-* (Thanks Han) 2011-12-29 00:01:49 +01:00
i3-sensible-terminal update i3-sensible-* (Thanks Han) 2011-12-29 00:01:49 +01:00
i3-wsbar i3-wsbar: display a separator between workspaces for every output when --show-all is used (Thanks marforio) 2011-08-04 00:40:40 +02:00
i3.applications.desktop /usr/share/applications/i3.desktop: drop the encoding key, UTF-8 is now required 2012-04-25 23:18:22 +02:00
i3.config Implement resize <grow|shrink> <width|height>, use it in the default config 2012-04-08 16:00:15 +02:00
i3.config.keycodes Implement resize <grow|shrink> <width|height>, use it in the default config 2012-04-08 16:00:15 +02:00
i3.welcome s/i3.zekjur.net/i3wm.org/g 2011-08-28 17:44:42 +02:00
i3.xsession.desktop Also install /usr/share/applications/i3.desktop 2012-01-26 18:16:13 +00:00
LICENSE remove obsolete CMDMODE and TODO files, update LICENSE 2011-10-08 15:18:04 +01:00
logo.svg s/i3.zekjur.net/i3wm.org/g 2011-08-28 17:44:42 +02:00
Makefile makefile: use LDFLAGS when linking test.commands_parser (Thanks Marcus) 2012-05-02 20:00:50 +02:00
PACKAGE-MAINTAINER Introduce the i3-sensible-{pager,editor,terminal} scripts 2011-09-25 18:46:37 +01:00
pseudo-doc.doxygen s/i3.zekjur.net/i3wm.org/g 2011-08-28 17:44:42 +02:00
RELEASE-NOTES-4.0 i3-migrate-config-to-v4: drop the .pl suffix 2011-07-31 23:11:45 +02:00
RELEASE-NOTES-4.0.1 add release notes for 4.0.1 2011-08-01 23:18:32 +02:00
RELEASE-NOTES-4.0.2 add release notes for v4.0.2 2011-08-28 19:17:43 +02:00
RELEASE-NOTES-4.1 Add release notes for v4.1 2011-11-11 21:47:43 +00:00
RELEASE-NOTES-4.1.1 add release notes for v4.1.1 2011-12-24 15:59:04 +01:00
RELEASE-NOTES-4.1.2 add release notes for 4.1.2 2012-01-27 19:23:56 +00:00
RELEASE-NOTES-4.2 add release notes for v4.2 2012-04-25 23:06:39 +02:00
show-download-count.sh add show-download-count.sh to git 2012-01-26 20:53:19 +00:00