[RP] [PATCH] doc: update documentation relative to xrandr.

2017-03-24 Thread Mathieu Othacehe
Create two new sections: "Xrandr support" and "Manipulating Screens". Also s/monitor/screen/ to improve readability. --- Hi, Here's a patch to update documentation on xrandr changes. Thanks, Mathieu doc/ratpoison.texi | 63 ++ 1 file changed

Re: [RP] ratpoison-1.4.9-rc2

2017-03-21 Thread Mathieu Othacehe
Hi Joren, > what differences are there for a user? Will ratpoison somehow automatically > detect when another screen is plugged in or do we still have to use the > 'restart' command? Yes, thanks to xrandr support, when a new screen is plugged and activated (via xrandr(1) or any other tool based

Re: [RP] adding some basic mouse support to switch frame

2017-02-01 Thread Mathieu OTHACEHE
Hi Julien, > So I wrote a patch for the click feature. It seems to work pretty well, > I tried it on a laptop connected to an external screen and it seems OK > to me. Note that the frames are selected (not the windows) which I > believe is better. Nice work ! You should maybe consider rebasing

[RP] [PATCH] screen: rewrite screen_del conditions

2016-12-28 Thread Mathieu OTHACEHE
Rewrite screen_del conditional imbrications for a better readability. No functional changes here. --- src/screen.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/screen.c b/src/screen.c index cfcf2f8..2c36a6b 100644 --- a/src/screen.c +++ b/src/

[RP] state of xrandr branch

2016-12-14 Thread Mathieu OTHACEHE
Hi, Just to make a small point, of all reported problems on xrandr branch there are still two that need to be solved. * A bug reported by Fabian I was able to reproduced when starting a tmpwm and exiting it, ratpoison is in a broken state : http://lists.nongnu.org/archive/html/ratpoison-devel/2

[RP] [PATCH 1/2] Add a hide_screen_windows function

2016-12-14 Thread Mathieu OTHACEHE
This function is useful to find the windows displayed on a specific screen and hide them. --- src/manage.c | 14 ++ src/manage.h | 1 + 2 files changed, 15 insertions(+) diff --git a/src/manage.c b/src/manage.c index 4296480..f2a15f5 100644 --- a/src/manage.c +++ b/src/manage.c @@ -9

[RP] [PATCH 2/2] Fix frozen state when a new screen appears after all screens have been removed

2016-12-14 Thread Mathieu OTHACEHE
Handle correctly the fact that the deleted screen could be the last one. If a screen is plugged, and no other screens are present, give focus to it's key window. --- src/screen.c | 45 ++--- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/src

[RP] [PATCH 0/2] Fix ratpoison frozen state

2016-12-14 Thread Mathieu OTHACEHE
Hi all, This patchset fixes a problem reported by |cos| here: http://lists.nongnu.org/archive/html/ratpoison-devel/2016-11/msg00040.html where ratpoison was frozen when a new screens appears after all screens have been removed. Mathieu OTHACEHE (2): Add a hide_screen_windows function Fix

Re: [RP] [PATCH] Make focus* commands screen aware.

2016-12-11 Thread Mathieu OTHACEHE
Hi Joseph, > I've attached an updated patch, which applies against the xrandr branch. I just tested it, it works fine for me ! Mathieu ___ Ratpoison-devel mailing list Ratpoison-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/ratpoison-dev

Re: [RP] ratpoison-1.4.9-xrandr4 snapshots

2016-12-11 Thread Mathieu OTHACEHE
> An sdump in the overlapping situation looks like: > | VGA1 0 1152 0 1280 1024 0,LVDS1 1 0 0 1440 900 1 > > While the output of xrandr looks like: > |Screen 0: minimum 320 x 200, current 2432 x 1024, maximum 8192 x 8192 > |LVDS1 connected 1440x900+0+0 (normal left inverted right x axis y axis) >

Re: [RP] ratpoison-1.4.9-xrandr4 snapshots

2016-12-09 Thread Mathieu OTHACEHE
> It kind-of-works, with the same results as before: > sdump reports a combined "big-screen" and the monitors are treated as > such Yes, I wasn't expecting anything from it. > >> Maybe you have an outdated revision of xrandr. >> Please note you need to have xrandr >= 1.3 running. > > xrandr --ve

Re: [RP] ratpoison-1.4.9-xrandr4 snapshots

2016-12-09 Thread Mathieu OTHACEHE
Wrong command sorry : > --8<---cut here---start->8--- > xrandr --output VGA1 --mode auto --right-of LVDS1 > --8<---cut here---end--->8--- xrandr --output VGA1 --auto --right-of LVDS1 Mathieu ___

Re: [RP] ratpoison-1.4.9-xrandr4 snapshots

2016-12-09 Thread Mathieu OTHACEHE
Hi Fabian, Thanks for your feedback. > * Starting ratpoison with only the internal monitor, then plugging in > the external screen and configuring it with > xrandr --output VGA1 --mode 1280x1024 > xrandr --output VGA1 --right-of LVDS1 You can issue a simple command : --8<

[RP] [PATCH 5/7] Add a function to find a screen matching a given XWindowAttributes

2016-12-07 Thread Mathieu OTHACEHE
It allows to find the screen associated to a Window, using it's x and y position. --- src/screen.c | 18 ++ src/screen.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/src/screen.c b/src/screen.c index 0d45701..811a947 100644 --- a/src/screen.c +++ b/src/screen.c @@ -165,

[RP] [PATCH 4/7] Store RootWindow in global_screen structure

2016-12-07 Thread Mathieu OTHACEHE
Every screen stores a copy of xrandr RootWindow even if they all share the same RootWindow. This patch stores the RootWindow in a global location for all screens. Further work is required to remove RootWindow from per screen structure. --- src/data.h | 1 + src/screen.c | 1 + 2 files changed,

[RP] [PATCH 7/7] Select xrandr primary screen at startup if possible

2016-12-07 Thread Mathieu OTHACEHE
If xrandr support is enabled and a screen is marked primary, use it as current screen at startup. Otherwise, use the first screen in sorted screen list as current screen at startup. --- src/main.c | 7 --- src/screen.c | 27 +++ 2 files changed, 27 insertions(+), 7

[RP] [PATCH 6/7] Simplify scanwins function

2016-12-07 Thread Mathieu OTHACEHE
Use find_screen_by_attr function, remove screen argument and a useless debug message. --- src/main.c | 3 ++- src/manage.c | 25 +++-- src/manage.h | 2 +- 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/src/main.c b/src/main.c index ca5ebc8..cce4f94 100644

[RP] [PATCH 3/7] Add primary screen detection

2016-12-07 Thread Mathieu OTHACEHE
The user may specify that a screen is primary with xrandr. Save this information in ratpoison for future use. The use of XRRGetOutputPrimary forces us to bump xrandr supported revision from >=1.2 to >=1.3. --- src/data.h | 1 + src/xrandr.c | 15 ++- src/xrandr.h | 1 + 3 files ch

[RP] [PATCH 0/7] Add xrandr primary screen support

2016-12-07 Thread Mathieu OTHACEHE
This patch add support for xrandr primary screen detection. If any primary screen is detected at startup, it will be used as current screen. Mathieu OTHACEHE (7): Remove useless argument from is_rp_window_for_screen function Move function declaration to the right header Add primary screen

[RP] [PATCH 2/7] Move function declaration to the right header

2016-12-07 Thread Mathieu OTHACEHE
find_screen is defined in screen.c so it makes more sense to declare it in screen.h --- src/ratpoison.h | 1 - src/screen.h| 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ratpoison.h b/src/ratpoison.h index c98dd40..981a882 100644 --- a/src/ratpoison.h +++ b/src/ratpois

[RP] [PATCH 1/7] Remove useless argument from is_rp_window_for_screen function

2016-12-07 Thread Mathieu OTHACEHE
The screen argument is useless as this function operates on all screens. To find if a window belong to a specific ratpoison screen, function is_rp_window_for_given_screen may be used. --- src/events.c | 2 +- src/manage.c | 2 +- src/screen.c | 2 +- src/screen.h | 2 +- 4 files changed, 4 inserti

Re: [RP] [RFC v3] Add xrandr support

2016-12-05 Thread Mathieu OTHACEHE
Hi, > I use ratpoison with xrandr for a few weeks (now with the xrandr branch > on the official git repo), and it works well! Thanks Clément :) > 1. ':restart' command puts windows onto a display that isn't the primary > display (VGA1). Ok. I'll propose a patch soon. > 2. With a default conf

