diff options
author | Mark Tiefenbruck <mark@fluxbox.org> | 2021-07-06 23:56:20 (GMT) |
---|---|---|
committer | Mark Tiefenbruck <mark@fluxbox.org> | 2021-07-06 23:56:20 (GMT) |
commit | 8bc11006a5ac8c10a539e5a38cdf62205ff386ad (patch) | |
tree | 54e3ef1fe6fb25f56d59d9b9e96b4eec6467ef82 /src/Screen.hh | |
parent | 0279936d835d7d88537bcf1208035787c02ced59 (diff) | |
download | fluxbox-8bc11006a5ac8c10a539e5a38cdf62205ff386ad.zip fluxbox-8bc11006a5ac8c10a539e5a38cdf62205ff386ad.tar.bz2 |
Patch from Glen Whitney
A priori, there is no reason why the workspace warping functionality should
treat the horizontal and vertical directions at all differently. Even if
traditionally horizontal warping was more common, for some in recent times
as aspect ratios tend to become larger, stacking virtual workspaces
vertically may make more sense. Similarly, some might want to traverse
an array of workspaces in column-major, rather than row-major, order.
Prior to this commit, there were extra parameters for vertical warping (a
controlling flag and an offset for how many workspaces to jump) as opposed
to horizontal warping. Also it was impossible to allow vertical warping while
disallowing vertical warping.
This commit makes all of the parameters and behavior for horizontal and
vertical warping equivalent. For backwards compatibility, there is an
overarching flag controlling whether warping occurs at all, as well as a
separate control flag and offset for each of horizontal and vertical warping.
The relevant init file resources and default values are:
session.screen0.workspaceWarping: true
session.screen0.workspaceWarpingHorizontal: true
session.screen0.workspaceWarpingVertical: true
session.screen0.workspaceWarpingHorizontalOffset: 1
session.screen0.workspaceWarpingVerticalOffset: 1
Diffstat (limited to 'src/Screen.hh')
-rw-r--r-- | src/Screen.hh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Screen.hh b/src/Screen.hh index 83c5cb5..1e03b78 100644 --- a/src/Screen.hh +++ b/src/Screen.hh | |||
@@ -95,7 +95,9 @@ public: | |||
95 | bool isRootColormapInstalled() const { return root_colormap_installed; } | 95 | bool isRootColormapInstalled() const { return root_colormap_installed; } |
96 | bool isScreenManaged() const { return m_state.managed; } | 96 | bool isScreenManaged() const { return m_state.managed; } |
97 | bool isWorkspaceWarping() const { return (m_workspaces_list.size() > 1) && *resource.workspace_warping; } | 97 | bool isWorkspaceWarping() const { return (m_workspaces_list.size() > 1) && *resource.workspace_warping; } |
98 | bool isWorkspaceWarpingVertical() const { return *resource.workspace_warping_vertical; } | 98 | bool isWorkspaceWarpingHorizontal() const { return isWorkspaceWarping() && *resource.workspace_warping_horizontal; } |
99 | bool isWorkspaceWarpingVertical() const { return isWorkspaceWarping() && *resource.workspace_warping_vertical; } | ||
100 | int getWorkspaceWarpingHorizontalOffset() const { return *resource.workspace_warping_horizontal_offset; } | ||
99 | int getWorkspaceWarpingVerticalOffset() const { return *resource.workspace_warping_vertical_offset; } | 101 | int getWorkspaceWarpingVerticalOffset() const { return *resource.workspace_warping_vertical_offset; } |
100 | bool doAutoRaise() const { return *resource.auto_raise; } | 102 | bool doAutoRaise() const { return *resource.auto_raise; } |
101 | bool clickRaises() const { return *resource.click_raises; } | 103 | bool clickRaises() const { return *resource.click_raises; } |