]> git.sur5r.net Git - i3/i3/log
i3/i3
6 years agoUse open_floating_window arguments for rect
Orestis Floros [Wed, 10 Oct 2018 12:26:04 +0000 (15:26 +0300)]
Use open_floating_window arguments for rect

6 years agomanage_window: cleaner variable declarations
Orestis Floros [Thu, 4 Oct 2018 12:29:18 +0000 (15:29 +0300)]
manage_window: cleaner variable declarations

6 years agoborders_to_hide doesn't need to be initialized
Orestis Floros [Thu, 4 Oct 2018 12:02:37 +0000 (15:02 +0300)]
borders_to_hide doesn't need to be initialized

6 years agoroot is externally declared
Orestis Floros [Wed, 3 Oct 2018 13:20:46 +0000 (16:20 +0300)]
root is externally declared

6 years agoUse lround instead of (long)round
Orestis Floros [Wed, 3 Oct 2018 13:20:25 +0000 (16:20 +0300)]
Use lround instead of (long)round

6 years agoMake comment style more consistent
Orestis Floros [Sat, 21 Apr 2018 10:02:14 +0000 (13:02 +0300)]
Make comment style more consistent

6 years agoFix missing prototypes
Orestis Floros [Fri, 20 Apr 2018 23:28:31 +0000 (02:28 +0300)]
Fix missing prototypes

i3 will now compile with no warnings when -Wmissing-prototypes is used.

6 years agoEnforce strict prototypes
Orestis Floros [Fri, 20 Apr 2018 23:00:10 +0000 (02:00 +0300)]
Enforce strict prototypes

i3 will now compile with no warnings when -Wstrict-prototypes is used.

6 years agoUse path_exists
Orestis Floros [Wed, 1 Aug 2018 15:12:55 +0000 (18:12 +0300)]
Use path_exists

6 years agoReduce some code around frees
Orestis Floros [Wed, 1 Aug 2018 15:08:26 +0000 (18:08 +0300)]
Reduce some code around frees

6 years agoMerge pull request #3454 from alanbarr/cppcheck_fixes_2
Orestis [Sat, 13 Oct 2018 18:07:17 +0000 (21:07 +0300)]
Merge pull request #3454 from alanbarr/cppcheck_fixes_2

Cppcheck Fixes

