Orestis Floros [Mon, 29 Oct 2018 13:46:28 +0000 (15:46 +0200)]
Fix regression with moving floating windows
This fixes a regression introduced in 6d983b5. Consider 2 outputs:
fake-0: workspace '1'
fake-1: workspaces '2','3'
Workspace 1 focused, workspace 2 visible.
Open a floating window in 1 and move it to 3. Now, the floating window
appears in workspace 2 and disappears once focus is switched to
that workspace.
Instead of focusing 'old_focus' which might refer to a container in a
different output, we should restore focus by focusing the previously
focused workspace of the output.
Orestis Floros [Thu, 11 Oct 2018 20:19:21 +0000 (23:19 +0300)]
Close & reopen tray selwin when needed
Fixes #1329
Fixes #3317 (duplicate)
Examples where the tray "disappeared":
- Start without a "tray_output", reload config with "tray_output none",
remove "tray_output none" and reload.
- Start with "tray_output primary" (or "tray_output <output>"), disable
the primary output and then reconnect it.
While reading the UserGuide, I had to refer to the TL;DR image on top to find the default keybind for "Focus Parent" since it's not mentioned in the text.
This pr fixes it.
travis: fix mk-build-deps call by providing changelog file
mk-build-deps started using the changelog file to get the version number, but a
bug prevents it from falling back correctly to 1.0 if no changelog is
present. This has been fixed upstream in
https://salsa.debian.org/debian/devscripts/commit/4b15abd4f0cfe4accbf28f24546891867344a73c,
but we can just ship the changelog file until that fix lands.
Controls the window titles alignment in title bars. Possible values are:
- left
- center
- right
Co-authored-by: Orestis Floros <orestisf1993@gmail.com>
- Made title_align a config directive instead of a command. Helps with
some tree_render() issues we had.
- Made title_max_width the same for all 3 cases.
- Modified title offset calculations and added explanations for each
case.
- Append title_padding to mark_width if a mark exists.
Orestis Floros [Tue, 9 Oct 2018 18:45:59 +0000 (21:45 +0300)]
move.c: Fix move_to_output_directed problems
- Use workspace_show that correctly updates _NET_CURRENT_DESKTOP, warps
mouse.
- Use TAILQ_INSERT_TAIL only for focus_head. Focus order is not related
to direction.
- Call con_focus only if con was focused before. See testcase for
directional move with command criteria.
- Correct first call of move_to_output_directed in tree_move which
didn't call ipc_send_window_event("move", con) and
ewmh_update_wm_desktop().
- Don't produce events when the move doesn't happen. Correct
276-ipc-window-move.t as well.
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.
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.
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.
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.
- 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.
- 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.
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.