[PATCH] Making MPX work with more than one screen (api breaks!)

Paulo Ricardo Zanoni prz05 at c3sl.ufpr.br
Tue Apr 17 12:14:35 PDT 2007


Hi!

Today, MPX is not working with multiple screens: events are being generated in the wrong 
screen.

Causes:
X has the concept of the "current root window", which is the root window that the pointer 
is on (this is an assumption that there is only 1 pointer). In MPX we have multiple 
pointers, so there are pointers on multiple root windows at the same time, so this 
"current root window" concept doesn't make sense. Points to consider: 
GetCurrentRootWindow(), mieq's pEnqueueScreen and pDequeueScreen and dix's spriteTrace.

WARNING:
Solving this problem implies in major api breaks, and involves changing functions in a lot 
of places. I'm really not 100% sure that what I've done is the correct way, and THERE ARE 
points that still need to be changed. I'd like someone to please review the patch.
This is a patch to MPX, not to master!

What has been done:
- GetCurrentRootWindow() is now GetCurrentRootWindow(DeviceIntPtr). This breaks a few 
parts of the code. Some parts I've tried to fix (and I'm not sure they were correct), but 
in others (such as rrpointer.c, xwin and dmx) I just didn't know what would be the correct 
way, so I didn't fix them.
- spriteTrace was moved from dix/events.c to inside the SpriteRec structure. So now there 
is one spriteTrace for each sprite, not only one.
- pEnqueueScreen and pDequeueScreen were moved from the EventQueueRec to SpriteTraceRec, 
so there is one for each mouse.

I was planning to separate it into smaller patches, but this is really just one fix. I 
can't separate it into 2 or more patches that fix minor problems. Sorry.

The patch is attached.

Thanks!

Paulo.

-- 
Paulo Ricardo Zanoni
C3SL - Centro de Computação Científica e Software Livre
www.c3sl.ufpr.br
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: git-diff
URL: <http://lists.x.org/archives/xorg/attachments/20070417/40a1c6e7/attachment.ksh>


More information about the xorg mailing list