Commit Graph

1667 Commits (da924aae6fd33a3e823b67fd1b1ea011099328f9)

Author SHA1 Message Date
Michael Stapelberg 6ba0944430 scratchpad: fix moving scratchpad window
From the source:

    When starting i3 initially (and after each change to the connected
    outputs), this function fixes the resolution of the __i3
    pseudo-output. When that resolution is not set to a function which
    shares a common divisor with every active output’s resolution,
    floating point calculation errors will lead to the scratchpad window
    moving when shown repeatedly.

fixes #632
2012-08-08 18:45:40 +02:00
Michael Stapelberg 95cdfe5cb6 makefile: remove the old loglevels.tmp and loglevels.h on 'make clean' 2012-08-07 10:03:10 +02:00
Michael Stapelberg 0e752070ac explicitly set filenames to $(basename __FILE__)
This makes the debug log a bit more readable, especially since commit
48f1e383ca
2012-08-07 09:55:52 +02:00
Michael Stapelberg fa4894fbaa Support _NET_ACTIVE_WINDOW ClientMessages
Since we advertise _NET_ACTIVE_WINDOW support (but only set the
corresponding atom currently), it makes sense to also support the
ClientMessage. Apps such as Gajim use it to set focus to the roster
window when clicking on the tray icon for example.

fixes #767
2012-08-07 09:50:47 +02:00
Michael Stapelberg 122130d868 handlers.c: don’t call x_push_changes(croot), tree_render() already does 2012-08-07 09:50:25 +02:00
Michael Stapelberg 1a62c398ac Bugfix: Attach con to nc before calling con_border_style_rect() 2012-08-07 01:13:37 +02:00
Philipp Middendorf 9d9a1d9d29 Bugfix: Add deco_height only when in "normal" border mode.
Also, use con_border_style_rect instead of hard-coded values to
determine the border size.
2012-08-07 01:05:16 +02:00
Michael Stapelberg 506b7f4004 Bugfix for previous commit: Don’t crash with dock windows 2012-08-06 03:11:11 +02:00
Axel Wagner 57effd65b2 Make horizontal edge-borders hidable too 2012-08-06 03:03:00 +02:00
Michael Stapelberg 1b2d222449 Properly report errors in 'focus parent' (Thanks eeemsi)
Also, make X11 errors debug log level only. They are harmless usually.

fixes #762
2012-08-05 20:57:20 +02:00
Michael Stapelberg afc16953b9 correctly store last_split_layout when we are dealing with a workspace-level layout change (Thanks aksr)
fixes #763
2012-08-05 20:52:42 +02:00
Iakov Davydov f27735f620 create hide_edge_borders option 2012-08-05 20:26:15 +02:00
Michael Stapelberg 48f1e383ca makefile: canonicalize path when compiling
Compilers store the path with which they were called in the debug
symbols. Therefore, this will make backtraces show something like
../i3-4.2/src/main.c instead of src/main.c.

See also http://stackoverflow.com/questions/6473561/
2012-08-05 17:00:24 +02:00
Michael Stapelberg 952e5b6059 pre-compile all.h, saves quite some build time
before:

$ time CC=clang make -j16
CC=clang make -j16  6,04s user 0,86s system 468% cpu 1,471 total
CC=clang make -j16  6,05s user 0,87s system 468% cpu 1,477 total
CC=clang make -j16  6,15s user 0,86s system 464% cpu 1,510 total
CC=clang make -j16  6,05s user 0,93s system 467% cpu 1,493 total
CC=clang make -j16  6,10s user 0,84s system 461% cpu 1,507 total

$ time CC=gcc make -j16
CC=gcc make -j16  9,91s user 1,43s system 508% cpu 2,231 total
CC=gcc make -j16  10,02s user 1,37s system 500% cpu 2,275 total
CC=gcc make -j16  9,80s user 1,60s system 507% cpu 2,245 total
CC=gcc make -j16  10,02s user 1,44s system 506% cpu 2,264 total
CC=gcc make -j16  9,99s user 1,45s system 505% cpu 2,261 total

after:

