Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package x2x for openSUSE:Factory checked in 
at 2026-09-17 16:59:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/x2x (Old)
 and      /work/SRC/openSUSE:Factory/.x2x.new.383539 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "x2x"

Thu Sep 17 16:59:19 2026 rev:23 rq:1378468 version:1.30rc1+git.20250217

Changes:
--------
--- /work/SRC/openSUSE:Factory/x2x/x2x.changes  2025-02-17 20:57:53.032872530 
+0100
+++ /work/SRC/openSUSE:Factory/.x2x.new.383539/x2x.changes      2026-09-17 
16:59:20.937938367 +0200
@@ -1,0 +2,14 @@
+Wed Sep 16 20:27:57 UTC 2026 - Martin Pluskal <[email protected]>
+
+- Update to version 1.30rc1+git.20250217:
+  * gcc 15 compatibility via prototyped function declarations
+  * Make trigger windows InputOutput so -resurface works
+  * Honor -completeregion* edges when mapping the pointer
+  * Add -win-output and -win-transparent for windows too close
+    to the screen edge
+- Drop x2x-gcc15.patch: adopted upstream
+- Convert _service from mode=disabled to mode=manual
+- Spec cleanup: drop unused pkgconfig(xscrnsaver) and stale
+  CPPFLAGS=-Wno-unprototyped-calls; add gcc, make, autoconf-archive
+
+-------------------------------------------------------------------

Old:
----
  x2x-1.30rc1+git.20180517.tar.xz
  x2x-gcc15.patch

New:
----
  x2x-1.30rc1+git.20250217.tar.xz

----------(Old B)----------
  Old:    to the screen edge
