[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

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 +++

[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 :

[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

[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

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
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 :

[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 @@

[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

[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

[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 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

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 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

[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(-)

[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 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 +++

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

2016-11-29 Thread Mathieu OTHACEHE
to 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

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(+),

[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

[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 ---

[RP] [PATCH] Add missing hook in documentation

2016-11-23 Thread Mathieu OTHACEHE
From: Mathieu OTHACEHE <m.othac...@gmail.com> 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 @@ -

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

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