$ time CC=clang make -j16
CC=clang make -j16  3,41s user 0,83s system 375% cpu 1,131 total
CC=clang make -j16  3,29s user 0,90s system 373% cpu 1,122 total
CC=clang make -j16  3,35s user 0,77s system 369% cpu 1,116 total
CC=clang make -j16  3,36s user 0,78s system 374% cpu 1,105 total
CC=clang make -j16  3,46s user 0,75s system 373% cpu 1,126 total

$ time CC=gcc make -j16
CC=gcc make -j16  10,74s user 1,44s system 494% cpu 2,462 total
CC=gcc make -j16  10,68s user 1,54s system 497% cpu 2,453 total
CC=gcc make -j16  10,60s user 1,60s system 488% cpu 2,499 total
CC=gcc make -j16  10,63s user 1,51s system 485% cpu 2,502 total
CC=gcc make -j16  10,70s user 1,51s system 497% cpu 2,453 total

Therefore, we enable pre-compiled headers only when CC=clang.
2012-08-05 16:44:11 +02:00
Michael Stapelberg 8a1c8115ca fix a few warnings/places where the clang static analyzer complains 2012-08-05 16:34:38 +02:00
Michael Stapelberg 78f5f2204d ipc: implement GET_VERSION to find out the i3 version
This is useful for third-party scripts which require certain features
and want to error out cleanly when they are run with an old i3 version.

Additionally, i3 --version might be different from what’s actually
running (an old version of the binary), so i3-msg -t get_version will be
the best way to figure out the i3 version you are actually running from
this commit on.
2012-08-05 14:30:05 +02:00
Michael Stapelberg ac8b2f637f cleanup i3 sync protocol messages 2012-08-04 16:34:57 +02:00
Michael Stapelberg 1d95d296a5 parser: remove debug messages
The new parser is proven by now (v4.2 was released 4 months ago), so
removing these messages will make the logfile more readable.
2012-08-04 16:31:57 +02:00
Michael Stapelberg fb4ee17b05 Merge branch 'master' into next 2012-08-04 16:10:37 +02:00
Michael Stapelberg 74510c59c7 floating_fix_coordinates: properly deal with negative positions 2012-08-04 16:09:16 +02:00
Michael Stapelberg d57d51da6d Bugfix: Properly fix floating coordinates when disabling outputs (Thanks Tucos)
Since the content containers are not yet updated (they will be when
rendering), we need to use the output containers’s rects instead.
2012-08-04 16:09:16 +02:00
Michael Stapelberg e867fd8105 Bugfix: fix floating coordinates when moving assigned workspaces 2012-08-04 16:09:10 +02:00
Michael Stapelberg e36674c5b8 Fix a crash when the current output cannot be determined (Thanks Tucos)
This is only a cosmetical change though, the fix for the root cause can
be found in the commits following this one.
2012-08-04 15:19:11 +02:00
Michael Stapelberg 79083f3b34 ensure the layout is not L_DEFAULT anymore, even if last_split_layout is not initialized (Thanks eeemsi) 2012-08-04 03:43:12 +02:00
Michael Stapelberg de94f6da1a Introduce splith/splitv layouts, remove orientation
With this commit, the "default" layout is replaced by the splith and
splitv layouts. splith is equivalent to default with orientation
horizontal and splitv is equivalent to default with orientation
vertical.

The "split h" and "split v" commands continue to work as before, they
split the current container and you will end up in a split container
with layout splith (after "split h") or splitv (after "split v").

To change a splith container into a splitv container, use either "layout
splitv" or "layout toggle split". The latter command is used in the
default config as mod+l (previously "layout default"). In case you have
"layout default" in your config file, it is recommended to just replace
it by "layout toggle split", which will work as "layout default" did
before when pressing it once, but toggle between horizontal/vertical
when pressing it repeatedly.

