Commit Graph

6884 Commits

Author SHA1 Message Date
Albert Safin b6282b47bc Remove unused con_get_next()
This function has unused for a long time since the commit
8f4b9ddaa4.
2018-12-09 08:04:41 +07:00
Albert Safin 0eb07dea5c Remove unnecessary code in route_click()
This case is handled by resize_find_tiling_participants() anyway which
is introduced in the commit dbec5eb905.
2018-12-09 07:48:40 +07:00
Albert Safin 9a1eb7a783 commands.c: Add missing error replies 2018-12-09 07:41:19 +07:00
Orestis b192bf4bd2
Merge pull request #3547 from stapelberg/conn
Bugfix: use restore_conn, not conn
2018-12-08 14:49:04 +02:00
Michael Stapelberg 01c1b5dec2 Bugfix: use restore_conn, not conn
Using the wrong X11 connection breaks the libev event handling model:
xcb_flush() must be called immediately before handing control to libev.

Before this fix:

1. xcb_prepare_cb would read and flush conn
2. restore_xcb_prepare_cb would read and flush restore_conn,
   BUT also inadvertantly call xcb_flush(conn), resulting in new
   events being filled into the XCB event queue
3. libev waits for new events
4. after 1 minute, libev times out and the events are processed

Diagnosed using strace on testcases/complete-run.pl.

related to commit 0d8b6714e3

related to #3510
2018-12-08 13:31:53 +01:00
Orestis 620e90bed8
Merge pull request #3541 from orestisf1993/title_align
Apply title_align to non-leaf containers
2018-12-05 13:09:09 +02:00
Orestis Floros a81e22a277
Apply title_align to non-leaf containers
Additionally, marks will now display for non-leaf containers.

