diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-05-23 10:11:47 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-06-03 14:03:23 -0700 |
commit | a83cff9f4d622b069c96a68b4e87a669bf1f6446 (patch) | |
tree | b29de5e363feb6b7546ce69dfa0685316bf0b234 /record | |
parent | 217ccaa5a341018457f468a774c035c0df47d918 (diff) |
Move each screen's x/y origin into ScreenRec.
Many references to the dixScreenOrigins array already had the
corresponding screen pointer handy, which meant they usually looked like
"dixScreenOrigins[pScreen->myNum]". Adding a field to ScreenRec instead
of keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.
Since dix declared the dixScreenOrigins array, I figure allocating a
screen private for these values is overkill.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
Diffstat (limited to 'record')
-rw-r--r-- | record/record.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/record/record.c b/record/record.c index b81b7b2fa..46231c913 100644 --- a/record/record.c +++ b/record/record.c @@ -43,6 +43,7 @@ and Jim Haggerty of Metheus. #include "swaprep.h" #include "inputstr.h" #include "eventconvert.h" +#include "scrnintstr.h" #include <stdio.h> @@ -755,11 +756,11 @@ RecordSendProtocolEvents(RecordClientsAndProtocolPtr pRCAP, int scr = XineramaGetCursorScreen(inputInfo.pointer); memcpy(&shiftedEvent, pev, sizeof(xEvent)); shiftedEvent.u.keyButtonPointer.rootX += - dixScreenOrigins[scr].x - - dixScreenOrigins[0].x; + screenInfo.screens[scr]->x - + screenInfo.screens[0]->x; shiftedEvent.u.keyButtonPointer.rootY += - dixScreenOrigins[scr].y - - dixScreenOrigins[0].y; + screenInfo.screens[scr]->y - + screenInfo.screens[0]->y; pEvToRecord = &shiftedEvent; } #endif /* PANORAMIX */ |