6 years agoFixes for undefined behaviour on signed shift (#3453)
Alan Barr [Sat, 13 Oct 2018 18:04:40 +0000 (19:04 +0100)]
Fixes for undefined behaviour on signed shift (#3453)

Fixes for undefined behaviour on signed shift

Change literal 1 to unsigned to allow safe bitshift of 31.
Caught by cppcheck.

Make 0xFF unsigned to prevent a left shift into signed bit.
Spotted by @orestisf1993

6 years agoTypecast void* before doing pointer arithmetic 3454/head
Alan Barr [Sat, 13 Oct 2018 15:49:41 +0000 (16:49 +0100)]
Typecast void* before doing pointer arithmetic

Caught by cppcheck

6 years agoRemove redundant NULL check
Alan Barr [Thu, 11 Oct 2018 22:28:30 +0000 (23:28 +0100)]
Remove redundant NULL check

copy has been used before this point - so it is too late to be concerned
about a NULL pointer now.

This is OK as sstrdup() calls err() on NULL return from the underlying
strdup() call.

Raised by cppcheck.

6 years agoi3-nagbar: add option for button that runs commands without a terminal (#3258)
Orestis [Sun, 7 Oct 2018 20:43:24 +0000 (23:43 +0300)]
i3-nagbar: add option for button that runs commands without a terminal (#3258)

Fixes #2199.

6 years agoMerge pull request #3441 from stapelberg/template
Orestis [Sun, 7 Oct 2018 19:09:28 +0000 (22:09 +0300)]
Merge pull request #3441 from stapelberg/template

add specific GitHub issue templates

6 years agoMerge pull request #3440 from stapelberg/disable
Orestis [Sun, 7 Oct 2018 19:02:43 +0000 (22:02 +0300)]
Merge pull request #3440 from stapelberg/disable

configure.ac: add conditionals for building docs/mans

6 years agoadd specific GitHub issue templates 3441/head
Michael Stapelberg [Sun, 7 Oct 2018 18:41:42 +0000 (20:41 +0200)]
add specific GitHub issue templates

I learnt about this from the GitHub blog:
https://blog.github.com/2018-05-02-issue-template-improvements/

6 years agoresolve_tilde: strncpy + strlen is pointless (#3436)
Orestis [Sun, 7 Oct 2018 18:26:37 +0000 (21:26 +0300)]
resolve_tilde: strncpy + strlen is pointless (#3436)

strlen already assumes that the string is NULL-terminated.

Like in https://github.com/i3/i3status/pull/312 but for whatever reason
gcc didn't warn about this here.

6 years agouserguide: Mention know issues for assign (#3434)
Orestis [Sun, 7 Oct 2018 18:24:09 +0000 (21:24 +0300)]
userguide: Mention know issues for assign (#3434)

Fixes #3222
Fixes #3293
Related to #2060

6 years agoconfigure.ac: add conditionals for building docs/mans 3440/head
Michael Stapelberg [Sun, 7 Oct 2018 18:09:35 +0000 (20:09 +0200)]
configure.ac: add conditionals for building docs/mans

fixes #3378

6 years agoMerge pull request #3435 from vivien/i3-msg/subscribe
Orestis [Fri, 5 Oct 2018 09:16:04 +0000 (12:16 +0300)]
Merge pull request #3435 from vivien/i3-msg/subscribe

i3-msg/subscribe

6 years agoi3-msg: add support for SUBSCRIBE message type 3435/head
Vivien Didelot [Fri, 5 Sep 2014 20:47:27 +0000 (16:47 -0400)]
i3-msg: add support for SUBSCRIBE message type

If i3-msg is invoked with -t subscribe, it will wait for the first event
matching the given payload, before exiting.

For instance, get the number of the next focused workspace with:

    i3-msg -t subscribe '[ "workspace" ]' | jshon -e current -e num

Like inotifywait, the -m flag allows to wait indefinitely for events,
instead of exiting right after receiving the first one.

For example, continuously monitor the names of focused windows with:

    i3-msg -t subscribe -m '[ "window" ]' | jq .container.name

6 years agoi3-msg: check reply in quiet mode
Vivien Didelot [Tue, 2 Oct 2018 22:13:06 +0000 (18:13 -0400)]
i3-msg: check reply in quiet mode

i3-msg currently exits right after sending the IPC message if the quiet
flag is set. This means that if an error occurred when issuing a
command, e.g. "i3-msg -q foobar", it gets silently ignored.

What we really want is to just skip printing but still check the reply.

At the same time, explicitly print the reply when we need to, instead of
using an exit label.

6 years agoMerge pull request #3430 from Synray/aspect_ratio
Orestis [Tue, 2 Oct 2018 00:04:21 +0000 (03:04 +0300)]
Merge pull request #3430 from Synray/aspect_ratio

[RFC] Correctly calculate max_aspect

6 years agoCorrectly calculate max_aspect 3430/head
Thomas Fischer [Sat, 29 Sep 2018 00:34:18 +0000 (17:34 -0700)]
Correctly calculate max_aspect

6 years agoMerge pull request #3415 from orestisf1993/g_utf8_make_valid
Michael Stapelberg [Fri, 28 Sep 2018 16:00:06 +0000 (18:00 +0200)]
Merge pull request #3415 from orestisf1993/g_utf8_make_valid

Check g_utf8_make_valid availability

6 years agoMerge pull request #3424 from orestisf1993/con_num_windows
Ingo Bürk [Fri, 28 Sep 2018 07:27:58 +0000 (09:27 +0200)]
Merge pull request #3424 from orestisf1993/con_num_windows

con_num_windows: Count floating windows

6 years agocon_num_windows: Count floating windows 3424/head
Orestis Floros [Wed, 26 Sep 2018 16:56:55 +0000 (19:56 +0300)]
con_num_windows: Count floating windows

Fixes #3423.

6 years agoMerge pull request #3421 from Streetwalrus/iconic-state
Ingo Bürk [Wed, 26 Sep 2018 07:07:16 +0000 (09:07 +0200)]
Merge pull request #3421 from Streetwalrus/iconic-state

Reject requests for WM_STATE_ICONIC

6 years agoReject requests for WM_STATE_ICONIC 3421/head
Dan Elkouby [Tue, 25 Sep 2018 11:45:05 +0000 (14:45 +0300)]
Reject requests for WM_STATE_ICONIC

For compatiblity reasons, Wine will request iconic state and cannot
ensure that the WM has agreed on it; immediately revert to normal to
avoid being stuck in a paused state.

6 years agoProvide g_utf8_make_valid if not available 3415/head
Orestis Floros [Thu, 20 Sep 2018 22:50:51 +0000 (01:50 +0300)]
Provide g_utf8_make_valid if not available

See #3415 for licensing discussion.

Fixes Airblader/i3#236

6 years agoFix typo: terminaison -> termination
Orestis Floros [Thu, 20 Sep 2018 10:02:54 +0000 (13:02 +0300)]
Fix typo: terminaison -> termination

6 years agoMerge pull request #3420 from orestisf1993/sncontext==NULL-3419
Ingo Bürk [Sun, 23 Sep 2018 18:12:16 +0000 (20:12 +0200)]
Merge pull request #3420 from orestisf1993/sncontext==NULL-3419

i3-nagbar & i3-config-wizard: check sncontext != NULL

6 years agoi3-nagbar & i3-config-wizard: check sncontext != NULL 3420/head
Orestis Floros [Sun, 23 Sep 2018 14:02:21 +0000 (17:02 +0300)]
i3-nagbar & i3-config-wizard: check sncontext != NULL

From
https://github.com/freedesktop/startup-notification/blob/07237ff25d6171e1b548118442ddba4259a53ba5/libsn/sn-common.c#L87-L171
it appears that SnDisplay can't be NULL, so I skipped the check.

Fixes #3419

6 years agoMerge pull request #3416 from orestisf1993/530-bug-2229.t
Ingo Bürk [Thu, 20 Sep 2018 16:52:33 +0000 (18:52 +0200)]
Merge pull request #3416 from orestisf1993/530-bug-2229.t

530-bug-229.t: Get rid of smartmatch

6 years ago530-bug-229.t: Get rid of smartmatch 3416/head
Orestis Floros [Thu, 20 Sep 2018 16:37:50 +0000 (19:37 +0300)]
530-bug-229.t: Get rid of smartmatch

6 years agoMerge pull request #3400 from Synray/next
Orestis [Thu, 20 Sep 2018 08:36:22 +0000 (11:36 +0300)]
Merge pull request #3400 from Synray/next

Respect max size from WM_NORMAL_HINTS

6 years agoRespect max size in WM_NORMAL_HINTS 3400/head
Thomas Fischer [Thu, 13 Sep 2018 23:16:45 +0000 (16:16 -0700)]
Respect max size in WM_NORMAL_HINTS

6 years agoMerge pull request #3408 from orestisf1993/__focused__-crash
Ingo Bürk [Wed, 19 Sep 2018 12:42:28 +0000 (14:42 +0200)]
Merge pull request #3408 from orestisf1993/__focused__-crash

match_matches_window: Check if focused->window exists

6 years agoMerge pull request #3410 from orestisf1993/min_width
Ingo Bürk [Mon, 17 Sep 2018 14:06:27 +0000 (16:06 +0200)]
Merge pull request #3410 from orestisf1993/min_width

docs/i3bar-protocol: Mention skipping blocks with empty full_text

6 years agoMerge pull request #3386 from orestisf1993/click-event
Ingo Bürk [Sun, 16 Sep 2018 13:48:36 +0000 (15:48 +0200)]
Merge pull request #3386 from orestisf1993/click-event

Fix "relative_x" and "width" of click events

6 years agodocs/i3bar-protocol: Mention skipping blocks with empty full_text 3410/head
Orestis Floros [Sun, 16 Sep 2018 12:04:20 +0000 (15:04 +0300)]
docs/i3bar-protocol: Mention skipping blocks with empty full_text

Closes #3405.

6 years agoFix "relative_x" and "width" of click events 3386/head
Orestis Floros [Wed, 5 Sep 2018 23:21:10 +0000 (02:21 +0300)]
Fix "relative_x" and "width" of click events

Now clicks begin at the start of the "actual" block, offsets and
separators don't trigger click events. The width property is now just
the width of the block, including border.

Fixes #3380.

6 years agomatch_matches_window: Check if focused->window exists 3408/head
Orestis Floros [Sat, 15 Sep 2018 09:07:10 +0000 (12:07 +0300)]
match_matches_window: Check if focused->window exists

Fixes #3406.

6 years agoMerge pull request #3409 from orestisf1993/sb_hoff_px
Ingo Bürk [Sun, 16 Sep 2018 09:11:47 +0000 (11:11 +0200)]
Merge pull request #3409 from orestisf1993/sb_hoff_px

i3bar: Include sb_hoff_px only when needed

6 years agoi3bar: Include sb_hoff_px only when needed 3409/head
Orestis Floros [Sat, 15 Sep 2018 10:27:18 +0000 (13:27 +0300)]
i3bar: Include sb_hoff_px only when needed

Fixes #3404.

6 years agoMerge pull request #3403 from orestisf1993/issue-3402
Ingo Bürk [Fri, 14 Sep 2018 13:17:13 +0000 (15:17 +0200)]
Merge pull request #3403 from orestisf1993/issue-3402

_con_move_to_con: Move upwards only on CT_FLOATING_CON

6 years ago_con_move_to_con: Move upwards only on CT_FLOATING_CON 3403/head
Orestis Floros [Fri, 14 Sep 2018 13:09:45 +0000 (16:09 +0300)]
_con_move_to_con: Move upwards only on CT_FLOATING_CON

If target is inside a floating container but not its direct child, the
move can be completed as is.

Fixes #3402.

6 years agoMerge pull request #3401 from orestisf1993/dump-asy-floating
Ingo Bürk [Fri, 14 Sep 2018 11:29:07 +0000 (13:29 +0200)]
Merge pull request #3401 from orestisf1993/dump-asy-floating

dump-asy.pl: Include floating_nodes

6 years agodump-asy.pl: Include floating_nodes 3401/head
Orestis Floros [Fri, 14 Sep 2018 11:04:54 +0000 (14:04 +0300)]
dump-asy.pl: Include floating_nodes

6 years agoMerge pull request #3342 from orestisf1993/tree_close_internal
Ingo Bürk [Fri, 14 Sep 2018 10:24:54 +0000 (12:24 +0200)]
Merge pull request #3342 from orestisf1993/tree_close_internal

Simplify tree_close_internal

6 years agoMerge pull request #3399 from orestisf1993/156-fullscreen-focus
Ingo Bürk [Fri, 14 Sep 2018 06:19:00 +0000 (08:19 +0200)]
Merge pull request #3399 from orestisf1993/156-fullscreen-focus

Make t/156-fullscreen-focus.t easier to work with

6 years agoMerge pull request #3398 from orestisf1993/i3-save-tree
Ingo Bürk [Fri, 14 Sep 2018 06:18:32 +0000 (08:18 +0200)]
Merge pull request #3398 from orestisf1993/i3-save-tree

i3-save-tree: Exclude unsupported "transient_for" property

6 years agoMake t/156-fullscreen-focus.t easier to work with 3399/head
Orestis Floros [Thu, 13 Sep 2018 11:09:35 +0000 (14:09 +0300)]
Make t/156-fullscreen-focus.t easier to work with

- Add routine that will refocus the expected window on test failure.
Thus, failure on one test will not make others fail.
- Remove some redundant commands, prefer fresh_workspace for screen
changing.
- Kill previous windows between sections if the next section does not
depend on the previous layout.

6 years agoi3-save-tree: Exclude unsupported "transient_for" property 3398/head
Orestis Floros [Wed, 12 Sep 2018 11:11:08 +0000 (14:11 +0300)]
i3-save-tree: Exclude unsupported "transient_for" property

Even if i3 supported matching windows through "transient_for", it
wouldn't be useful for the purpose of i3-save-tree.

6 years agoMerge pull request #3395 from lousyd/next
Ingo Bürk [Wed, 12 Sep 2018 08:24:30 +0000 (10:24 +0200)]
Merge pull request #3395 from lousyd/next

clarify JSON standard non-compliance

6 years agoMerge pull request #3396 from orestisf1993/commands
Ingo Bürk [Wed, 12 Sep 2018 08:24:06 +0000 (10:24 +0200)]
Merge pull request #3396 from orestisf1993/commands

commands.c: Improve error replies

6 years agocommands.c: Improve error replies 3396/head
Orestis Floros [Tue, 11 Sep 2018 04:44:40 +0000 (07:44 +0300)]
commands.c: Improve error replies

- Improve / add various error messages.
- Replace all `LOG(…); ysuccess(false);` with `yerror(…);`.
- switch_mode: Remove redundant "ERROR:" ELOG string.
- cmd_move_con_to_workspace*: Make sure that we don't try to move an
empty workspace to another workspace. This can be problematic when we
match a workspace using command criteria (eg marks) and the target is a
non-existing workspace. We create the new workspace but since nothing is
moved there, we are left with an empty workspace. See added testcase.

6 years agoclarify JSON standard non-compliance 3395/head
Todd Walton [Mon, 10 Sep 2018 20:31:25 +0000 (16:31 -0400)]
clarify JSON standard non-compliance

Modified section on the layout file's non-compliance with the JSON
standard. The section previously stated that having multiple top-level
JSON texts is non-compliant. This isn't the case. It's just that most
JSON parsers will treat that as if it is non-compliant.

6 years agoMerge pull request #3394 from orestisf1993/validate-utf8
Michael Stapelberg [Mon, 10 Sep 2018 07:00:54 +0000 (09:00 +0200)]
Merge pull request #3394 from orestisf1993/validate-utf8

 libi3: validate UTF8 strings

6 years agolibi3: validate UTF8 strings 3394/head
Orestis Floros [Sun, 9 Sep 2018 12:32:54 +0000 (15:32 +0300)]
libi3: validate UTF8 strings

Will validate container / window titles.

Fixes #3156.

6 years agotree_restore: Check croot
Orestis Floros [Sun, 9 Sep 2018 13:09:39 +0000 (16:09 +0300)]
tree_restore: Check croot

Related to #2414, #3156.

6 years agoMerge pull request #3391 from orestisf1993/yajl-utf8
Ingo Bürk [Thu, 6 Sep 2018 12:15:54 +0000 (14:15 +0200)]
Merge pull request #3391 from orestisf1993/yajl-utf8

tree_append_json: Allow strings that are not valid UTF8

6 years agotree_append_json: Allow strings that are not valid UTF8 3391/head
Orestis Floros [Thu, 6 Sep 2018 11:54:27 +0000 (14:54 +0300)]
tree_append_json: Allow strings that are not valid UTF8

Fixes #3156.

I couldn't reproduce the problem in a "natural" way so I cheated:
1. Start i3 with gdb
2. Set breakpoing on tree_restore
3. Run, open window, i3-msg restart
5. Open the file in *path with a hex editor
6. Edit the "name" field of the window and insert bytes that are not
valid UTF8
7. Continue

After parsing fails, all nodes including croot are incomplete, meaning
they have to be deleted. We can't recover in any reasonable way so we
have to allow non-UTF8 characters to avoid this situation altogether.

6 years agotree_append_json: don't focus freed container
Orestis Floros [Thu, 6 Sep 2018 11:48:21 +0000 (14:48 +0300)]
tree_append_json: don't focus freed container

6 years agoMerge pull request #3389 from orestisf1993/resize-ensure-1px
Ingo Bürk [Thu, 6 Sep 2018 06:41:00 +0000 (08:41 +0200)]
Merge pull request #3389 from orestisf1993/resize-ensure-1px

Ensure containers have a size of at least 1px after resize

6 years agoMerge pull request #3390 from orestisf1993/resize-tile
Ingo Bürk [Thu, 6 Sep 2018 06:38:53 +0000 (08:38 +0200)]
Merge pull request #3390 from orestisf1993/resize-tile

resize set for tiling: default to px when not specified

6 years agoMerge pull request #3388 from orestisf1993/cmd_rename_workspace
Ingo Bürk [Thu, 6 Sep 2018 06:38:03 +0000 (08:38 +0200)]
Merge pull request #3388 from orestisf1993/cmd_rename_workspace

cmd_rename_workspace: correct order of events

6 years agoresize set for tiling: default to px when not specified 3390/head
Orestis Floros [Thu, 6 Sep 2018 02:58:51 +0000 (05:58 +0300)]
resize set for tiling: default to px when not specified

6 years agoEnsure containers have a size of at least 1px after resize 3389/head
Orestis Floros [Thu, 6 Sep 2018 01:56:31 +0000 (04:56 +0300)]
Ensure containers have a size of at least 1px after resize

Fixes #2226.
Fixes #2776.
Fixes #3241.
Related to #3194.

6 years agocmd_rename_workspace: correct order of events 3388/head
Orestis Floros [Thu, 6 Sep 2018 00:11:47 +0000 (03:11 +0300)]
cmd_rename_workspace: correct order of events

1. Rename happens
2. Workspace is moved because of assignments
3. Workspace closes because it is empty (#3248)

Fixes #3248.

6 years agoImprove comment from #3245
Orestis Floros [Thu, 6 Sep 2018 00:38:45 +0000 (03:38 +0300)]
Improve comment from #3245

6 years agoconfigure.ac: fix AC_SEARCH_LIBS([shm_open]) for static linking (#3379)
Michael Stapelberg [Fri, 31 Aug 2018 14:59:08 +0000 (08:59 -0600)]
configure.ac: fix AC_SEARCH_LIBS([shm_open]) for static linking (#3379)

Without specifying -pthread, the conftest fails and -lrt is missing during
compilation of i3, resulting in a failing build.

6 years agoMerge pull request #3376 from orestisf1993/floating-disable-scratchpad
Ingo Bürk [Tue, 28 Aug 2018 11:30:57 +0000 (13:30 +0200)]
Merge pull request #3376 from orestisf1993/floating-disable-scratchpad

Don't disable floating in internal workspaces

6 years agoDon't disable floating in internal workspaces 3376/head
Orestis Floros [Tue, 28 Aug 2018 07:26:07 +0000 (10:26 +0300)]
Don't disable floating in internal workspaces

6 years agoMerge pull request #3375 from orestisf1993/ipc_client_timeout
Ingo Bürk [Tue, 28 Aug 2018 08:20:45 +0000 (10:20 +0200)]
Merge pull request #3375 from orestisf1993/ipc_client_timeout

ipc_client_timeout: Fix build when not on linux

6 years agoipc_client_timeout: Fix build when not on linux 3375/head
Orestis Floros [Mon, 27 Aug 2018 19:19:36 +0000 (22:19 +0300)]
ipc_client_timeout: Fix build when not on linux

Also moved the 'end' label because it is unused otherwise.

Reported here: https://github.com/Airblader/i3/issues/233

6 years agoMerge pull request #3374 from orestisf1993/startup-notification
Ingo Bürk [Mon, 27 Aug 2018 09:19:26 +0000 (11:19 +0200)]
Merge pull request #3374 from orestisf1993/startup-notification

Support startup-notification in i3-nagbar & i3-config-wizard

6 years agoSupport startup-notification in i3-nagbar & i3-config-wizard 3374/head
Orestis Floros [Sat, 25 Aug 2018 11:48:14 +0000 (14:48 +0300)]
Support startup-notification in i3-nagbar & i3-config-wizard

The default i3 config uses the `exec` command without `--no-startup-id`
to launch:
1. i3-nagbar
https://github.com/i3/i3/blob/4cba9fcbdab1487459014dbf8882f5f34e61435e/etc/config#L150
2. i3-config-wizard
https://github.com/i3/i3/blob/4cba9fcbdab1487459014dbf8882f5f34e61435e/etc/config#L194

A user that opens i3 for the first time will be greeted with a "loading"
cursor because of i3-config-wizard.

6 years agoi3-config-wizard: fix small memleak
Orestis Floros [Sat, 25 Aug 2018 11:49:28 +0000 (14:49 +0300)]
i3-config-wizard: fix small memleak

6 years agoMerge pull request #3368 from orestisf1993/render_root
Ingo Bürk [Fri, 24 Aug 2018 07:49:41 +0000 (09:49 +0200)]
Merge pull request #3368 from orestisf1993/render_root

(floating) global fullscreen bugs & others

6 years agoMerge pull request #3372 from orestisf1993/direction
Ingo Bürk [Fri, 24 Aug 2018 07:43:20 +0000 (09:43 +0200)]
Merge pull request #3372 from orestisf1993/direction

Resize tile px

6 years agoMake resize set ppt more accurate 3372/head
Orestis Floros [Fri, 24 Aug 2018 00:50:23 +0000 (03:50 +0300)]
Make resize set ppt more accurate

See the testcase for the usecase.

6 years agoMake resize set px work with tiling containers
Orestis Floros [Fri, 24 Aug 2018 00:06:52 +0000 (03:06 +0300)]
Make resize set px work with tiling containers

6 years ago541-resize-set-tiling.t: fix "my" variable mask warnings
Orestis Floros [Fri, 24 Aug 2018 00:18:01 +0000 (03:18 +0300)]
541-resize-set-tiling.t: fix "my" variable mask warnings

6 years agocmd_resize* statics: remove useless 'way' argument
Orestis Floros [Fri, 24 Aug 2018 00:03:26 +0000 (03:03 +0300)]
cmd_resize* statics: remove useless 'way' argument

6 years agoMake cmd_resize_tiling_width_height work with pixels
Orestis Floros [Thu, 23 Aug 2018 23:14:11 +0000 (02:14 +0300)]
Make cmd_resize_tiling_width_height work with pixels

6 years agoMake cmd_resize_tiling_direction work with pixels
Orestis Floros [Thu, 23 Aug 2018 19:09:52 +0000 (22:09 +0300)]
Make cmd_resize_tiling_direction work with pixels

Introduces resize_neighboring_cons in resize.c which is also used by
resize_graphical_handler.

Co-authored-by: Andrew Laucius <andrewla@gmail.com>
Authored original code and tests in #3240. I rewrote most of the
resizing code and fixed the failing tests.

6 years agoprecalculate_sizes: don't malloc needlessly
Orestis Floros [Fri, 24 Aug 2018 00:02:15 +0000 (03:02 +0300)]
precalculate_sizes: don't malloc needlessly

6 years agoprecalculate_sizes: round sizes instead of flooring them
Orestis Floros [Thu, 23 Aug 2018 18:57:21 +0000 (21:57 +0300)]
precalculate_sizes: round sizes instead of flooring them

This will lead to more accurate and consistent container sizes.

Needed to fix the failing test of #3240.

6 years agoImprove resize_graphical_handler code style
Orestis Floros [Thu, 23 Aug 2018 18:04:52 +0000 (21:04 +0300)]
Improve resize_graphical_handler code style

- int return type is not useful
- Consistent comment style

6 years agoIntroduce parse_direction
Orestis Floros [Thu, 23 Aug 2018 12:36:50 +0000 (15:36 +0300)]
Introduce parse_direction

Also fixes the following bug: in the fix for #1011 in
cmd_resize_floating direction "width" is not considered.

Influenced by #3240.

6 years agoIntroduce orientation_from_direction
Orestis Floros [Thu, 23 Aug 2018 12:36:23 +0000 (15:36 +0300)]
Introduce orientation_from_direction

6 years agoMerge pull request #3369 from orestisf1993/clang-format
Ingo Bürk [Wed, 22 Aug 2018 18:29:32 +0000 (20:29 +0200)]
Merge pull request #3369 from orestisf1993/clang-format

Apply compatible changes from clang-format 6.0.1

6 years agoApply compatible changes from clang-format 6.0.1 3369/head
Orestis Floros [Wed, 22 Aug 2018 11:51:17 +0000 (14:51 +0300)]
Apply compatible changes from clang-format 6.0.1

These are the changes that clang-format 6.0.1 makes to the codebase that
clang-format-3.8 doesn't change back.

Useful for those that use a more recent version of clang-format in their
local machines.

6 years agohandle_configure_request: check for scratchpad once 3368/head
Orestis Floros [Wed, 22 Aug 2018 11:23:01 +0000 (14:23 +0300)]
handle_configure_request: check for scratchpad once

6 years agohandle_configure_request: use 'goto out'
Orestis Floros [Wed, 22 Aug 2018 11:11:26 +0000 (14:11 +0300)]
handle_configure_request: use 'goto out'

6 years agohandle_configure_request: reuse 'workspace' variable
Orestis Floros [Wed, 22 Aug 2018 11:10:42 +0000 (14:10 +0300)]
handle_configure_request: reuse 'workspace' variable

6 years agocon_border_style: check con->fullscreen_mode directly
Orestis Floros [Wed, 22 Aug 2018 11:09:05 +0000 (14:09 +0300)]
con_border_style: check con->fullscreen_mode directly