public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
From: Jon TURNEY <jon.turney@dronecode.org.uk>
To: cygwin-xfree@cygwin.com
Cc: heiko.bihr@secunet.com
Subject: Re: Excess MotionNotify events to a minimized window in multiwindow mode
Date: Tue, 18 Dec 2012 17:37:00 -0000	[thread overview]
Message-ID: <50D0A9D2.6040108@dronecode.org.uk> (raw)
In-Reply-To: <50D01B76.5090905@secunet.com>

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/


      reply	other threads:[~2012-12-18 17:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-10 19:01 Heiko Bihr
2012-12-17 18:38 ` Jon TURNEY
2012-12-18  7:30   ` Heiko Bihr
2012-12-18 17:37     ` Jon TURNEY [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50D0A9D2.6040108@dronecode.org.uk \
    --to=jon.turney@dronecode.org.uk \
    --cc=cygwin-xfree@cygwin.com \
    --cc=heiko.bihr@secunet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).