Commit Graph

6312 Commits

Author SHA1 Message Date
Ingo Bürk cb6da7169a
Merge pull request #3389 from orestisf1993/resize-ensure-1px
Ensure containers have a size of at least 1px after resize
2018-09-06 08:41:00 +02:00
Ingo Bürk 9edb7c7a3b
Merge pull request #3390 from orestisf1993/resize-tile
resize set for tiling: default to px when not specified
2018-09-06 08:38:53 +02:00
Ingo Bürk 7257c3b528
Merge pull request #3388 from orestisf1993/cmd_rename_workspace
cmd_rename_workspace: correct order of events
2018-09-06 08:38:03 +02:00
Orestis Floros 64142eeef2
resize set for tiling: default to px when not specified 2018-09-06 05:58:51 +03:00
Orestis Floros 23c1c13d34
Ensure containers have a size of at least 1px after resize
Fixes #2226.
Fixes #2776.
Fixes #3241.
Related to #3194.
2018-09-06 04:56:31 +03:00
Orestis Floros 6846ac98c0
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.
2018-09-06 03:42:07 +03:00
Orestis Floros 7c3c50c5cc
Improve comment from #3245 2018-09-06 03:42:06 +03:00
Michael Stapelberg 09683d21a9
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.
2018-08-31 08:59:08 -06:00
Ingo Bürk 9595263142
Merge pull request #3376 from orestisf1993/floating-disable-scratchpad
Don't disable floating in internal workspaces
2018-08-28 13:30:57 +02:00
Orestis Floros 9718e38a7a
Don't disable floating in internal workspaces 2018-08-28 11:26:20 +03:00
Ingo Bürk f454a5c2dd
Merge pull request #3375 from orestisf1993/ipc_client_timeout
ipc_client_timeout: Fix build when not on linux
2018-08-28 10:20:45 +02:00
Orestis Floros 37b879f4ad
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
2018-08-27 22:21:59 +03:00
Ingo Bürk 08a53611f9
Merge pull request #3374 from orestisf1993/startup-notification
Support startup-notification in i3-nagbar & i3-config-wizard
2018-08-27 11:19:26 +02:00
Orestis Floros bf1cb39b4b
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
4cba9fcbda/etc/config (L150)
2. i3-config-wizard
4cba9fcbda/etc/config (L194)

A user that opens i3 for the first time will be greeted with a "loading"
cursor because of i3-config-wizard.
2018-08-25 14:54:16 +03:00
Orestis Floros a8b90317a0
i3-config-wizard: fix small memleak 2018-08-25 14:54:16 +03:00
Ingo Bürk 4cba9fcbda
Merge pull request #3368 from orestisf1993/render_root
(floating) global fullscreen bugs & others
2018-08-24 09:49:41 +02:00
Ingo Bürk 9a53d65e18
Merge pull request #3372 from orestisf1993/direction
Resize tile px
2018-08-24 09:43:20 +02:00
Orestis Floros 096cff0aad
Make resize set ppt more accurate
See the testcase for the usecase.
2018-08-24 04:13:25 +03:00
Orestis Floros 51d230ad4c
Make resize set px work with tiling containers 2018-08-24 04:13:25 +03:00
Orestis Floros f28c50b631
541-resize-set-tiling.t: fix "my" variable mask warnings 2018-08-24 04:13:25 +03:00
Orestis Floros 423e20b960
cmd_resize* statics: remove useless 'way' argument 2018-08-24 04:13:25 +03:00
Orestis Floros 26bbaf6237
Make cmd_resize_tiling_width_height work with pixels 2018-08-24 04:13:25 +03:00
Orestis Floros 2ead7745d6
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.
2018-08-24 04:13:03 +03:00
Orestis Floros ea43507bed
precalculate_sizes: don't malloc needlessly 2018-08-24 04:12:24 +03:00
Orestis Floros 7b9318a541
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.
2018-08-24 04:12:14 +03:00
Orestis Floros db294f4505
Improve resize_graphical_handler code style
- int return type is not useful
- Consistent comment style
2018-08-23 22:04:22 +03:00
Orestis Floros 9522b46f1b
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.
2018-08-23 15:45:24 +03:00
Orestis Floros 6e1b79e057
Introduce orientation_from_direction 2018-08-23 15:36:23 +03:00
Ingo Bürk 72cc719c5d
Merge pull request #3369 from orestisf1993/clang-format
Apply compatible changes from clang-format 6.0.1
2018-08-22 20:29:32 +02:00
Orestis Floros e6202d43f5
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.
2018-08-22 14:51:17 +03:00
Orestis Floros e1a83d057f
handle_configure_request: check for scratchpad once 2018-08-22 14:23:01 +03:00
Orestis Floros 9190a9ab70
handle_configure_request: use 'goto out' 2018-08-22 14:11:26 +03:00
Orestis Floros 9ae84593ba
handle_configure_request: reuse 'workspace' variable 2018-08-22 14:10:42 +03:00
Orestis Floros 0ac75bea5a
con_border_style: check con->fullscreen_mode directly 2018-08-22 14:09:05 +03:00
Orestis Floros efc78de4ee
Introduce con_get_fullscreen_covering_ws
This commit will also fix the following bugs:
1. click.c: Users could drag global fullscreen floating containers.
2. render.c: Floating containers would get rendered with a global fullscreen container in another
workspace.
2018-08-22 14:05:50 +03:00
Orestis Floros b3e69ed12a
render_root: fix popup_during_fullscreen logic
The first issue is that there seems to be a typo: fullscreen->window
should have been child->window. The corrected check is redundant since
the while loop checks if the transient_con has a window.

