Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jan 2012 09:37:03 GMT
From:      Stephen Hurd <shurd@sasktel.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/164349: [PATCH] Xinerama :1 LeftOf or Above :0 mouse issues
Message-ID:  <201201210937.q0L9b3fO046921@red.freebsd.org>
Resent-Message-ID: <201201210940.q0L9e9Uc036004@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         164349
>Category:       ports
>Synopsis:       [PATCH] Xinerama :1 LeftOf or Above :0 mouse issues
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 21 09:40:08 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Stephen Hurd
>Release:        9.0-RELEASE
>Organization:
>Environment:
FreeBSD stephen.hurd.local 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC 2012     root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
As described here: https://bugs.freedesktop.org/show_bug.cgi?id=24986 Xinerama has a problem with multiple monitors when the second monitor is to the left of or above the first one.

In my configuration, the first monitor is the built-in display of the laptop and the second monitor is my TV which is "above" the laptop when I'm seated on the couch... swapping the positions of the two is not a valid solution.

The bug report talks about a crash, and has a patch to dix/events.c, but that patch seems to already be present in the port.  The only problem I see with the current port as-is is that when you cross the left/top edge, the mouse warps to the opposite edge instead of crossing onto the next monitor in that direction.
>How-To-Repeat:
Set up the second display above or to the left of the first as documented here:
https://bugs.freedesktop.org/show_bug.cgi?id=24986 and try to move the cursor onto the second monitor.
>Fix:
Apply the attached patch (suitable for the files directory) which is taken from the bug report above (renamed with .txt extension for upload).

This makes the position relative to the root window a signed integer rather than unsigned allowing events to be to the left of or above the root origin.

Patch attached with submission follows:

--- include/eventstr.h.orig	2012-01-21 01:10:48.000000000 -0800
+++ include/eventstr.h	2012-01-21 01:10:33.000000000 -0800
@@ -91,9 +91,9 @@
         uint32_t button;  /**< Button number */
         uint32_t key;     /**< Key code */
     } detail;
-    uint16_t root_x;      /**< Pos relative to root window in integral data */
+    int16_t root_x;      /**< Pos relative to root window in integral data */
     float root_x_frac;    /**< Pos relative to root window in frac part */
-    uint16_t root_y;      /**< Pos relative to root window in integral part */
+    int16_t root_y;      /**< Pos relative to root window in integral part */
     float root_y_frac;    /**< Pos relative to root window in frac part */
     uint8_t    buttons[(MAX_BUTTONS + 7)/8]; /**< Button mask */
     struct {


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201210937.q0L9b3fO046921>