The rationale behind this commit is that it’s cleaner to have all
parameters that influence how windows are rendered in the layout itself
rather than having a special parameter in combination with only one
layout. This enables us to change existing split containers in all cases
without breaking existing features (see ticket #464). Also, users should
feel more confident about whether they are actually splitting or just
changing an existing split container now.

As a nice side-effect, this commit brings back the "layout toggle"
feature we once had in i3 version 3 (see the userguide).

AFAIK, it is safe to use in-place restart to upgrade into versions
after this commit (switching to an older version will break your layout,
though).

Fixes #464
2012-08-04 03:13:24 +02:00
Michael Stapelberg 1b3435807a add missing \n in debug message 2012-08-04 03:12:06 +02:00
Michael Stapelberg cc7f16007a Display i3-nagbar when commands lead to an error
e.g. pressing Mod1+x when having the following in your configfile:

    bindsym Mod1+x some invalid command

will lead to an i3-nagbar instance popping up, offering you to view the
error log (which will contain parser errors from this commit on).
2012-08-02 17:45:09 +02:00
Michael Stapelberg 9f05354c1f cfgparse: Write custom scripts for i3-sensible-terminal
This workaround is necessary for terminal emulators which parse -e in a
different way: some accept a list of arguments (-e command arg1 arg2 …),
some accept only one argument (-e "command arg1 arg2 …"). Therefore, we
just create a script and pass that as the one and only argument.
2012-08-02 15:17:10 +02:00
Quentin Glidic 0b4ee7a1da common.mk: Split XCB common flags 2012-07-23 00:12:55 +02:00
Quentin Glidic 5e0cd52f10 common.mk: Split XCB keyboard flags 2012-07-23 00:06:37 +02:00
Quentin Glidic 51a0f312f2 common.mk: Split WM XCB flags 2012-07-23 00:04:01 +02:00
Quentin Glidic fde8c0dd85 common.mk: Split Xlib flags 2012-07-23 00:04:01 +02:00
Quentin Glidic 5cf3751482 common.mk: Move -lm to i3_LIBS 2012-07-22 23:53:51 +02:00
Quentin Glidic 60bc6b0400 common.mk: Split Xcursor flags 2012-07-22 23:53:51 +02:00
Quentin Glidic 85b261c162 common.mk: Split yajl flags 2012-07-22 23:53:51 +02:00
Quentin Glidic 30934ea316 common.mk: Split libev flags 2012-07-22 23:53:51 +02:00
Quentin Glidic 79fc8462c0 common.mk: Split libpcre flags 2012-07-22 23:53:51 +02:00
Quentin Glidic e232c06885 common.mk: Split libstartup-notification flags 2012-07-22 23:53:51 +02:00
Quentin Glidic c7029a5e21 common.mk: Introduce I3_*FLAGS
CPPFLGES, CFLAGS and LDFLAGS should be user variables
We now provide default flags but use I3_*FLAGS flags for our own needed
flags

Also reoder lib flags a bit
2012-07-22 23:53:49 +02:00
Quentin Glidic 3b1b72ecbb *.mk: Support passing specific CFLAGS/LIBS 2012-07-22 23:53:13 +02:00
Michael Stapelberg ac7278eb1a resizing: traverse containers up properly (+test) (Thanks oblique)
In certain situations (when you have a h-split within a h-split) you
couldn’t properly resize previously. This commit makes the resize
command properly traverse up the containers.

fixes #754
2012-07-22 21:37:26 +02:00
Michael Stapelberg a97e70d483 Merge branch 'master' into next 2012-07-22 21:26:00 +02:00
Michael Stapelberg 83dc5d5cb6 Bugfix: Fix duplicate return value for 'resize' command 2012-07-22 21:25:38 +02:00
Quentin Glidic e452acb30e Add stub Makefiles to allow subdir make calls 2012-07-22 19:57:48 +02:00
Quentin Glidic e3b9ffe381 Move libi3 to the new Makefile layout 2012-07-22 19:57:21 +02:00
Quentin Glidic 8853334bbe New Makefile layout, move i3 to it 2012-07-22 19:57:18 +02:00
Quentin Glidic 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
Michael Stapelberg 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
Michael Stapelberg 072daa94b3 Merge branch 'master' into next 2012-06-27 17:49:36 +02:00
Michael Stapelberg 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