~ubuntu-branches/ubuntu/precise/xorg-server/precise-updates

« back to all changes in this revision

Viewing changes to hw/xnest/Events.c

Tags: 2:1.10.1-2
* Build xserver-xorg-core-udeb on hurd-i386.  Thanks, Samuel Thibault!
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
#include "windowstr.h"
26
26
#include "servermd.h"
27
27
#include "inputstr.h"
 
28
#include "inpututils.h"
28
29
 
29
30
#include "mi.h"
30
31
 
117
118
{
118
119
  XEvent X;
119
120
  int i, n, valuators[2];
 
121
  ValuatorMask mask;
120
122
  ScreenPtr pScreen;
121
123
  GetEventList(&xnestEvents);
122
124
 
133
135
      break;
134
136
      
135
137
    case ButtonPress:
 
138
      valuator_mask_set_range(&mask, 0, 0, NULL);
136
139
      xnestUpdateModifierState(X.xkey.state);
137
140
      lastEventTime = GetTimeInMillis();
138
141
      n = GetPointerEvents(xnestEvents, xnestPointerDevice, ButtonPress,
139
 
                           X.xbutton.button, POINTER_RELATIVE, 0, 0, NULL);
 
142
                           X.xbutton.button, POINTER_RELATIVE, &mask);
140
143
      for (i = 0; i < n; i++)
141
144
        mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event);
142
145
      break;
143
146
      
144
147
    case ButtonRelease:
 
148
      valuator_mask_set_range(&mask, 0, 0, NULL);
145
149
      xnestUpdateModifierState(X.xkey.state);
146
150
      lastEventTime = GetTimeInMillis();
147
151
      n = GetPointerEvents(xnestEvents, xnestPointerDevice, ButtonRelease,
148
 
                           X.xbutton.button, POINTER_RELATIVE, 0, 0, NULL);
 
152
                           X.xbutton.button, POINTER_RELATIVE, &mask);
149
153
      for (i = 0; i < n; i++)
150
154
        mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event);
151
155
      break;
153
157
    case MotionNotify:
154
158
      valuators[0] = X.xmotion.x;
155
159
      valuators[1] = X.xmotion.y;
 
160
      valuator_mask_set_range(&mask, 0, 2, valuators);
156
161
      lastEventTime = GetTimeInMillis();
157
162
      n = GetPointerEvents(xnestEvents, xnestPointerDevice, MotionNotify,
158
 
                           0, POINTER_ABSOLUTE, 0, 2, valuators);
 
163
                           0, POINTER_ABSOLUTE, &mask);
159
164
      for (i = 0; i < n; i++)
160
165
        mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event);
161
166
      break;
186
191
          NewCurrentScreen(inputInfo.pointer, pScreen, X.xcrossing.x, X.xcrossing.y);
187
192
          valuators[0] = X.xcrossing.x;
188
193
          valuators[1] = X.xcrossing.y;
 
194
          valuator_mask_set_range(&mask, 0, 2, valuators);
189
195
          lastEventTime = GetTimeInMillis();
190
196
          n = GetPointerEvents(xnestEvents, xnestPointerDevice, MotionNotify,
191
 
                               0, POINTER_ABSOLUTE, 0, 2, valuators);
 
197
                               0, POINTER_ABSOLUTE, &mask);
192
198
          for (i = 0; i < n; i++)
193
199
            mieqEnqueue(xnestPointerDevice, (InternalEvent*)(xnestEvents + i)->event);
194
200
          xnestDirectInstallColormaps(pScreen);