Commit Graph

3036 Commits (62279aba453382cbeb83d3d26b0e169dbb340bd8)

Author SHA1 Message Date
Ingo Bürk 62279aba45
Merge pull request #4005 from orestisfl/route_click_clutter
route_click readability improvements
2020-04-11 19:51:00 +02:00
Ingo Bürk f4b1da7f23
Merge pull request #4011 from orestisfl/floating_reposition-needs_tree_render
Call tree_render if floating move changes workspace
2020-04-11 19:50:14 +02:00
Ingo Bürk 93bb2022bb
Merge pull request #4012 from orestisfl/floating_maybe_reassign_ws_focus
floating_maybe_reassign_ws: only re-focus if previously focused
2020-04-11 19:49:53 +02:00
Ingo Bürk e47d5f6a3e
Merge pull request #4008 from orestisfl/limit-run_command-LOG
Limit log length with IPC commands
2020-04-11 19:49:24 +02:00
Ingo Bürk 1e9fbd7186
Merge pull request #4010 from orestisfl/trailing-whitespace-log
Fix trailing whitespace in a DLOG
2020-04-11 19:49:05 +02:00
Orestis Floros 5eab604a10
floating_maybe_reassign_ws: only re-focus if previously focused
Fixes #3979
2020-04-11 11:10:51 +02:00
Orestis Floros 755d306df3
Revert "floating_reposition: avoid extra tree_render"
This reverts commit 204eefc679.

