[RP] [RFC v3] Add xrandr support
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 Style * Switch static inline functions to regular functions. configure.ac | 21 ++- src/Makefile.am | 8 +- src/actions.c| 337 +++- src/bar.c| 8 +- src/communications.c | 11 +- src/communications.h | 2 +- src/data.h | 21 ++- src/events.c | 82 - src/format.c | 10 +- src/globals.c| 31 ++-- src/globals.h| 13 +- src/group.c | 18 +- src/input.c | 10 +- src/linkedlist.c | 139 +++ src/linkedlist.h | 6 + src/main.c | 98 +++ src/manage.c | 22 +-- src/ratpoison.h | 2 +- src/screen.c | 404 ++- src/screen.h | 21 ++- src/split.c | 105 ++- src/split.h | 2 +- src/window.c | 60 +++ src/window.h | 1 + src/xinerama.c | 104 --- src/xrandr.c | 204 ++ src/{xinerama.h => xrandr.h} | 16 +- 27 files changed, 1069 insertions(+), 687 deletions(-) delete mode 100644 src/xinerama.c create mode 100644 src/xrandr.c rename src/{xinerama.h => xrandr.h} (74%) diff --git a/configure.ac b/configure.ac index 7c2bc83..7e101e7 100644 --- a/configure.ac +++ b/configure.ac @@ -158,20 +158,25 @@ AC_CHECK_LIB(X11, XOpenDisplay, [X_LIBS="-lX11 $X_LIBS"], mysavedCPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $X_CFLAGS" -AC_CHECK_HEADERS([X11/extensions/Xinerama.h], [], [], [ -#include -]) -CPPFLAGS="$mysavedCPPFLAGS" - -mysavedCPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $X_CFLAGS" AC_CHECK_HEADERS([X11/XKBlib.h], [], [], [ #include ]) CPPFLAGS="$mysavedCPPFLAGS" AC_CHECK_LIB(Xext, XMissingExtension, [X_LIBS="-lXext $X_LIBS"],,$X_LIBS $X_EXTRA_LIBS) -AC_CHECK_LIB(Xinerama, XineramaQueryScreens, [X_LIBS="-lXinerama $X_LIBS"; AC_DEFINE(HAVE_LIBXINERAMA,1,[Xinerama])],,$X_LIBS $X_EXTRA_LIBS) + +AC_ARG_WITH([xrandr], +[AS_HELP_STRING([--without-xrandr], [Build without xrandr support, even if available])], +[], +[with_xrandr=yes]) + +compile_xrandr=no +AS_IF([test "$with_xrandr" != no], +[AC_CHECK_LIB(Xrandr, XRRGetScreenResources, [compile_xrandr=yes X_LIBS="-lXrandr $X_LIBS" AC_DEFINE(HAVE_LIBXRANDR, 1, [Xrandr])],,$X_LIBS $X_EXTRA_LIBS)] +[]) + +AM_CONDITIONAL(HAVE_LIBXRANDR, test "$compile_xrandr" = yes) + AC_CHECK_LIB(Xtst, XTestFakeButtonEvent, [X_LIBS="-lXtst $X_LIBS"; AC_DEFINE(HAVE_LIBXTST,1,[Xtst])],,$X_LIBS $X_EXTRA_LIBS) AC_CHECK_LIB([X11], [XkbKeycodeToKeysym], [AC_DEFINE(HAVE_XKBKEYCODETOKEYSYM, 1, diff --git a/src/Makefile.am b/src/Makefile.am index 3ba6de3..0daf587 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -70,6 +70,8 @@ ratpoison_SOURCES = actions.c \ split.c \ split.h \ window.c\ - window.h\ - xinerama.c \ - xinerama.h + window.h + +if HAVE_LIBXRANDR +ratpoison_SOURCES += xrandr.c xrandr.h +endif diff --git a/src/actions.c b/src/actions.c index 3aef26b..acfb466 100644 --- a/src/actions.c +++ b/src/actions.c @@ -477,7 +477,7 @@ push_frame_undo(rp_screen *screen) static rp_frame_undo * pop_frame_list (struct list_head *undo_list, struct list_head *redo_list) { - rp_screen *screen = current_screen(); + rp_screen *screen = rp_current_screen; rp_frame_undo *first, *new; /* Is there something to restore? */ @@ -1038,9 +1038,9 @@ parse_keydesc (char *keydesc, struct rp_key *key) static void grab_rat (void) { - XGrabPointer (dpy, current_screen()->root, True, 0, + XGrabPointer (dpy, rp_current_screen->root, True, 0, GrabModeAsync, GrabModeAsync, -None, current_screen()->rat, CurrentTime); +None, rp_current_screen->rat, CurrentTime); } static void @@ -1282,7 +1282,7 @@ cmd_other (int interactive UNUSED, struct cmdarg **args UNUSED) rp_window *w; /* w = find_window_other (); */ - w = group_last_window (rp_current_group, current_screen()); + w = group_last_window (rp_current_group, rp_current_screen); if (!w) return cmdret_new (RET_FAILURE, "%s", MESSAGE_NO_OTHER_WINDOW); @@ -1410,7 +1410,7 @@ cmd_select (int interactive, struct cmdarg **args) if (interactive) {
Re: [RP] [RFC v3] Add xrandr support
Mathieu OTHACEHE writes: > 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. Thank you Mathieu. I've prepared some snapshots: http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-beta.tar.gz http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-beta.tar.xz PGP signatures: http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-beta.tar.gz.sig http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-beta.tar.xz.sig It would be nice to get test reports from people with multiple screens setups. The more reports I get the earlier we can publish a new release. ;) -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE signature.asc Description: PGP signature ___ Ratpoison-devel mailing list Ratpoison-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/ratpoison-devel
Re: [RP] [RFC v3] Add xrandr support
All: I run three monitors, two vertical and 1 horizontal. My login manager mirrors the two vertical monitors and ignores the horizontal one. Upon login, I open a shell in ratpoison (1.4.6), turn my head sideways (improper rotation of monitors) and type "sh bin/rotate.sh && exit rotate.sh is as follows: xrandr --output DisplayPort-0 --auto --rotate left--primary \ --output DVI-0 --auto --rotate left--right-of DisplayPort-0 \ --output DisplayPort-1-1--auto --rotate normal --left-of DisplayPort-0 Then run ratpoison's newwm with ratpoison as the argument. This causes ratpoison to re-detect the screens and I continue my workflow normally with everything in harmony. ratpoison shows three screens, and I move between them with nextscreen/prevscreen as usual. This beta starts the same (as expected). The two vertical monitors are mirrored and incorrectly rotated. I expected that when I ran my xrandr command not to have to re-exec ratpoison to get directly to a correct setup. No change. I tried the newwm command and that seems to have decided that all three screens were one really big screen. Here's what I see from 'ratpoison -c sdump -c fdump' at various times. before: Right after login xrandr: After I've run xrandr from above after: After I've issued "newwm ratpoison" $ cat 1.4.6-before.txt 1.4.6-after.txt 0 0 0 1600 1200 1,1 0 0 1600 1200 0 (frame :number 0 :x 0 :y 0 :width 1600 :height 1200 :screenw 1600 :screenh 1200 :window 16777217 :last-access 0 :dedicated 0), 0 1600 0 1200 1600 1,1 2800 0 1200 1600 0,2 0 0 1600 1200 0 (frame :number 0 :x 0 :y 0 :width 1200 :height 1600 :screenw 1200 :screenh 1600 :window 16777217 :last-access 6 :dedicated 0), $ cat before.txt xrandr.txt reexec.txt 0 0 0 1600 1200 1,1 0 0 1600 1200 0 (frame :number 0 :x 0 :y 0 :width 1600 :height 1200 :screenw 1600 :screenh 1200 :window 18874369 :last-access 0 :dedicated 0), 0 0 0 1600 1200 1,1 0 0 1600 1200 0 (frame :number 0 :x 0 :y 0 :width 1600 :height 1200 :screenw 1600 :screenh 1200 :window 18874369 :last-access 5 :dedicated 0), 0 0 0 4000 1600 1 (frame :number 0 :x 0 :y 0 :width 4000 :height 1600 :screenw 4000 :screenh 1600 :window 18874369 :last-access 0 :dedicated 0) Rob On Mon, Nov 21, 2016 at 01:36:21AM +0100, Jeremie Courreges-Anglas wrote: > Mathieu OTHACEHE writes: > > > 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. > > Thank you Mathieu. > > I've prepared some snapshots: > > http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-beta.tar.gz > http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-beta.tar.xz > > PGP signatures: > > http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-beta.tar.gz.sig > http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-beta.tar.xz.sig > > It would be nice to get test reports from people with multiple screens > setups. The more reports I get the earlier we can publish a new > release. ;) > > -- > jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE > ___ > Ratpoison-devel mailing list > Ratpoison-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/ratpoison-devel ___ Ratpoison-devel mailing list Ratpoison-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/ratpoison-devel
Re: [RP] [RFC v3] Add xrandr support
Hi Rob, first, thanks for the report. Rob Paisley writes: > All: > > I run three monitors, two vertical and 1 horizontal. > > My login manager mirrors the two vertical monitors and ignores the horizontal > one. > > Upon login, I open a shell in ratpoison (1.4.6), While there shouldn't be relevant xinerama/xrandr changes between 1.4.8 and 1.4.6, it would really help if you used the most recent release in tests. > turn my head sideways > (improper rotation of monitors) and type "sh bin/rotate.sh && exit > > rotate.sh is as follows: > xrandr --output DisplayPort-0 --auto --rotate left--primary \ > --output DVI-0 --auto --rotate left--right-of > DisplayPort-0 \ > --output DisplayPort-1-1--auto --rotate normal --left-of > DisplayPort-0 > > Then run ratpoison's newwm with ratpoison as the argument. FWIW there's some syntactic sugar for this: "restart". > This causes > ratpoison to re-detect the screens and I continue my workflow normally > with everything in harmony. ratpoison shows three screens, and I move > between them with nextscreen/prevscreen as usual. sigh, I didn't even know that such an xrandr-based setup was already supported. > This beta starts the same (as expected). The two vertical monitors are > mirrored and incorrectly rotated. I expected that when I ran my xrandr command > not to have to re-exec ratpoison to get directly to a correct setup. No > change. > > I tried the newwm command and that seems to have decided that all three > screens were one really big screen. > > Here's what I see from 'ratpoison -c sdump -c fdump' at various times. > before: Right after login > xrandr: After I've run xrandr from above > after: After I've issued "newwm ratpoison" > > $ cat 1.4.6-before.txt 1.4.6-after.txt > 0 0 0 1600 1200 1,1 0 0 1600 1200 0 > (frame :number 0 :x 0 :y 0 :width 1600 :height 1200 :screenw 1600 :screenh > 1200 :window 16777217 :last-access 0 :dedicated 0), > 0 1600 0 1200 1600 1,1 2800 0 1200 1600 0,2 0 0 1600 1200 0 > (frame :number 0 :x 0 :y 0 :width 1200 :height 1600 :screenw 1200 :screenh > 1600 :window 16777217 :last-access 6 :dedicated 0), > > $ cat before.txt xrandr.txt reexec.txt > 0 0 0 1600 1200 1,1 0 0 1600 1200 0 > (frame :number 0 :x 0 :y 0 :width 1600 :height 1200 :screenw 1600 :screenh > 1200 :window 18874369 :last-access 0 :dedicated 0), > 0 0 0 1600 1200 1,1 0 0 1600 1200 0 > (frame :number 0 :x 0 :y 0 :width 1600 :height 1200 :screenw 1600 :screenh > 1200 :window 18874369 :last-access 5 :dedicated 0), > 0 0 0 4000 1600 1 > (frame :number 0 :x 0 :y 0 :width 4000 :height 1600 :screenw 4000 :screenh > 1600 :window 18874369 :last-access 0 :dedicated 0) With Mathieu's diff, here's what I get here ritchie ~/src/ratpoison$ ratpoison -c sdump -c fdump LVDS1 66 0 0 1280 800 1 (frame :number 0 :x 0 :y 0 :width 1280 :height 800 :screenw 1280 :screenh 800 :window 14680077 :last-access 1 :dedicated 0) ritchie ~/src/ratpoison$ ratpoison -c sfdump (frame :number 0 :x 0 :y 0 :width 1280 :height 800 :screenw 1280 :screenh 800 :window 14680077 :last-access 1 :dedicated 0) 66 Note how the output format for sdump is different. I'm wondering whether you actually have xrandr support built in. I have pushed this xrandr feature on the "xrandr" branch on savannah, with a couple more commits to tweak autotools and runtime xrandr detection. New tarballs: http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-xrandr1.tar.gz http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-xrandr1.tar.gz.sig http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-xrandr1.tar.xz http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-xrandr1.tar.xz.sig Rob, could you please give this another try? Please always specify ./configure --with-xrandr, and make sure you're actually running the most recent executable. Thanks, -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE ___ Ratpoison-devel mailing list Ratpoison-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/ratpoison-devel
Re: [RP] [RFC v3] Add xrandr support
It'll be next Monday before I get to this. The 1.4.6 is what comes with Ubuntu 14.04. I'll handle it! Rob > On Nov 21, 2016, at 8:35 PM, Jeremie Courreges-Anglas wrote: > > > Hi Rob, > > first, thanks for the report. > > Rob Paisley writes: > >> All: >> >> I run three monitors, two vertical and 1 horizontal. >> >> My login manager mirrors the two vertical monitors and ignores the horizontal >> one. >> >> Upon login, I open a shell in ratpoison (1.4.6), > > While there shouldn't be relevant xinerama/xrandr changes between 1.4.8 > and 1.4.6, it would really help if you used the most recent release in > tests. > >> turn my head sideways >> (improper rotation of monitors) and type "sh bin/rotate.sh && exit >> >> rotate.sh is as follows: >> xrandr --output DisplayPort-0 --auto --rotate left--primary \ >>--output DVI-0 --auto --rotate left--right-of >> DisplayPort-0 \ >>--output DisplayPort-1-1--auto --rotate normal --left-of >> DisplayPort-0 >> >> Then run ratpoison's newwm with ratpoison as the argument. > > FWIW there's some syntactic sugar for this: "restart". > >> This causes >> ratpoison to re-detect the screens and I continue my workflow normally >> with everything in harmony. ratpoison shows three screens, and I move >> between them with nextscreen/prevscreen as usual. > > sigh, I didn't even know that such an xrandr-based setup was already > supported. > >> This beta starts the same (as expected). The two vertical monitors are >> mirrored and incorrectly rotated. I expected that when I ran my xrandr >> command >> not to have to re-exec ratpoison to get directly to a correct setup. No >> change. >> >> I tried the newwm command and that seems to have decided that all three >> screens were one really big screen. >> >> Here's what I see from 'ratpoison -c sdump -c fdump' at various times. >> before: Right after login >> xrandr: After I've run xrandr from above >> after: After I've issued "newwm ratpoison" >> >> $ cat 1.4.6-before.txt 1.4.6-after.txt >> 0 0 0 1600 1200 1,1 0 0 1600 1200 0 >> (frame :number 0 :x 0 :y 0 :width 1600 :height 1200 :screenw 1600 :screenh >> 1200 :window 16777217 :last-access 0 :dedicated 0), >> 0 1600 0 1200 1600 1,1 2800 0 1200 1600 0,2 0 0 1600 1200 0 >> (frame :number 0 :x 0 :y 0 :width 1200 :height 1600 :screenw 1200 :screenh >> 1600 :window 16777217 :last-access 6 :dedicated 0), >> >> $ cat before.txt xrandr.txt reexec.txt >> 0 0 0 1600 1200 1,1 0 0 1600 1200 0 >> (frame :number 0 :x 0 :y 0 :width 1600 :height 1200 :screenw 1600 :screenh >> 1200 :window 18874369 :last-access 0 :dedicated 0), >> 0 0 0 1600 1200 1,1 0 0 1600 1200 0 >> (frame :number 0 :x 0 :y 0 :width 1600 :height 1200 :screenw 1600 :screenh >> 1200 :window 18874369 :last-access 5 :dedicated 0), >> 0 0 0 4000 1600 1 >> (frame :number 0 :x 0 :y 0 :width 4000 :height 1600 :screenw 4000 :screenh >> 1600 :window 18874369 :last-access 0 :dedicated 0) > > With Mathieu's diff, here's what I get here > > ritchie ~/src/ratpoison$ ratpoison -c sdump -c fdump > LVDS1 66 0 0 1280 800 1 > (frame :number 0 :x 0 :y 0 :width 1280 :height 800 :screenw 1280 :screenh 800 > :window 14680077 :last-access 1 :dedicated 0) > ritchie ~/src/ratpoison$ ratpoison -c sfdump > (frame :number 0 :x 0 :y 0 :width 1280 :height 800 :screenw 1280 :screenh 800 > :window 14680077 :last-access 1 :dedicated 0) 66 > > Note how the output format for sdump is different. I'm wondering > whether you actually have xrandr support built in. > > I have pushed this xrandr feature on the "xrandr" branch on savannah, > with a couple more commits to tweak autotools and runtime xrandr > detection. > > New tarballs: > http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-xrandr1.tar.gz > http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-xrandr1.tar.gz.sig > http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-xrandr1.tar.xz > http://wxcvbn.org/~jca/distfiles/ratpoison-1.4.9-xrandr1.tar.xz.sig > > Rob, could you please give this another try? Please always specify > ./configure --with-xrandr, and make sure you're actually running the > most recent executable. > > Thanks, > -- > jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE ___ Ratpoison-devel mailing list Ratpoison-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/ratpoison-devel
Re: [RP] [RFC v3] Add xrandr support
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 ratpoison. However, I have not tested support for vertical + horizontal screen setup. I'll test the new xrandr branch with your screen setup when I'll get some spare-time. Thanks, Mathieu ___ Ratpoison-devel mailing list Ratpoison-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/ratpoison-devel
Re: [RP] [RFC v3] Add xrandr support
Ratpoison: Results. The xrandr support works perfectly. Details to follow. # Before xrandr issues rotate/enable third monitor $ ratpoison -c version -c fdump -c sdump ratpoison 1.4.9-xrandr1 (frame :number 0 :x 0 :y 0 :width 1600 :height 1200 :screenw 1600 :screenh 1200 :window 18874369 :last-access 0 :dedicated 0) DVI-0 133 0 0 1600 1200 1,DisplayPort-0 132 0 0 1600 1200 0 # After xrandr $ ratpoison -c version -c fdump -c sdump ratpoison 1.4.9-xrandr1 (frame :number 0 :x 0 :y 0 :width 1200 :height 1600 :screenw 1200 :screenh 1600 :window 18874369 :last-access 9 :dedicated 0) DisplayPort-1-1 67 0 0 1600 1200 0,DisplayPort-0 132 1600 0 1200 1600 0,DVI-0 133 2800 0 1200 1600 1 I didn't bother with a :restart as it appears to have done everything properly. As always, thanks for keeping this window manager current! Rob On Tue, Nov 22, 2016 at 09:51:57AM +0100, Mathieu OTHACEHE wrote: > > 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 ratpoison. > > However, I have not tested support for vertical + horizontal screen > setup. I'll test the new xrandr branch with your screen setup when I'll > get some spare-time. > > Thanks, > > Mathieu > > ___ > Ratpoison-devel mailing list > Ratpoison-devel@nongnu.org > https://lists.nongnu.org/mailman/listinfo/ratpoison-devel ___ Ratpoison-devel mailing list Ratpoison-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/ratpoison-devel
Re: [RP] [RFC v3] Add xrandr support
> 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
Re: [RP] [RFC v3] Add xrandr support
Hi, I use ratpoison with xrandr for a few weeks (now with the xrandr branch on the official git repo), and it works well! A few things though (sorry if the vocabulary I use isn't accurate): 1. ':restart' command puts windows onto a display that isn't the primary display (VGA1). Here is my xrandr init command (generated with arandr): --8<---cut here---start->8--- xrandr --output VIRTUAL1 --off --output DP3 --off --output DP2 --off --output DP1 --off --output TV1 --off --output HDMI2 --off --output HDMI1 --off --output LVDS1 --primary --mode 1280x800 --pos 0x768 --rotate normal --output VGA1 --mode 1024x768 --pos 0x0 --rotate normal --8<---cut here---end--->8--- Here is the output of the 'xrandr' command: --8<---cut here---start->8--- LVDS1 connected primary 1280x800+0+768 (normal left inverted right x axis y axis) 261mm x 163mm 1280x800 59.99*+ 50.00 1024x768 60.00 800x600 60.3256.25 640x480 59.94 640x400 60.00 DP1 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) DP3 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) TV1 unknown connection (normal left inverted right x axis y axis) 848x480 59.94 + 640x480 59.94 + 1024x768 59.94 800x600 59.94 VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 376mm x 301mm 1280x1024 60.02 + 75.02 1152x864 75.00 1024x768 75.03* 60.00 800x600 75.0060.32 640x480 75.0059.94 720x400 70.08 VIRTUAL1 disconnected (normal left inverted right x axis y axis) --8<---cut here---end--->8--- 2. With a default conf (no xrandr command at all) and VGA1 plugged: The size of the windows I spawn on LVDS1 is 1024x768, with margins at bottom and right, so that the full display size (window + margins) is 1280x800. Output of 'xwininfo' on the problematic window: --8<---cut here---start->8--- xwininfo: Window id: 0xed "xterm" Absolute upper-left X: 0 Absolute upper-left Y: 0 Relative upper-left X: 0 Relative upper-left Y: 0 Width: 1020 Height: 754 Depth: 24 Visual: 0x20 Visual Class: TrueColor Border width: 1 Class: InputOutput Colormap: 0x22 (installed) Bit Gravity State: NorthWestGravity Window Gravity State: NorthWestGravity Backing Store State: NotUseful Save Under State: no Map State: IsViewable Override Redirect State: no Corners: +0+0 -258+0 -258-44 +0-44 -geometry 127x50+0+0 --8<---cut here---end--->8--- I expect windows to take the full display size instead, and no margins. If I do 'C-t N' before spawning windows, I get the behaviour I expect. Output of 'xwininfo' after I did 'C-t N': --8<---cut here---start->8--- xwininfo: Window id: 0xed "xterm" Absolute upper-left X: 0 Absolute upper-left Y: 0 Relative upper-left X: 0 Relative upper-left Y: 0 Width: 1276 Height: 784 Depth: 24 Visual: 0x20 Visual Class: TrueColor Border width: 1 Class: InputOutput Colormap: 0x22 (installed) Bit Gravity State: NorthWestGravity Window Gravity State: NorthWestGravity Backing Store State: NotUseful Save Under State: no Map State: IsViewable Override Redirect State: no Corners: +0+0 -2+0 -2-14 +0-14 -geometry 159x52+0+0 --8<---cut here---end--->8--- Output of 'xrandr': --8<---cut here---start->8--- Screen 0: minimum 8 x 8, current 1280 x 800, maximum 32767 x 32767 LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm 1280x800 59.99*+ 50.00 1024x768 60.00 800x600 60.3256.25 640x480 59.94 640x400 60.00 DP1 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) DP3 disconnected (normal left inverted right x axis y axis) HDMI1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) TV1 unknown connection (normal left inverted right x axis y axis) 848x480 59.94 + 640x480 59.94 + 1024x768 59.94 800x600 59.94 VGA1 connected 1024x768+0+0 (normal left inverted right x axis y axis) 376mm x 301mm 1280x1024 60.02 + 75.02 1152x864 75.00 1024x768 75.03* 60.00 800x600 75.0060.32 640x480 75.0059.94 720x400 70.08 VIRTUAL1 disconnected (normal left inverted right x axis y axis) --8<
Re: [RP] [RFC v3] Add xrandr support
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 (no xrandr command at all) and VGA1 plugged: This one is more delicate. I think it's about how screen mirroring is handled in ratpoison. I didn't investigate it yet but I think that when a screen is mirrored, we should add only one screen which resolution is resolution = min(resolution_screen1, resolution_screen2, ...) I have to think more about it. Mathieu ___ Ratpoison-devel mailing list Ratpoison-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/ratpoison-devel