From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26253 invoked by alias); 18 Dec 2012 17:37:29 -0000 Received: (qmail 26042 invoked by uid 22791); 18 Dec 2012 17:37:27 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from smtpout.karoo.kcom.com (HELO smtpout.karoo.kcom.com) (212.50.160.34) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 18 Dec 2012 17:37:18 +0000 Received: from 213-152-38-55.dsl.eclipse.net.uk (HELO [192.168.1.102]) ([213.152.38.55]) by smtpout.karoo.kcom.com with ESMTP; 18 Dec 2012 17:37:16 +0000 Message-ID: <50D0A9D2.6040108@dronecode.org.uk> Date: Tue, 18 Dec 2012 17:37:00 -0000 From: Jon TURNEY Reply-To: cygwin-xfree User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: cygwin-xfree@cygwin.com CC: heiko.bihr@secunet.com Subject: Re: Excess MotionNotify events to a minimized window in multiwindow mode References: <50C6318E.1020608@secunet.com> <50CF66A7.9060302@dronecode.org.uk> <50D01B76.5090905@secunet.com> In-Reply-To: <50D01B76.5090905@secunet.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-xfree-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-xfree-owner@cygwin.com Reply-To: cygwin-xfree@cygwin.com Mail-Followup-To: cygwin-xfree@cygwin.com X-SW-Source: 2012-12/txt/msg00019.txt.bz2 On 18/12/2012 07:29, Heiko Bihr wrote: > On 17.12.2012 19:38, Jon TURNEY wrote: >> On 10/12/2012 19:01, Heiko Bihr wrote: >>> I think, there is a problem with mouse polling in multiwindow mode >>> (XWin.exe :0 -multiwindow) in Cygwin/X 1.13. >>> If a window gets maximized and then minimized, it will receive motion >>> notify events, whenever the user moves the mouse cursor over the screen. >> I'm not sure I follow your reasoning. If you run 'xev -root', you can see >> that MotionNotify events are sent from everywhere. >> >> Is there some specific problem you are trying to fix? > We're running a terminal server setup, that delivers X11 applications > (e.g. firefox) via X display forwarding to users' desktops, which run > Cygwin/X in multiwindow mode. > We noticed quite some network traffic, even if all application windows > were minimized. This network traffic is caused by the MotionNotify > events, that were still reported to miminized windows. As we want to > serve 500+ users, we have to keep an eye on network traffic. It might be relevant to note that MotionNotify events were potentially being sent every time the polling timer fired, even if the mouse wasn't moved. This was fixed in 1.13.0-1. In any case, the events should only be sent to clients which have registered an interest using XSelectInput() with PointerMotionMask. >> Thanks for the patch. >> >> There are definitely some things wrong with the way that this mouse pointer >> polling timer works, I noticed during testing that is was possible sometimes >> to move the pointer out of an xeyes without starting the polling timer. >> >> I'm not sure this patch is right though: With this patch applied, if you have >> 2 xeyes running, minimizing the first one stops the second one from tracking >> the mouse pointer. > You're right. I did not test with xeyes (although I noticed it being > mentioned in a comment), but only with our applications. > > Unfortunately, I'm not that familiar with Cygwin/X' internal data > structures and window handler functions. I thought, each window will > have its own timer. But after looking into the source again, i assume, > this timer is a global one. > > Maybe it would be a better approach to disable reporting of MotionNotify > events to minimized X client windows, instead of messing with the timer. > I'll take a look at it. Unfortunately, the way that XWin treats minimized windows is not correct (which also causes other problems), they should probably be unmapped, but aren't. I did work on some patches fixing that a while ago, but that ended up getting blocked by other problems, which I think have now been fixed, so it might be worth revisiting them. -- Jon TURNEY Volunteer Cygwin/X X Server maintainer -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://x.cygwin.com/docs/ FAQ: http://x.cygwin.com/docs/faq/