The second issue is that popup_during_fullscreen is never checked even
though the behaviour should be exclusive to the "smart" option.
2018-08-22 03:45:35 +03:00
Ingo Bürk 2f3c8b6484
Merge pull request #3365 from orestisf1993/DRAG_REVERT
floating_drag_window: return on DRAG_REVERT
2018-08-21 20:39:26 +02:00
Ingo Bürk e906cdad66
Merge pull request #3366 from orestisf1993/NUM_HANDLERS
property_notify: use NUM_HANDLERS
2018-08-21 20:38:31 +02:00
Ingo Bürk 6d3fc089f9
Merge pull request #3367 from orestisf1993/dragloop_callback
Call dragloop callback on DRAG_SUCCESS
2018-08-21 20:37:56 +02:00
Orestis Floros 2c78f2458c
Call dragloop callback on DRAG_SUCCESS
A race condition is possible. For example, if we first receive a
XCB_MOTION_NOTIFY event and then, while drain_drag_events is still
running, a XCB_BUTTON_RELEASE event the first event is never handled
because we return.

This fixes the flakiness of the tests in #3085.
2018-08-21 21:19:57 +03:00
Orestis Floros 5d89bd344f
floating_drag_window: return on DRAG_REVERT
Right now tree_render() is called twice on DRAG_REVERT since
floating_reposition calls it.
Also, on DRAG_REVERT the scratchpad state shouldn't change since the
user canceled the action.
2018-08-21 21:06:00 +03:00
Orestis Floros b1aa2fb1c4
property_notify: use NUM_HANDLERS 2018-08-21 21:04:46 +03:00
Ingo Bürk e8dee4308a
Merge pull request #3364 from orestisf1993/warp-randr_query
randr_query_outputs: con_activate -> workspace_show
2018-08-17 11:55:15 +02:00
Orestis Floros 789a09a6e7
Use con_focus instead of con_activate for workspace 2018-08-17 12:49:34 +03:00
Orestis Floros ba29290123
Typo: output -> content 2018-08-17 12:49:34 +03:00
Orestis Floros 7010644964
randr_query_outputs: con_activate -> workspace_show
workspace_show will call x_set_warp_to if needed.

Fixes #3333
2018-08-17 12:49:15 +03:00
Ingo Bürk 2d3c2f0615
Merge pull request #3363 from orestisf1993/regress-scratchpad-focus
Call con_activate after moving scratchpad window to current ws
2018-08-17 11:42:29 +02:00
Orestis Floros cac28b69d4
Call con_activate after moving scratchpad window to current ws
Fixes #3361
2018-08-17 12:34:20 +03:00
Ingo Bürk 4b3ff9cdd4
Merge pull request #3353 from orestisf1993/free_ws_assignments
Free ws_assignments on reload
2018-08-09 16:49:21 +02:00
Orestis Floros 01e971b51e
Free ws_assignments on reload
This fixes an unreported bug where deleting a workspace assignment and
reloading the config file would keep the assignment.
2018-08-09 17:28:05 +03:00