Fixes #3540.
2018-12-04 20:50:32 +02:00
Ingo Bürk 52d785fb37
Merge pull request #3514 from xzfc/2742-shape
Add input and bounding shapes support (#2742)
2018-12-03 20:16:47 +01:00
Albert Safin 1a85619498 Add input and bounding shapes support (#2742)
Basic idea: if the window has a shape, set the parent container shape as
the union of the window shape and the shape of the frame borders.

Co-authored-by: Uli Schlachter <psychon@znc.in>
2018-12-01 11:52:41 +07:00
Albert Safin 9273f67734 Log window id in state_for_frame() 2018-12-01 10:31:11 +07:00
Michael Stapelberg 7ade46c61f
switch to clang-format-6.0 (#3533) 2018-11-28 17:38:16 +01:00
Ingo Bürk a080551f26
Merge pull request #3432 from orestisf1993/aspect-ratio
Fix aspect ratio bugs
2018-11-17 16:08:22 +01:00
Ingo Bürk 8ad84f06c9
Merge pull request #3524 from orestisf1993/regress-randr
randr.c: Fix regression with focusing NULL container
2018-11-15 12:57:59 +01:00
Orestis Floros a84b30f8a9
randr.c: Fix regression with focusing NULL container
This was introduced in db3b9e4187 which
removed the NULL check for next.

Fixes #3523.
2018-11-15 13:49:26 +02:00
Ingo Bürk 299e9b9fdd
Merge pull request #3521 from c-edw/feature/StripWorkspaceDocs
Update userguide docs for strip_workspace_*.
2018-11-13 10:24:11 +01:00
Connor E 3463406df7 Update userguide docs for strip_workspace_*. 2018-11-13 08:46:16 +00:00
Orestis Floros d2d6d6e0a8
Re-render floating cons alone when possible 2018-11-12 19:05:51 +02:00
Orestis Floros 100d05a2a6
render_con: Get rid of render_fullscreen argument
Only true for the fullscreen container and doesn't affect any of its
children. Thus, we can get the same result by checking
->fullscreen_mode.
2018-11-12 19:05:50 +02:00
Orestis Floros 29f2510fa9
Fix aspect ratio bugs
- ICCCM says: > If a base size is not provided, the minimum size is to
be used in its place and vice versa.
i3 didn't obey the "vice versa" part. Min size and base size are both
saved without replacements in window_update_normal_hints,
floating_check_size makes the needed replacements if either was not
provided.
- Aspect ratio is now saved correctly in manage_window because
window_update_normal_hints is called.
- i3 didn't save the aspect ratio if the window conformed the given
aspect ratio range when handle_normal_hints was called. If the window
was resized to a size outside of the given bounds, i3 didn't correct it.
- Aspect ratio now affects only tiling windows, like the rest of the
normal size hints
- The aspect ratio calculation is now done without a loop

A real life example of how these changes affect the workflow:
An mpv window, when playing a video, sets its min == max aspect ratio
during mapping. i3 ignored these hints. When resized, the window's
aspect ratio was not preserved. With this commit, resizing floating mpv
windows will always preserve the aspect ratio.
2018-11-12 18:45:00 +02:00
Orestis Floros f397698d43
floating_resize: Use uint32_t 2018-11-12 18:45:00 +02:00
Orestis Floros 01960f956f
floating_check_size: Use window variable 2018-11-12 18:44:45 +02:00
Ingo Bürk 90c39a4bf6
Merge pull request #3484 from xzfc/3476-export-i3sock
Export I3SOCK
2018-11-10 22:12:01 +01:00
Ingo Bürk 56bb806b52
Merge pull request #3397 from orestisf1993/randr-enable-disable
Fix bugs in enabling & disabling randr outputs
2018-11-10 21:56:34 +01:00
Ingo Bürk cf553ce31e
Merge pull request #3516 from orestisf1993/truncate-utf8
Truncate wm_name utf8 strings to first zero byte
2018-11-09 21:01:57 +01:00
Orestis Floros 11bc25b70b
Truncate wm_name utf8 strings to first zero byte
Fixes #3515
2018-11-09 19:42:32 +02:00
Orestis 665b16807f
Merge pull request #3511 from aksel/247-gaps-resize-fix
For resizing, convert pixel diff to percentage, based on parent.
2018-11-09 00:31:06 +02:00
aksel bbfa140c0f For resizing, convert pixel diff to percentage, based on parent.
Previously, it first calculated one of the containers' next percentage, and then subtracted the previous percentage to find the actual change.

Now it directly calculates the change, and subtracts and adds the change to the two affected containers.

Added util function con_rect_size_in_orientation.

Removed px_resize_to_percent; inlined, using con_rect_size_in_orientation.

Also, prematurely return when pixel diff is 0, as no action is necessary.

This is related to [this issue on i3-gaps](https://github.com/Airblader/i3/issues/247).
2018-11-08 23:15:23 +01:00
Ingo Bürk 44e8fddc28
Merge pull request #2954 from orestisf1993/swap-for-floating
Rewrite con_swap to work only with queue operations
2018-11-07 13:13:41 +00:00
Ingo Bürk 4e1c20c871
Merge pull request #3508 from orestisf1993/load_layout-marks
load_layout: Correctly mark non-leaf containers
2018-11-07 07:11:21 +00:00
Orestis Floros eb53ec83b9
load_layout: Correctly mark non-leaf containers
Example problematic layout:
    {
        "layout": "splith",
        "marks": ["H1"],
        "nodes": [
            {
                "swallows": [
                    {
                        "class": "^a$"
                    }
                ]
            }
        ]
    }

Since the marks were added to the json_node during end_map, the
container that ended up getting the "H1" mark was the child instead of
the parent.
2018-11-07 02:32:12 +02:00
Ingo Bürk 3649ecb71e
Merge pull request #3482 from hamishimac/next
Do not assume STDIN_FILENO is available for input from child
2018-11-05 22:32:54 +01:00
Ingo Bürk 21cbb1000d
Merge pull request #3504 from Foxboron/morten/i3-man-path
Change config order in manpage
2018-11-05 22:32:27 +01:00
Ingo Bürk 584ca21032
Merge pull request #3485 from xzfc/3412-outer-border
Draw outer header borders for all layouts
2018-11-05 22:31:35 +01:00
Orestis f4a1482000
Merge pull request #3505 from stapelberg/release-docs
release.sh: save docs first
2018-11-05 20:45:59 +02:00
Michael Stapelberg 3a3f0f18e6 release.sh: save docs first
Otherwise, as @orestisf1993 pointed out, the saved documentation will have the
wrong version number.
2018-11-05 19:32:29 +01:00
Albert Safin 7926c817a2 Draw outer header borders for all layouts 2018-11-05 20:17:01 +07:00
Morten Linderud e3ad800902
Change config order in manpage
This brings the headline for the configuration files inline with the
recent move to XDG directories.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2018-11-05 14:15:07 +01:00
Ingo Bürk 6e998cf4e3
Merge pull request #3499 from orestisf1993/docs
userguide: break long comment
2018-11-04 15:53:15 +01:00
Michael Stapelberg 07e5747c8c travis: move (failing) ubuntu build from xenial to bionic
Ubuntu’s apt started refusing to load package files from unauthenticated
repositories, but the package for which we did that (xcb-xrm) is available in
newer versions of Ubuntu, so I just removed that part altogether.

Apparently this has been broken since April, and nobody noticed :-/
2018-11-04 15:24:10 +01:00
Michael Stapelberg 86bcb21dbc update release.sh for the 4.16 release 2018-11-04 15:07:24 +01:00
Michael Stapelberg cb09db94dc update debian/changelog 2018-11-04 14:55:50 +01:00
Michael Stapelberg e6f2255ed2 Update debian/changelog 2018-11-04 14:47:46 +01:00
Michael Stapelberg 3ae8a45c56 Merge branch 'release-4.16' 2018-11-04 14:47:46 +01:00
Michael Stapelberg 1847938d4e Merge branch 'next' into master 2018-11-04 14:47:46 +01:00
Michael Stapelberg a26a342b35 Set non-git version to 4.16-non-git. 2018-11-04 14:47:46 +01:00
Michael Stapelberg d617f71b22 release i3 4.16 2018-11-04 14:47:34 +01:00
Orestis Floros af10b710bf
userguide: break long comment 2018-11-04 12:23:45 +02:00
Orestis dc16df439e Update ewmh focused only when new focus is different (#3496)
Fixes #3495.
2018-11-03 13:39:49 +01:00
Orestis a0105dd2f2
Merge pull request #3497 from stapelberg/clang-format
switch to clang-format-4.0
2018-11-03 10:42:50 +02:00
Michael Stapelberg eedb257655 switch to clang-format-4.0
clang-format-3.8 is old enough to have vanished from Debian testing, which we
use for our CI.
2018-11-03 09:16:16 +01:00