- Drop x2x-gcc15.patch: adopted upstream
- Convert _service from mode=disabled to mode=manual
----------(Old E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ x2x.spec ++++++
--- /var/tmp/diff_new_pack.NtAJTx/_old  2026-09-17 16:59:21.666968917 +0200
+++ /var/tmp/diff_new_pack.NtAJTx/_new  2026-09-17 16:59:21.669969043 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package x2x
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,21 +17,20 @@
 
 
 Name:           x2x
-Version:        1.30rc1+git.20180517
+Version:        1.30rc1+git.20250217
 Release:        0
 Summary:        X Window System Display Remote Control
 License:        GPL-2.0-or-later
-Group:          System/X11/Utilities
 URL:            https://github.com/dottedmag/x2x
 Source:         %{name}-%{version}.tar.xz
-# https://github.com/dottedmag/x2x/issues/45
-Patch0:         x2x-gcc15.patch
 BuildRequires:  autoconf
+BuildRequires:  autoconf-archive
 BuildRequires:  automake
+BuildRequires:  gcc
+BuildRequires:  make
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(x11)
 BuildRequires:  pkgconfig(xext)
-BuildRequires:  pkgconfig(xscrnsaver)
 BuildRequires:  pkgconfig(xtst)
 
 %description
@@ -42,9 +41,9 @@
 %autosetup -p1
 
 %build
-autoreconf -i
-%configure CPPFLAGS="-Wno-unprototyped-calls"
-make %{?_smp_mflags}
+autoreconf -fi
+%configure
+%make_build
 
 %install
 %make_install
@@ -52,5 +51,5 @@
 %files
 %{_bindir}/x2x
 %{_datadir}/doc/x2x/
-%{_mandir}/man1/x2x.1%{ext_man}
+%{_mandir}/man1/x2x.1%{?ext_man}
 

++++++ _service ++++++
--- /var/tmp/diff_new_pack.NtAJTx/_old  2026-09-17 16:59:21.716971012 +0200
+++ /var/tmp/diff_new_pack.NtAJTx/_new  2026-09-17 16:59:21.720971180 +0200
@@ -1,16 +1,16 @@
 <services>
-  <service name="tar_scm" mode="disabled">
+  <service name="tar_scm" mode="manual">
     <param name="url">https://github.com/dottedmag/x2x.git</param>
     <param name="scm">git</param>
     <param name="exclude">.git</param>
     <param name="filename">x2x</param>
-    <param name="revision">ff2006cb8fcb602c0b96bea767df854d2d243713</param>
+    <param name="revision">08842516fa443a2cf799c6372f83466062f612c9</param>
     <param name="versionformat">1.30rc1+git.%cd</param>
   </service>
-  <service name="recompress" mode="disabled">
+  <service name="recompress" mode="manual">
     <param name="file">*.tar</param>
     <param name="compression">xz</param>
   </service>
-  <service name="set_version" mode="disabled" />
+  <service name="set_version" mode="manual" />
 </services>
 

++++++ x2x-1.30rc1+git.20180517.tar.xz -> x2x-1.30rc1+git.20250217.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/x2x-1.30rc1+git.20180517/.gitignore 
new/x2x-1.30rc1+git.20250217/.gitignore
--- old/x2x-1.30rc1+git.20180517/.gitignore     1970-01-01 01:00:00.000000000 
+0100
+++ new/x2x-1.30rc1+git.20250217/.gitignore     2025-02-17 23:34:51.000000000 
+0100
@@ -0,0 +1,21 @@
+*.o
+.deps/
+/INSTALL
+/aclocal.m4
+/autom4te.cache/
+/compile
+/config.guess
+/config.h
+/config.h.in
+/config.log
+/config.status
+/config.sub
+/configure
+/depcomp
+/install-sh
+/lawyerese.c
+/missing
+/stamp-h1
+/x2x
+Makefile
+Makefile.in
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/x2x-1.30rc1+git.20180517/INSTALL 
new/x2x-1.30rc1+git.20250217/INSTALL
--- old/x2x-1.30rc1+git.20180517/INSTALL        2018-05-17 21:55:02.000000000 
+0200
+++ new/x2x-1.30rc1+git.20250217/INSTALL        2025-02-17 23:34:51.000000000 
+0100
@@ -1,4 +1,5 @@
 Just build/install x2x as any other autotools-based program.
+See README.md for details installing on Fedora and Ubuntu.
 
 Configuration options:
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/x2x-1.30rc1+git.20180517/Makefile.am 
new/x2x-1.30rc1+git.20250217/Makefile.am
--- old/x2x-1.30rc1+git.20180517/Makefile.am    2018-05-17 21:55:02.000000000 
+0200
+++ new/x2x-1.30rc1+git.20250217/Makefile.am    2025-02-17 23:34:51.000000000 
+0100
@@ -46,7 +46,7 @@
 # -- Various --
 
 dist_doc_DATA = AUTHORS ChangeLog ChangeLog.old COPYING COPYING.win32  \
-    README docs/HostBasedAuthentication.txt                            \
+    README.md docs/HostBasedAuthentication.txt                         \
     docs/MIT-MAGIC-COOKIE-1.txt docs/SshTunneling.txt                  \
     docs/X2xUsage.txt
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/x2x-1.30rc1+git.20180517/README 
new/x2x-1.30rc1+git.20250217/README
--- old/x2x-1.30rc1+git.20180517/README 2018-05-17 21:55:02.000000000 +0200
+++ new/x2x-1.30rc1+git.20250217/README 1970-01-01 01:00:00.000000000 +0100
@@ -1,42 +0,0 @@
-x2x
-===
-
-Overview
---------
-
-x2x allows the keyboard, mouse on one X display to be used to control another X
-display. It also shares X clipboards between the displays.
-
-When built/run on Cygwin it may be run on Windows desktop to control X display.
-
-License
--------
-
-x2x is under MIT/BSD license.
-
-Windows support includes code under GPL2 or later.
-
-Call for help
--------------
-
-x2x has a long history. It was born in the times when life was hard, window
-managers were simple and displays were rectangle. Several implicit assumptions
-survived during the x2x lifetime, and now need reconsideration. As x2x is 
simple
-(however, it has accumulated inner knowledge of X11 implementations), we are
-looking for brave person who can read and understand whole x2x and will write
-new x2x, adapted to the modern life of dynamically attached and detached
-displays, complex data transferring through the X selections and Xinerama.
-
-Authors
--------
-
-x2x was initially developed in DEC by David Chaiken.
-Current maintainer is Mikhail Gusarov.
-
-== Installing on Fedora  ==
-
-1. git clone
-2. ./bootstrap.sh
-3. sudo yum -y install libXext-devel libXtst-devel
-4. ./configure
-5.  make; make install
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/x2x-1.30rc1+git.20180517/README.md 
new/x2x-1.30rc1+git.20250217/README.md
--- old/x2x-1.30rc1+git.20180517/README.md      1970-01-01 01:00:00.000000000 
+0100
+++ new/x2x-1.30rc1+git.20250217/README.md      2025-02-17 23:34:51.000000000 
+0100
@@ -0,0 +1,54 @@
+# x2x
+
+## Project status
+
+Dormant. This project needs a new maintainer.
+
+x2x has a long history. It was born in the times when life was hard, window
+managers were simple and displays were rectangular. Now it needs an overhaul.
+
+## Overview
+
+x2x allows the keyboard, mouse on one X display to be used to control another X
+display. It also shares X clipboards between the displays.
+
+When built/run on Cygwin it may be run on Windows desktop to control X display.
+
+## License
+
+x2x is under MIT/BSD license.
+
+Windows support includes code under GPLv2+.
+
+## Authors
+
+x2x was initially developed in DEC by David Chaiken.
+Current maintainer is Mikhail Gusarov.
+
+## Building on Various Systems
+
+### Building on Arch
+
+1. `git clone https://github.com/dottedmag/x2x && cd x2x`
+2. `./bootstrap.sh`
+3. `sudo pacman -S libxext libxtst`
+4. `./configure`
+5. `make && sudo make install`
+
+If you want the simple solution, there is also a package in the 
[AUR](https://aur.archlinux.org/packages/x2x-git) for x2x.
+
+###  Building on Fedora
+
+1. `git clone https://github.com/dottedmag/x2x && cd x2x`
+2. `./bootstrap.sh`
+3. `sudo dnf -y install libXext-devel libXtst-devel`
+4. `./configure`
+5. `make && sudo make install`
+
+### Building on Debian or Debian-Derivative like Ubuntu
+
+1. `git clone https://github.com/dottedmag/x2x && cd x2x`
+2. `git checkout debian`
+3. `dpkg-checkbuilddeps` (and `sudo apt install` anything missing)
+4. `env DEB_RULES_REQUIRES_ROOT=no debian/rules binary`
+5. `sudo dpkg --install ../x2x_VERSION.deb`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/x2x-1.30rc1+git.20180517/x2x.1 
new/x2x-1.30rc1+git.20250217/x2x.1
--- old/x2x-1.30rc1+git.20180517/x2x.1  2018-05-17 21:55:02.000000000 +0200
+++ new/x2x-1.30rc1+git.20250217/x2x.1  2025-02-17 23:34:51.000000000 +0100
@@ -197,6 +197,17 @@
 behavior if another application tries to do the same thing.  Useful for
 login scripts.
 .TP
+.B \-win-output
+.IP
+Makes the small window ("trigger window") on the side of the "from" display
+an InputOutput window instead of an InputOnly window. Visibility notification
+events are never generated for InputOnly window, therefore -resurface would
+not work for InputOnly window. Use -win-output together with -resurface.
+.TP
+.B \-win-transparent
+.IP
+Makes the small window ("trigger window") transparent. Use with -win-output 
option.
+.TP
 .B \-struts
 .IP
 Advertise struts in _NET_WM_STRUT
@@ -318,6 +329,29 @@
 run directly indirectly on primary:
 .IP
 primary $ ssh \-A secondary env DISPLAY=:0.0 ssh \-X primary x2x \-from :0 
\-east
+
+.RE
+If your primary display is configured with several monitors having different
+resolutions, \-completeregion(left|up|right|low) options can be helpful.
+suppose that you have two monitors connected to the primary system and the
+resolution of the left-side monitor is 300x300 while the right-side one is
+400x400.  Also, you aligned these two monitors to be vertically centric.
+Therefore, your primary system has virtually 700x400 resolution.
+
+The left monitor covers (0,50,300,350) of the virtual total resolution while
+the right monitor covers (300,0,700,400). The four numbers each represent left,
+top, right, and bottom. Also, you have two dead spaces: (0,0,300,50) and
+(0,350,300,400). Thus, the complete square region for this configuration would
+be (0,50,700,350).
+
+If no explicit description is provided, the x2x recognizes the virtual total
+resolution (0,0,700,400) only. As a consequence, the dead space region cannot
+be reached in the secondary system.  You can solve this problem by teaching x2x
+that the real complete square region for the secondary system (0,50,700,350)
+using the \-comptereregion(left|up|right|low) options as below:
+.IP
+\-completeregionleft 0 \-completeregionup 50 -completeregionright 700 
-completeregionlow 350
+
 .SH SEE ALSO
 The
 .URL http://synergy-project.org "synergy program"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/x2x-1.30rc1+git.20180517/x2x.c 
new/x2x-1.30rc1+git.20250217/x2x.c
--- old/x2x-1.30rc1+git.20180517/x2x.c  2018-05-17 21:55:02.000000000 +0200
+++ new/x2x-1.30rc1+git.20250217/x2x.c  2025-02-17 23:34:51.000000000 +0100
@@ -137,46 +137,6 @@
 #define EDGE_WEST   4 /* from display is on the west side of to display */
 
 /**********
- * functions
- **********/
-static void    ParseCommandLine();
-static Display *OpenAndCheckDisplay();
-static Bool    CheckTestExtension();
-#ifndef WIN_2_X
-static int     ErrorHandler();
-#endif
-static void    DoDPMSForceLevel();
-static void    DoX2X();
-static void    InitDpyInfo();
-static void    DoConnect();
-static void    DoDisconnect();
-static void    RegisterEventHandlers();
-static Bool    ProcessEvent();
-static Bool    ProcessMotionNotify();
-static Bool    ProcessExpose();
-static void    DrawWindowText();
-static Bool    ProcessEnterNotify();
-static Bool    ProcessButtonPress();
-static Bool    ProcessButtonRelease();
-static Bool    ProcessKeyEvent();
-static Bool    ProcessConfigureNotify();
-static Bool    ProcessClientMessage();
-static Bool    ProcessSelectionRequest();
-static void    SendPing();
-static Bool    ProcessPropertyNotify();
-static Bool    ProcessSelectionNotify();
-static void    SendSelectionNotify();
-static Bool    ProcessSelectionClear();
-static Bool    ProcessVisibility();
-static Bool    ProcessMapping();
-static void    FakeThingsUp();
-static void    FakeAction();
-static void    RefreshPointerMapping();
-static void    Usage();
-static void    *xmalloc();
-
-
-/**********
  * stuff for selection forwarding
  **********/
 typedef struct _dpyxtra {
@@ -187,16 +147,6 @@
   Window propWin;
 } DPYXTRA, *PDPYXTRA;
 
-/**********
- * structures for recording state of buttons and keys
- **********/
-typedef struct _fakestr {
-  struct _fakestr *pNext;
-  int type;
-  KeySym thing;
-  KeyCode code;
-} FAKE, *PFAKE;
-
 #define FAKE_KEY    0
 #define FAKE_BUTTON 1
 
@@ -222,6 +172,17 @@
 #define MAX_UNREASONABLES 10
 
 /**********
+ * structures for recording state of buttons and keys
+ **********/
+typedef struct _fakestr {
+  struct _fakestr *pNext;
+  int type;
+  KeySym thing;
+  KeyCode code;
+} FAKE, *PFAKE;
+
+
+/**********
  * display information
  **********/
 typedef struct {
@@ -321,7 +282,48 @@
   KeySym keysym;
 } STICKY, *PSTICKY;
 
-typedef int  (*HANDLER)(); /* event handler function */
+typedef int  (*HANDLER)(Display *, PDPYINFO, XEvent *); /* event handler 
function */
+
+/**********
+ * functions
+ **********/
+static void    ParseCommandLine(int, char **);
+static Display *OpenAndCheckDisplay(char *);
+static Bool    CheckTestExtension(Display *);
+#ifndef WIN_2_X
+static int     ErrorHandler(Display *, XErrorEvent *);
+#endif
+static void    DoDPMSForceLevel(PSHADOW, CARD16);
+static void    DoX2X(Display *, Display *);
+static void    InitDpyInfo(PDPYINFO);
+static void    DoConnect(PDPYINFO);
+static void    DoDisconnect(PDPYINFO);
+static void    RegisterEventHandlers(PDPYINFO);
+static Bool    ProcessEvent(Display *, PDPYINFO);
+static Bool    ProcessMotionNotify(Display*, PDPYINFO, XMotionEvent*);
+static Bool    ProcessExpose();
+static void    DrawWindowText(PDPYINFO);
+static Bool    ProcessEnterNotify();
+static Bool    ProcessButtonPress();
+static Bool    ProcessButtonRelease();
+static Bool    ProcessKeyEvent();
+static Bool    ProcessConfigureNotify();
+static Bool    ProcessClientMessage();
+static Bool    ProcessSelectionRequest();
+static void    SendPing(Display *, PDPYXTRA);
+static Bool    ProcessPropertyNotify();
+static Bool    ProcessSelectionNotify();
+static void    SendSelectionNotify(XSelectionRequestEvent *);
+static Bool    ProcessSelectionClear();
+static Bool    ProcessVisibility();
+static Bool    ProcessMapping();
+static void    FakeThingsUp(PDPYINFO);
+static void    FakeAction(PDPYINFO, int, KeySym, Bool);
+static void    RefreshPointerMapping(Display *, PDPYINFO);
+static void    Usage();
+static void    *xmalloc(size_t);
+
+
 
 /* These prototypes need the typedefs */
 #ifdef WIN_2_X
@@ -364,6 +366,8 @@
 static Bool    doSel        = True;
 static Bool    doAutoUp     = True;
 static Bool    doResurface  = False;
+static Bool    winTransparent = False;
+static Bool    doInputOnly  = True;
 static PSHADOW shadows      = NULL;
 static int     triggerw     = 2;
 static Bool    doPointerMap = True;
@@ -732,6 +736,12 @@
       doResurface = True;
 
       debug("will resurface the trigger window when obscured\n");
+    } else if (!strcasecmp(argv[arg], "-win-output")) {
+      doInputOnly = False;
+      debug("trigger window will be an InputOutput window\n");
+    } else if (!strcasecmp(argv[arg], "-win-transparent")) {
+      winTransparent = True;
+      debug("trigger window will be transparent\n");
     } else if (!strcasecmp(argv[arg], "-shadow")) {
       if (++arg >= argc) Usage();
       pShadow = (PSHADOW)xmalloc(sizeof(SHADOW));
@@ -795,14 +805,20 @@
   printf("       -nosel\n");
   printf("       -noautoup\n");
   printf("       -resurface\n");
+  printf("       -win-output\n");
+  printf("       -win-transparent\n");
   printf("       -capslockhack\n");
   printf("       -nocapslockhack\n");
   printf("       -clipcheck\n");
   printf("       -shadow <DISPLAY>\n");
-  printf("       -sticky <sticky key>\n");
+  printf("       -sticky <STICKY KEY>\n");
   printf("       -label <LABEL>\n");
   printf("       -title <TITLE>\n");
-  printf("       -buttonmap <button#> \"<keysym> ...\"\n");
+  printf("       -buttonmap <BUTTON#> \"<KEYSYM> ...\"\n");
+  printf("       -completeregionleft <COORDINATE>\n");
+  printf("       -completeregionright <COORDINATE>\n");
+  printf("       -completeregionup <COORDINATE>\n");
+  printf("       -completeregionlow <COORDINATE>\n");
   printf("       -struts\n");
 #ifdef WIN_2_X
   printf("       -offset [-]<pixel offset of \"to\">\n");
@@ -1058,6 +1074,11 @@
                                       || doEdge == EDGE_SOUTH);
 #endif
 
+  if (compRegRight == 0)
+   compRegRight = fromWidth;
+  if (compRegLow == 0)
+    compRegLow = fromHeight;
+
 #ifdef WIN_2_X
   if (fromDpy != fromWin) {
 #endif
@@ -1100,19 +1121,19 @@
     /* trigger window location */
     if (doEdge == EDGE_NORTH) {
       triggerLoc = 0;
-      pDpyInfo->fromConnCoord = fromHeight - triggerw - 1;
+      pDpyInfo->fromConnCoord = compRegLow - triggerw - 1;
       pDpyInfo->fromDiscCoord = triggerw;
     } else if (doEdge == EDGE_SOUTH) {
       triggerLoc = fromHeight - triggerw;
-      pDpyInfo->fromConnCoord = 1;
+      pDpyInfo->fromConnCoord = compRegUp + 1;
       pDpyInfo->fromDiscCoord = triggerLoc - 1;
     } else if (doEdge == EDGE_EAST) {
       triggerLoc = fromWidth - triggerw;
-      pDpyInfo->fromConnCoord = 1;
+      pDpyInfo->fromConnCoord = compRegLeft + 1;
       pDpyInfo->fromDiscCoord = triggerLoc - 1;
     } else /* doEdge == EDGE_WEST */ {
       triggerLoc = 0;
-      pDpyInfo->fromConnCoord = fromWidth - triggerw - 1;
+      pDpyInfo->fromConnCoord = compRegRight - triggerw - 1;
       pDpyInfo->fromDiscCoord = triggerw;
     } /* END if doEdge == ... */
 
@@ -1209,13 +1230,16 @@
         --09/27/99 Greg J. Badros <[email protected]> */
     /* also, make it an InputOnly window so I don't lose
        screen real estate --09/29/99 gjb */
+    /* make it InputOutput when argument -win-output presents,
+       so to get window visibility change event and make -resurface work */
+    /* make it InputOutput so to make -resurface work*/ 
     trigger = pDpyInfo->trigger =
       XCreateWindow(fromDpy, root,
                     vertical ? triggerw : triggerLoc,
                     vertical ? triggerLoc : triggerw,
                     vertical ? fromWidth - (2*triggerw) : triggerw,
                     vertical ? triggerw : fromHeight - (2*triggerw),
-                    0, 0, InputOnly, 0,
+                    0, 0, InputOutput, 0,
                     CWOverrideRedirect, &xswa);
 
     pDpyInfo->netWmWindowTypeAtom = XInternAtom(fromDpy, 
"_NET_WM_WINDOW_TYPE", True);
@@ -1329,6 +1353,14 @@
   pDpyInfo->wmdwAtom = XInternAtom(fromDpy, "WM_DELETE_WINDOW", True);
   XSetWMProtocols(fromDpy, trigger, &(pDpyInfo->wmdwAtom), 1);
 
+  /* making the trigger window transparent */
+  if (winTransparent) {
+    u_int32_t cardinal_alpha = (u_int32_t) (0);
+    XChangeProperty(fromDpy, trigger,
+      XInternAtom(fromDpy, "_NET_WM_WINDOW_OPACITY", 0),
+      XA_CARDINAL, 32, PropModeReplace, (u_int8_t*) &cardinal_alpha,1);
+  };
+
   /* mdh - Put in Chaiken's change to make this InputOnly */
   if (doBig) {
     big = pDpyInfo->big =
@@ -1381,10 +1413,6 @@
 
     debug_cmpreg("fromWidth/Height: %d/%d, toWidth/Height: %d/%d\n",
                    fromWidth, fromHeight, toWidth, toHeight);
-    if (compRegRight == 0)
-           compRegRight = fromWidth;
-    if (compRegLow == 0)
-           compRegLow = fromHeight;
     if (noScale) {
         /* TODO:
             - the fake tables should be built as "starting ignored", 1:1 map
@@ -1404,37 +1432,42 @@
     } else {
         /* vertical conversion table */
         for (counter = 0; counter < fromHeight; ++counter)
-          yTable[counter] = (counter < compRegUp || counter > compRegLow) ?
-                   100 :
-                   (counter - compRegUp) * toHeight / (compRegLow - compRegUp);
+          yTable[counter] =
+            (counter < compRegUp) ? 0 :
+            (counter > compRegLow) ? toHeight - 1 :
+            (counter - compRegUp) * toHeight / (compRegLow - compRegUp);
 
         /* vertical conversion table */
         for (counter = 0; counter < fromWidth; ++counter)
-          xTable[counter] = (counter < compRegLeft || counter > compRegRight) ?
-                   100 :
-                   (counter - compRegLeft) * toWidth /
-                   (compRegRight - compRegLeft);
+          xTable[counter] =
+            (counter < compRegLeft) ? 0 :
+            (counter > compRegRight) ? toWidth - 1 :
+            (counter - compRegLeft) * toWidth / (compRegRight - compRegLeft);
     }
 
     /* adjustment for boundaries */
     if (vertical) {
-      if ((screenNum != 0) || (doEdge == EDGE_SOUTH))
-        yTable[0] = COORD_DECR;
+      if ((screenNum != 0) || (doEdge == EDGE_SOUTH)) {
+        for (counter = 0; counter <= compRegUp; ++counter)
+          yTable[counter] = COORD_DECR;
+      }
       if (((screenNum + 1) < nScreens) || (doEdge == EDGE_NORTH)) {
-        yTable[fromHeight - 1] = COORD_INCR;
         /* work-around for bug: on at least one tested screen, cursor
            never moved past fromWidth - 2  (I'll assume this might apply
            in the vertical case, too. --cpbs) */
-        yTable[fromHeight - 2] = COORD_INCR;
+        for (counter = compRegLow - 2; counter < fromHeight; ++counter)
+          yTable[counter] = COORD_INCR;
       }
     } else {
-      if ((screenNum != 0) || (doEdge == EDGE_EAST))
-        xTable[0] = COORD_DECR;
+      if ((screenNum != 0) || (doEdge == EDGE_EAST)) {
+        for (counter = 0; counter <= compRegLeft; ++counter)
+          xTable[counter] = COORD_DECR;
+      }
       if (((screenNum + 1) < nScreens) || (doEdge == EDGE_WEST)) {
-        xTable[fromWidth - 1] = COORD_INCR;
         /* work-around for bug: on at least one tested screen, cursor
            never moved past fromWidth - 2 */
-        xTable[fromWidth - 2] = COORD_INCR;
+        for (counter = compRegRight - 2; counter < fromWidth; ++counter)
+          xTable[counter] = COORD_INCR;
       }
     }
 

Reply via email to