commits
This allows a compositor that draws shadows to draw the shadow all
the way to the edges of the screen, rather than curving around the
bar which was previously only as wide as the screen.
Marking a window as sticky keeps it in its current frame so it will
never be cycled into another frame via next, prev, or when creating
a new split. A sticky window can be moved around in the frame
stack, but will always remain in that frame until it is explicitly
moved to another frame via exchange* commands.
Dialog boxes should still be allowed to be centered and have
borders, to make it clear they are dialogs
This allows a full-screened window to take up the entire screen now
but still use a gap when other windows are on screen
Also make default show the frame width and height
Useful for getting terminals to take up the entire frame size rather
than constraining to multiple of per-cell width/height
Apply gap twice around outer edges of frames touching the screen
border, to have a uniform gap between outside of frame and a frame
touching another inside.
It's like "msgwait 0" but still uses a timeout to clear the active
message and restore the window list.
- Add 'vinit' command to initialize 'virtuals' number of workspaces
(defaults to 5)
- Add 'vselect' command to switch to a numbered workspace
- Add 'vmove' command to move the current window to the numbered
workspace
Defaults to the screen number if XRandR isn't available
- always build xrandr.c
- provide stubs in xrandr.c; only init_xrandr() anc xrandr_fill_screen()
are safe to call if XRandR support is not built in
Code that wants to use XRandR outside xrandr.c should test rp_have_xrandr.
Leads to clearer code in screen.c
Only used in editor.c when introduced, but they're used elsewhere since.
Should help use them from within tests.
So that we can easily use it from tests.
This function appends n UTF-8 characters to its sbuf parameter. Falls
back to bytes in a non-UTF-8 locale. If width = -1, it appends the
whole input string.
This program can be run using `make check`. In order to do this, you
will need to run `autogen.sh` again.
Ensure that we don't truncate UTF-8 characters in %42s-style format
strings.
Prompted by a similar diff by Will Storey <will@summercat.com>, that
made use of the wide char API. I find it simpler to just handle UTF-8.
Signed-off-by: Vasil Zlatanov <v@skozl.com>
These functions are used in many parts of ratpoison. In order to compile
a separate program using the ratpoison files, we need them available
outside of main.c.
When onlyborder is set to 0 (default 1), borders are not displayed if
there is only a single frame on a given screen.
This is useful if you use (thick) coloured borders to show which is the
currently focused window when using splits, but also don't want to have
borders taking up space unnecessarily when running a fullscreen window.
Signed-off-by: Vasil Zlatanov <v@skozl.com>
The current implementation of `sync_wins`, which gets called after
control is returned to ratpoison following a call to `tmpwm`, gets
executed once per screen.
This is not only unnecesary, but also causes ratpoison to break after
returning from `tmpwm`. This is due to two things: first, we can scan
for the windows in only one pass, because the call to `XQueryTree`
returns all windows below the root window, which is shared across the
screens. Second, the current implementation only checks whether a
window is a special ratpoison window (i.e. the key window, bar window,
etc.) for the current screen. This results in some windows being
mapped although they shouldn't be, which is what causes the break
preventing ratpoison from receiving commands correctly,
This patch fixes these issues by only running `sync_wins` once instead
of on all screens, and by using the existing `is_rp_window` utility
function to prevent a special ratpoison window from being mapped,
regardless of the screen it belongs to.
Signed-off-by: Antoine Busque <antoinebusque@gmail.com>
In its current state, history expansion requiring any sort of string
lookup is not working, always returing "event not found". This is due
to `history_offset` being set improperly by an early call to
`using_history`.
A call to `using_history` needs to follow, not precede, the loop
performing initialization of history entries found in
`history_expand_line`. This allows for `history_offset` to reflect the
now non-zero length of the history, restoring the expected behaviour
of history expansion.
Tested-by: Martin Hertz <mvhertz@gmail.com>
Signed-off-by: Antoine Busque <antoinebusque@gmail.com>
When switching to another screen, the focus{left,right,up,down} commands
only show the frame indicator if the target screen has more than one
frame. This behavior is kinda non-intuitive.
Pointed out by Antoine Busque, who also provided a different fix.
When compared with the existing overlap check in
`find_frame_{up,down}`, it appears that the original implementation of
the overlap test for `find_frame_{left,right}` is erroneous. Indeed,
the wrong boundaries are used, which causes issues like allowing
finding a frame in one direction, but not finding the frame when going
back in the reverse direction.
Commands like `focus{left,right}` rely on the corresponding
`find_frame` function. The original boundaries check issue meant that,
on differently sized screens, focus could pass from one screen to the
next in one direction, but not in the other.
The boundary checks have therefore been corrected to mirror those in
`find_frame_{up,down}`, and check for actual overlap between the
frames.
Signed-off-by: Antoine Busque <antoinebusque@gmail.com>
.Dd takes [month day, year], not year-month-day. Spotted by brainwash.
Marking a window as sticky keeps it in its current frame so it will
never be cycled into another frame via next, prev, or when creating
a new split. A sticky window can be moved around in the frame
stack, but will always remain in that frame until it is explicitly
moved to another frame via exchange* commands.
When onlyborder is set to 0 (default 1), borders are not displayed if
there is only a single frame on a given screen.
This is useful if you use (thick) coloured borders to show which is the
currently focused window when using splits, but also don't want to have
borders taking up space unnecessarily when running a fullscreen window.
Signed-off-by: Vasil Zlatanov <v@skozl.com>
The current implementation of `sync_wins`, which gets called after
control is returned to ratpoison following a call to `tmpwm`, gets
executed once per screen.
This is not only unnecesary, but also causes ratpoison to break after
returning from `tmpwm`. This is due to two things: first, we can scan
for the windows in only one pass, because the call to `XQueryTree`
returns all windows below the root window, which is shared across the
screens. Second, the current implementation only checks whether a
window is a special ratpoison window (i.e. the key window, bar window,
etc.) for the current screen. This results in some windows being
mapped although they shouldn't be, which is what causes the break
preventing ratpoison from receiving commands correctly,
This patch fixes these issues by only running `sync_wins` once instead
of on all screens, and by using the existing `is_rp_window` utility
function to prevent a special ratpoison window from being mapped,
regardless of the screen it belongs to.
Signed-off-by: Antoine Busque <antoinebusque@gmail.com>
In its current state, history expansion requiring any sort of string
lookup is not working, always returing "event not found". This is due
to `history_offset` being set improperly by an early call to
`using_history`.
A call to `using_history` needs to follow, not precede, the loop
performing initialization of history entries found in
`history_expand_line`. This allows for `history_offset` to reflect the
now non-zero length of the history, restoring the expected behaviour
of history expansion.
Tested-by: Martin Hertz <mvhertz@gmail.com>
Signed-off-by: Antoine Busque <antoinebusque@gmail.com>
When compared with the existing overlap check in
`find_frame_{up,down}`, it appears that the original implementation of
the overlap test for `find_frame_{left,right}` is erroneous. Indeed,
the wrong boundaries are used, which causes issues like allowing
finding a frame in one direction, but not finding the frame when going
back in the reverse direction.
Commands like `focus{left,right}` rely on the corresponding
`find_frame` function. The original boundaries check issue meant that,
on differently sized screens, focus could pass from one screen to the
next in one direction, but not in the other.
The boundary checks have therefore been corrected to mirror those in
`find_frame_{up,down}`, and check for actual overlap between the
frames.
Signed-off-by: Antoine Busque <antoinebusque@gmail.com>