workspace_show does not call tree_render
2020-04-11 11:08:55 +02:00
Orestis Floros bb8f2927ae
Call tree_render if floating move changes workspace
This fixes a bug where moving a floating container with
cmd_move_direction displays a "broken" state if the container crosses
workspace boundaries.
2020-04-11 10:52:35 +02:00
Orestis Floros e4cfb80a05
Fix trailing whitespace in a DLOG 2020-04-11 10:10:44 +02:00
Orestis Floros 964456b628
Limit log length with IPC commands
Fixes #3525
2020-04-10 16:59:46 +02:00
Orestis Floros 57a37f8af4
run_command: Update outdated docstring 2020-04-10 16:41:36 +02:00
Heman Gandhi b247896a75
Move parent nodes in scratchpad correctly (#3793)
* Move parent nodes in scratchpad across workspaces

Co-Authored-By: Orestis <orestisflo@gmail.com>
2020-04-10 16:27:40 +02:00
Ingo Bürk 312d3dfbd3
Merge pull request #4003 from orestisfl/update_desktop_properties_on_move
Update EWMH properties on workspace move
2020-04-10 14:00:26 +02:00
Orestis Floros 58d383b1a0
route_click: Remove condition that is always true
For reference:
typedef enum { CLICK_BORDER = 0,
               CLICK_DECORATION = 1,
               CLICK_INSIDE = 2 } click_destination_t;
2020-04-10 12:24:18 +02:00
Orestis Floros 07c7384272
route_click: Add some const bools for readability 2020-04-10 12:22:24 +02:00
Orestis Floros b401cc994b
Merge pull request #3954 from xzfc/floating-tiling-resize
Make floating-tiling resize code consistent with plain tiling resize
2020-04-10 12:17:26 +02:00
Orestis Floros 59108ec299
Merge pull request #3816 from sandsmark/martin/empty-matches
Match empty window properties (e. g. no title set) #3308
2020-04-10 11:44:46 +02:00
Orestis Floros ed67eaca2c
Update EWMH properties on workspace move
Closes #3965
Fixes #4001
2020-04-10 04:40:11 +02:00
Orestis Floros c46fdc8363
Merge pull request #3995 from xzfc/refactor-property-handlers
Refactor property handlers
2020-04-10 03:58:12 +02:00
Orestis Floros 6fa2cd32a0
handle_button_press and route_click do not need to return int 2020-04-09 16:16:30 +02:00
Orestis Floros 93e96f4e6b
Do not propagate $mod+right click to clients 2020-04-09 16:08:41 +02:00
Orestis Floros b590ca076c
Avoid resizing fullscreen container with non-fullscreen
Another option is to modify resize_find_tiling_participants but this
would also affect resizing of tiling containers in scripts, so I chose
to make this change specific to resizing with the mouse.

Follow-up after #3983
Fixes #3980
2020-04-09 15:49:09 +02:00
Orestis Floros 4922b245c1
Revert "Avoid resizing fullscreen container"
This reverts commit 1a2882d740.

As mentioned in
https://github.com/i3/i3/issues/3980#issuecomment-611515497, this
disables resizing children of fullscreen containers.
2020-04-09 15:11:46 +02:00
Orestis Floros 4b4f1f604f
cmd_focus_sibling: Fix crash on workspace level
Fixes #3997
2020-04-09 11:29:14 +02:00
Albert Safin d9d366a656 handlers.c: cb_property_handler_t: take Con instead of xcb_window_t
Since every handler calls con_by_window_id() and checks for NULL, it is
better to move this call into property_notify().
2020-04-08 08:37:40 +00:00
Albert Safin e03fdef3e5 handlers.c: property_notify(): DLOG and return in case of an error 2020-04-08 08:37:40 +00:00
Albert Safin 5716ff541f handlers.c: remove redundant property fetching
Some property handlers trying to fetch property again if `prop == NULL`.
This is redundant since these properties are either fetched by
property_notify() just before or deleted.
2020-04-08 08:37:40 +00:00
Albert Safin 148ff54f18 handlers.c: remove unused arguments from cb_property_handler_t
Also, use `conn` global variable instead of passing it as an argument.
2020-04-08 08:02:17 +00:00
Orestis Floros 1a2882d740
Avoid resizing fullscreen container
Fixes #3980
2020-03-31 08:52:53 +02:00
Ian Fan d02cda4241 ipc: always include marks property in TREE reply 2020-03-07 11:12:47 +00:00
xzfc 47be36410c
Assume xcb_cursor_context_new never fails (#3955)
According to libxcb-cursor code, the only condition in which
xcb_cursor_context_new() returns a non-zero result is a memory
allocation failure[1].  Thus, it is safe to assume that
xcursor_supported is always true, and remove dead code.

[1]: https://gitlab.freedesktop.org/xorg/lib/libxcb-cursor/blob/0.1.3/cursor/cursor.c#L131-132
2020-02-24 08:48:58 +01:00
Albert Safin d36829d6e2 Make floating-tiling resize code consistent with plain tiling resize
Now dragging an inner border of a floating split triggers a tiling
resize (as expected) instead of a floating resize.
2020-02-22 23:35:55 +00:00
Albert Safin b98b055459 i3 --moreversion: erase the line before writing over
The trailing part of the line (`abort…)`) has often been appearing in
bug reports.
2020-02-21 02:07:23 +00:00
Albert Safin 83c7aff089 Limit workspace numbers within 0..INT32_MAX
Before this commit, large workspace numbers treated oddly:

   $ i3-msg 'rename workspace to 1234567890'
   # displayed in i3bar as `0`

   $ i3-msg 'rename workspace to 4294967200'
   $ i3-msg -t get_workspaces | jq '.[]|select(.focused).num'
   -96 # int32_t overflow

   $ i3-msg 'rename workspace to 99999999999999999999'
   $ i3-msg -t get_workspaces | jq '.[]|select(.focused).num'
   -1 # treated as unnumbered

This commit puts a consistent limit on workspace numbers.  Now
workspaces with numbers beyond INT32_MAX are treated as unnumbered.
2020-02-21 02:07:04 +00:00
Albert Safin d3976fee8c Code style: fix misaligned and trailing whitespaces 2020-02-21 02:06:48 +00:00
Albert Safin 670c23600f
Decoration click/mouse move: iterate children in reverse order
In the case of decoration overlap, we should handle the one that is
drawn on top, i.e., the last one.
2020-02-19 11:33:49 +01:00
Albert Safin e6ca7ca06f
Sanitize con and window rect dimensions
Make sure they're neither zero (prohibited by X11) nor overflown during
subtraction.
2020-02-19 11:33:49 +01:00
xzfc 1f0c628cde
clang-format: bring back ForeachMacros (#3948)
* clang-format: bring back ForeachMacros

ForeachMacros was disabled in 4211274fcd
due to the breakage of include/queue.h. The currently used version,
clang-format-6.0 doesn't break it.

* Add curly braces

Co-authored-by: Orestis Floros <orestisflo@gmail.com>
2020-02-19 11:31:09 +01:00
Ingo Bürk e3f120c0b6
Merge pull request #3946 from phy1729/i3bar_command-exec
Prepend "exec " to default i3bar_command
2020-02-18 09:16:27 +01:00
Michael Stapelberg f517b5aa57
Merge pull request #3918 from orestisfl/fno-common
Fix fno-common problems with gcc10
2020-02-15 12:25:58 +01:00
Orestis Floros 2eac53fada
atoms: Properly declare as global variables
See #3914
2020-02-01 17:34:01 +01:00
Orestis Floros d11e862919
Delete duplicate definition of ewmh_window
See #3914
2020-02-01 17:32:53 +01:00
Matthew Martin a2cba79f9c Prepend "exec " to default i3bar_command
Avoids leaving around a useless shell process.
2020-01-30 21:02:50 -06:00
Orestis Floros f76b11327f
Do not error on exec not matching a container
See #3903, #3905
2020-01-18 11:09:14 +01:00
Ingo Bürk 110bdcbee5
Merge pull request #3905 from Airblader/bug-3903
Respect match criteria for exec command
2020-01-16 22:19:25 +01:00
Ingo Bürk f002584509 Respect match criteria for exec command
We currently do not evaluate match criteria for the exec command
since generally executing the same command multiple times is
unlikely to make sense.

However, it does make sense when the match is empty and this should
prevent the command from running, which currently does not happen.

For consisteny we execute the command as many times as there are
matched criteria, but print a warning if it matches more than one
container.

fixes #3903
2020-01-16 22:07:37 +01:00
Orestis Floros 0ed94fc788
Use EXIT_SUCCESS/FAILURE instead of 0/1 2020-01-16 09:27:05 +01:00
Orestis Floros f7aee6b908
Exit with success on -h 2020-01-16 09:21:16 +01:00
Iskustvo 5835bbc385 Added workspace ID in GET_WORKSPACES response. 2020-01-08 09:07:53 +01:00
Martin T. H. Sandsmark afab4d6789
Allow matching on empty properties (class, title, etc.)
Fixes #3308
2019-12-25 15:42:47 +01:00