344
346
pRegion = DamageRegion (scrpriv->pDamage);
346
if (REGION_NOTEMPTY (pScreen, pRegion))
348
if (RegionNotEmpty(pRegion))
351
nbox = REGION_NUM_RECTS (pRegion);
352
pbox = REGION_RECTS (pRegion);
353
nbox = RegionNumRects (pRegion);
354
pbox = RegionRects (pRegion);
749
751
ephyrUpdateModifierState(unsigned int state)
752
DeviceIntPtr pkeydev;
757
pkeydev = inputInfo.keyboard;
762
/* This is pretty broken.
764
* What should happen is that focus out should do as a VT switch does in
765
* traditional servers: fake releases for all keys (and buttons too, come
766
* to think of it) currently down. Then, on focus in, get the state from
767
* the host, and fake keypresses for everything currently down.
769
* So I'm leaving this broken for a little while. Sorry, folks.
754
DeviceIntPtr pDev = inputInfo.keyboard;
755
KeyClassPtr keyc = pDev->key;
763
xkb_state = XkbStateFieldFromRec(&pDev->key->xkbInfo->state);
776
764
state = state & 0xff;
778
if (keyc->state == state)
766
if (xkb_state == state)
781
for (i = 0, mask = 1; i < 8; i++, mask <<= 1)
785
/* Modifier is down, but shouldn't be */
786
if ((keyc->state & mask) && !(state & mask))
788
int count = keyc->modifierKeyCount[i];
790
for (key = 0; key < MAP_LENGTH; key++)
791
if (keyc->xkbInfo->desc->map->modmap[key] & mask)
796
kptr = &keyc->down[key >> 3];
797
bit = 1 << (key & 7);
799
if (*kptr & bit && ephyrKbd &&
800
((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled)
801
KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE); /* release */
808
/* Modifier shoud be down, but isn't */
809
if (!(keyc->state & mask) && (state & mask))
810
for (key = 0; key < MAP_LENGTH; key++)
811
if (keyc->xkbInfo->desc->map->modmap[key] & mask)
813
if (keyc->xkbInfo->desc->map->modmap[key] & mask && ephyrKbd &&
814
((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled)
815
KdEnqueueKeyboardEvent(ephyrKbd, key, FALSE); /* press */
769
for (i = 0, mask = 1; i < 8; i++, mask <<= 1) {
772
/* Modifier is down, but shouldn't be
774
if ((xkb_state & mask) && !(state & mask)) {
775
int count = keyc->modifierKeyCount[i];
777
for (key = 0; key < MAP_LENGTH; key++)
778
if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
779
if (key_is_down(pDev, key, KEY_PROCESSED))
780
KdEnqueueKeyboardEvent (ephyrKbd, key, TRUE);
787
/* Modifier shoud be down, but isn't
789
if (!(xkb_state & mask) && (state & mask))
790
for (key = 0; key < MAP_LENGTH; key++)
791
if (keyc->xkbInfo->desc->map->modmap[key] & mask) {
792
KdEnqueueKeyboardEvent (ephyrKbd, key, FALSE);
899
875
screen = pair->local->drawable.pScreen;
900
REGION_NULL (screen, ®);
901
REGION_COPY (screen, ®, &pair->local->clipList);
877
RegionCopy(®, &pair->local->clipList);
902
878
screen->WindowExposures (pair->local, ®, NullRegion);
903
REGION_UNINIT (screen, ®);
905
881
#endif /* XF86DRI */