NetBSD Problem Report #51348

From  Tue Jul 19 23:48:12 2016
Return-Path: <>
Received: from ( [])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "", Issuer "Postmaster" (verified OK))
	by (Postfix) with ESMTPS id D749B7A20F
	for <>; Tue, 19 Jul 2016 23:48:12 +0000 (UTC)
Message-Id: <>
Date: Wed, 20 Jul 2016 01:48:08 +0200 (CEST)
Subject: Left-handed Mouse doesn't (always) work [incl. likely fix]
X-Send-Pr-Version: 3.95

>Number:         51348
>Category:       xsrc
>Synopsis:       Left-handed Mouse doesn't (always) work [incl. likely fix]
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    xsrc-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 19 23:50:00 +0000 2016
>Originator:     Rhialto
>Release:        NetBSD 7.0.1


System: NetBSD 7.0.1 NetBSD 7.0.1 (GENERIC.201605221355Z) amd64
Architecture: x86_64
Machine: amd64
	Left-handed Mouse doesn't (always) work [incl. likely fix]

In fact it only starts failing when I use gtk3+ programs (Abiword,
wireshark-gtk, transmission-gtk), but according to the gnome bug tracker
it is really an X server issue, and supposed to be fixed in some
x-server 1.11.x version. Howevever, X in base is only "X.Org X Server

In references, see 

bug reported to AbiWord:
    workaround: GDK_CORE_DEVICE_EVENTS=1

Inline from the bug reported to AbiWord:

I use Abiword 3.0.1 on NetBSD 7.0 as packaged by pkgsrc, with NetBSD's X
(not pkgsrc X).

The problems I see is that mouse clicking and dragging does not work. I
can just about click into the text of a document, but if I drag, no
selection is made. If I then try to click on any GUI element, it doesn't
register that I clicked. Instead it seems to think I tried to click into
the text, and it sometimes scrolls some text into view.

This true for all tools in the toolbar, the scrollbar for the document,
even the menus and the layout ruler at the top of the text.

Sometimes if I switch to a different workspace and back, then the GUI
elements work for a short time.

This problem did not exist before version 3.0 (probably related to the
use of the new look of gtk3).
I have considered that it may be a gtk3 bug in general, but given my
results on my laptop it gets even weirder: With Calibre (the ebook
viewer/manager), which is a Qt program, there is also a difference
between the two computers. On the laptop again it's fine, on the desktop
it always selects whole paragraphs of text even when single clicking.


I had the inspiration to try to undo my left-handed mouse, and then the
problem went away. I set it up with

    xmodmap -e "pointer = 3 2 1 4 5 6 7 8 9 10 11"

When I went to report a gtk3+ bug, I found existing reports, which point
to "XI2" and/or the X server. According to the 3rd link above, it is
supposed to be fixed in some X server version 1.11.x.


Since the X server in base is 1.10.6, an update to 1.11.x after december
2011 would be good (or at least a pull-up of the equivalent of ) I didn't check this
myself but apparently it fixes the problem.

Looking at that patch, the file
xsrc/external/mit/xorg-server/dist/dix/inpututils.c doesn't seem to
match the patch: it does not even contain the string
"mouse->button->down". That fragment does however occur in 3 other

:.../mit/xorg-server/dist$ grep -r "mouse->button->down" .
./Xi/exevents.c:        if (BitIsOn(mouse->button->down, i))
./Xi/exevents.c:        if (BitIsOn(mouse->button->down, i))
./dix/events.c:        if (BitIsOn(mouse->button->down, i))

I am not sure if the change needs to be applied to all 3 locations or
just the file in ./dix. I suspect the former.

In the mean time there is a workaround to set the environment variable
GDK_CORE_DEVICE_EVENTS=1 which is documented as "If set, GDK makes does
not use the XInput extension, and only reacts to core X input events. ".

___ Olaf 'Rhialto' Seibert  -- Wayland: Those who don't understand X
\X/ rhialto/at/    -- are condemned to reinvent it. Poorly.


NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.