Re: [RP] [RFC v3] Add xrandr support

2016-12-01 Thread Mathieu OTHACEHE
> Results. The xrandr support works perfectly. Details to follow. Good to know, thanks Rob ! Mathieu ___ Ratpoison-devel mailing list Ratpoison-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/ratpoison-devel

[RP] [PATCH 4/6] Fix sfrestore

2016-11-29 Thread Mathieu OTHACEHE
Use screen numset in sfrestore --- src/actions.c | 67 --- 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/src/actions.c b/src/actions.c index e4c1c4e..7f3f541 100644 --- a/src/actions.c +++ b/src/actions.c @@ -5622,18 +5622,2

[RP] [PATCH 3/6] Fix sfdump

2016-11-29 Thread Mathieu OTHACEHE
Use screen numset in sfdump --- src/actions.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/actions.c b/src/actions.c index 8d89a2d..e4c1c4e 100644 --- a/src/actions.c +++ b/src/actions.c @@ -5599,9 +5599,7 @@ cmd_sfdump (int interactively UNUSED, struct cmdarg **args

[RP] [PATCH 5/6] Add height dimension to screen sorting

2016-11-29 Thread Mathieu OTHACEHE
Screen are only sorted according to their width offset from origin ("left" in screen struct). Also sort screen that share a same width offset according to their height offset ("top" in screen struct). --- src/screen.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff

[RP] [PATCH 1/6] Assign a number to each screen using a numset

2016-11-29 Thread Mathieu OTHACEHE
A number is added to rp_screen to identify every screen. The screen numbers are affected at ratpoison start, when screens are sorted. On screen addition, a new number is requested. On screen deletion, the screen number is released. --- src/data.h | 6 ++ src/screen.c | 21 +

[RP] [PATCH 6/6] Kill gcc uninitialized warning

2016-11-29 Thread Mathieu OTHACEHE
It is useless to initialize screen_count, but it prevents a gcc warning. --- src/screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index ddc03cb..7593f49 100644 --- a/src/screen.c +++ b/src/screen.c @@ -257,7 +257,7 @@ void init_screens (void

[RP] [PATCH 2/6] Fix fdump and sselect

2016-11-29 Thread Mathieu OTHACEHE
Use screen numset in fdump and sselect. --- src/actions.c | 20 +++- src/screen.c | 10 +- src/screen.h | 2 +- 3 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/actions.c b/src/actions.c index 606116c..8d89a2d 100644 --- a/src/actions.c +++ b/src/acti

[RP] [PATCH v2 0/6] Improve xrandr support

2016-11-29 Thread Mathieu OTHACEHE
xrandr branch. Thanks, Mathieu Mathieu OTHACEHE (6): Assign a number to each screen using a numset Fix fdump and sselect Fix sfdump Fix sfrestore Add height dimension to screen sorting Kill gcc uninitialized warning src/actions.c | 91

Re: [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support.

2016-11-28 Thread Mathieu OTHACEHE
Hi, Thanks for your feedback. > While you're looking at reworking the xrandr patch, it might be worth > noticing the corner case where all displays are disabled. Unfortunately, at > least with the version of the patch I tried, ratpoison does not seem to > recover from the state with zero acti

Re: [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support.

2016-11-28 Thread Mathieu OTHACEHE
Hello, Jeremie Courreges-Anglas writes: > This makes me think that screens are currently sorted with only a > "left < right" criteria, maybe total ordering with an additional > "top < bottom" could be interesting. Yes I agree, it could be interesting for people using vertical or vertical + horiz

Re: [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support.

2016-11-27 Thread Mathieu OTHACEHE
> No idea whether how stable would be the mapping between Xrandr ids and > ratpoison ids, though, as we don't control the former. There's not much > choice though, but 1. you already have implemented a screen_sort > function, and 2. this sounds better than forcing the user to deal with > numbers

Re: [RP] [PATCH 3/6] Disable sfdump if there is no xrandr support.

2016-11-27 Thread Mathieu OTHACEHE
Hi, > I think this is headed in the wrong direction. There is no reason to > disable this command when we can easily deal with the single available > screen. Yes I agree, it is not a very good idea after all. Maybe we could copy the old behaviour by mapping the Xrandr identifier to an integer

[RP] [PATCH 4/6] Use xrandr output identifiers in srestore.

2016-11-25 Thread Mathieu OTHACEHE
Handle xrandr output identifiers in sfrestore input string. Also inform the user if frestore failed for a frame restoration. Disable sfrestore if the user has no xrandr support. --- src/actions.c | 77 --- 1 file changed, 58 insertions(+), 1

[RP] [PATCH 1/6] Expose xrandr functions to find a screen by output or crtc number

2016-11-25 Thread Mathieu OTHACEHE
xrandr_screen_output and xrandr_screen_crtc can be useful outside of xrandr.c --- src/xrandr.c | 4 ++-- src/xrandr.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xrandr.c b/src/xrandr.c index f1f3ef5..d3dc933 100644 --- a/src/xrandr.c +++ b/src/xrandr.c @@ -82,7 +82,

[RP] [PATCH 6/6] Update XRandr related documentation and man.

2016-11-25 Thread Mathieu OTHACEHE
--- doc/ratpoison.mdoc.1 | 9 +++-- doc/ratpoison.texi | 17 - 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/doc/ratpoison.mdoc.1 b/doc/ratpoison.mdoc.1 index 2e3c356..85ef172 100644 --- a/doc/ratpoison.mdoc.1 +++ b/doc/ratpoison.mdoc.1 @@ -709,7 +709,9 @@

[RP] [PATCH 5/6] Kill gcc uninitialized warning

2016-11-25 Thread Mathieu OTHACEHE
It is useless to initialize screen_count, but it prevents a gcc warning. --- src/screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/screen.c b/src/screen.c index 240b876..fe01a35 100644 --- a/src/screen.c +++ b/src/screen.c @@ -233,7 +233,7 @@ void init_screens (void

[RP] [PATCH 2/6] Use xrandr output identifiers in sselect.

2016-11-25 Thread Mathieu OTHACEHE
Handle xrandr output identifiers as input for sselect. Disable sselect if there is no xrandr support. --- src/actions.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/actions.c b/src/actions.c index 606116c..77d5cee 100644 --- a/src/actions

[RP] [PATCH 0/6] Fix multiple monitors commands

2016-11-25 Thread Mathieu OTHACEHE
with this new screen identifier. Those patches are to be applied to xrandr branch. Mathieu OTHACEHE (6): Expose xrandr functions to find a screen by output or crtc number Use xrandr output identifiers in sselect. Disable sfdump if there is no xrandr support. Use xrandr output identifiers in

[RP] [PATCH 3/6] Disable sfdump if there is no xrandr support.

2016-11-25 Thread Mathieu OTHACEHE
Without xrandr support, sfdump command has no interest. --- src/actions.c | 8 1 file changed, 8 insertions(+) diff --git a/src/actions.c b/src/actions.c index 77d5cee..faddbd1 100644 --- a/src/actions.c +++ b/src/actions.c @@ -5599,12 +5599,17 @@ cmd_set (int interactive UNUSED, struct

Re: [RP] ratpoison and libhistory support

2016-11-24 Thread Mathieu OTHACEHE
Hi, Never used it myself, no objections. Mathieu > Hi folks, > > Would you mourn the loss of libhistory support in ratpoison? > > ratpoison can optionally make use of this library to support !!-style > expansions, like in bash. It's not a hassle to support, very little > code is involved ; but

[RP] [PATCH] Kill gcc unused function warning

2016-11-24 Thread Mathieu OTHACEHE
The xrandr_rotation_string function is used only if DEBUG is enabled. --- Hi Jeremie, Here's a small patch to be applied on xrandr branch. Thanks, Mathieu src/xrandr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xrandr.c b/src/xrandr.c index 2534099..f1f3ef5 100644 --- a/src/xran

[RP] [PATCH] Unnest if statements

2016-11-23 Thread Mathieu OTHACEHE
From: Mathieu OTHACEHE Unnest if statements in cmd_select. No functional changes. --- src/actions.c | 74 ++- 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/src/actions.c b/src/actions.c index 3741ea5..fa249f4 100644 --- a

[RP] [PATCH] Add missing hook in documentation

2016-11-23 Thread Mathieu OTHACEHE
From: Mathieu OTHACEHE switchscreen hook is not documented. --- doc/ratpoison.texi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/ratpoison.texi b/doc/ratpoison.texi index 1c6afe6..83afddc 100644 --- a/doc/ratpoison.texi +++ b/doc/ratpoison.texi @@ -1264,6 +1264,8 @@ Run when the

Re: [RP] [RFC v3] Add xrandr support

2016-11-22 Thread Mathieu OTHACEHE
Hi Rob, Thanks for testing ! As Jeremie said, the output of your sdump command seems to point there's a problem with your build. The expected behaviour is that when you issue your rotate.sh, xrandr will notify ratpoison, and your screens should be detected and setup as if you have restarted ratp

[RP] [RFC v3] Add xrandr support

2016-11-12 Thread Mathieu OTHACEHE
Drop deprecated xinerama support and replace it with xrandr. Signed-off-by: Mathieu OTHACEHE --- Hi, Here is v3, to address Jeremie review and rebase patch on top of recent changes. Thanks, Mathieu Changelog: v2 : * Rebase on top of master v3 : * Rebase on top of master * Follow GNU Coding

Re: [RP] [RFC v2] Add xrandr support

2016-11-11 Thread Mathieu OTHACEHE
> Erm, you may have to do it again, since I've now pushed some old stuff > to the repo. :-| No problem :) > > OTOH, diffs are fine for testing but for what should hit the repo > I would prefer commits generated with git format-patch. Could you > please use this format? Well, I did use git forma

[RP] [RFC v2] Add xrandr support

2016-11-11 Thread Mathieu OTHACEHE
Drop deprecated xinerama support and replace it with xrandr. Signed-off-by: Mathieu OTHACEHE --- Hi. I forget to rebase my patch on top of master, so here is v2. Sorry, Mathieu Changelog: * v2 : Rebase on top of master configure.ac | 21 ++- src/Makefile.am

Re: [RP] [RFC] Add xrandr support

2016-11-11 Thread Mathieu OTHACEHE
Hi Axel, Quoting xrandr protocol document [1]: "It is probably better to view RandR as a superset of Xinerama at this point and use it in preference to Xinerama where both are present." So I guess you can do whatever was possible on xinerama with xrandr, even on workstation scenario. I can upda

[RP] [RFC] Add xrandr support

2016-11-10 Thread Mathieu OTHACEHE
Drop deprecated xinerama support and replace it with xrandr. Signed-off-by: Mathieu OTHACEHE --- Hi all, It doesn't seem this package is still maintained. It is sad because ratpoison is a great wm. Here is a patch to drop deprecated xinerama support and replace it with xrandr. Than

[RP] [PATCH] Introduce multiple completion styles.

2016-08-07 Thread Mathieu OTHACEHE
The default, legacy style is named BASIC. A new completion style named SUBSTRING is added. Use SUBSTRING for window name completion in select command. Use BASIC everywhere else. --- TODO | 3 --- src/actions.c | 8 src/completions.c | 32 ---

[RP] [PATCH v2] Introduce multiple completion styles.

2016-08-07 Thread Mathieu OTHACEHE
The default, legacy style is named BASIC. A new completion style named SUBSTRING is added. Use SUBSTRING for window name completion in select command. Use BASIC everywhere else. --- Hi, Here is the v2 of the patch, I removed a debug message I forget. Mathieu Changelog: v2: Remove a forgotten