dix: rename IsFloating() to InputDevIsFloating()
Give it a better fitting name. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									985f4c22c6
								
							
						
					
					
						commit
						6dc7eab871
					
				|  | @ -782,7 +782,7 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce) | ||||||
|     if (InputDevIsMaster(slave)) |     if (InputDevIsMaster(slave)) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     if (IsFloating(slave)) |     if (InputDevIsFloating(slave)) | ||||||
|         return;                 /* set floating since the event */ |         return;                 /* set floating since the event */ | ||||||
| 
 | 
 | ||||||
|     if (GetMaster(slave, MASTER_ATTACHED)->id != dce->masterid) |     if (GetMaster(slave, MASTER_ATTACHED)->id != dce->masterid) | ||||||
|  | @ -1852,7 +1852,7 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device) | ||||||
| 
 | 
 | ||||||
|     b = device->button; |     b = device->button; | ||||||
| 
 | 
 | ||||||
|     if (InputDevIsMaster(device) || IsFloating(device)) |     if (InputDevIsMaster(device) || InputDevIsFloating(device)) | ||||||
|         CheckMotion(event, device); |         CheckMotion(event, device); | ||||||
| 
 | 
 | ||||||
|     switch (event->type) { |     switch (event->type) { | ||||||
|  | @ -1955,7 +1955,7 @@ ProcessDeviceEvent(InternalEvent *ev, DeviceIntPtr device) | ||||||
|     if (deactivateDeviceGrab == TRUE) { |     if (deactivateDeviceGrab == TRUE) { | ||||||
|         (*device->deviceGrab.DeactivateGrab) (device); |         (*device->deviceGrab.DeactivateGrab) (device); | ||||||
| 
 | 
 | ||||||
|         if (!InputDevIsMaster (device) && !IsFloating (device)) { |         if (!InputDevIsMaster (device) && !InputDevIsFloating (device)) { | ||||||
|             int flags, num_events = 0; |             int flags, num_events = 0; | ||||||
|             InternalEvent dce; |             InternalEvent dce; | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -421,7 +421,7 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen, | ||||||
|     if (nevents) |     if (nevents) | ||||||
|         *nevents = 0; |         *nevents = 0; | ||||||
| 
 | 
 | ||||||
|     if (xorg_list_is_empty(&cs->barriers) || IsFloating(dev)) |     if (xorg_list_is_empty(&cs->barriers) || InputDevIsFloating(dev)) | ||||||
|         goto out; |         goto out; | ||||||
| 
 | 
 | ||||||
|     /**
 |     /**
 | ||||||
|  |  | ||||||
|  | @ -197,7 +197,7 @@ ProcXIPassiveGrabDevice(ClientPtr client) | ||||||
|         goto out; |         goto out; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     mod_dev = (IsFloating(dev)) ? dev : GetMaster(dev, MASTER_KEYBOARD); |     mod_dev = (InputDevIsFloating(dev)) ? dev : GetMaster(dev, MASTER_KEYBOARD); | ||||||
| 
 | 
 | ||||||
|     for (i = 0; i < stuff->num_modifiers; i++, modifiers++) { |     for (i = 0; i < stuff->num_modifiers; i++, modifiers++) { | ||||||
|         uint8_t status = Success; |         uint8_t status = Success; | ||||||
|  | @ -345,7 +345,7 @@ ProcXIPassiveUngrabDevice(ClientPtr client) | ||||||
|     if (rc != Success) |     if (rc != Success) | ||||||
|         return rc; |         return rc; | ||||||
| 
 | 
 | ||||||
|     mod_dev = (IsFloating(dev)) ? dev : GetMaster(dev, MASTER_KEYBOARD); |     mod_dev = (InputDevIsFloating(dev)) ? dev : GetMaster(dev, MASTER_KEYBOARD); | ||||||
| 
 | 
 | ||||||
|     tempGrab = AllocGrab(NULL); |     tempGrab = AllocGrab(NULL); | ||||||
|     if (!tempGrab) |     if (!tempGrab) | ||||||
|  |  | ||||||
|  | @ -521,7 +521,7 @@ GetDeviceUse(DeviceIntPtr dev, uint16_t * attachment) | ||||||
|         use = IsPointerDevice(dev) ? XIMasterPointer : XIMasterKeyboard; |         use = IsPointerDevice(dev) ? XIMasterPointer : XIMasterKeyboard; | ||||||
|         *attachment = (paired ? paired->id : 0); |         *attachment = (paired ? paired->id : 0); | ||||||
|     } |     } | ||||||
|     else if (!IsFloating(dev)) { |     else if (!InputDevIsFloating(dev)) { | ||||||
|         use = IsPointerDevice(master) ? XISlavePointer : XISlaveKeyboard; |         use = IsPointerDevice(master) ? XISlavePointer : XISlaveKeyboard; | ||||||
|         *attachment = master->id; |         *attachment = master->id; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -105,7 +105,8 @@ ProcXIQueryPointer(ClientPtr client) | ||||||
|         return rc; |         return rc; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if (pDev->valuator == NULL || IsKeyboardDevice(pDev) || (!InputDevIsMaster(pDev) && !IsFloating(pDev))) {   /* no attached devices */ |     if (pDev->valuator == NULL || IsKeyboardDevice(pDev) || | ||||||
|  |         (!InputDevIsMaster(pDev) && !InputDevIsFloating(pDev))) {   /* no attached devices */ | ||||||
|         client->errorValue = stuff->deviceid; |         client->errorValue = stuff->deviceid; | ||||||
|         return BadDevice; |         return BadDevice; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  | @ -98,7 +98,7 @@ ProcXIWarpPointer(ClientPtr client) | ||||||
|         return rc; |         return rc; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if ((!InputDevIsMaster(pDev) && !IsFloating(pDev)) || |     if ((!InputDevIsMaster(pDev) && !InputDevIsFloating(pDev)) || | ||||||
|         (InputDevIsMaster(pDev) && !IsPointerDevice(pDev))) { |         (InputDevIsMaster(pDev) && !IsPointerDevice(pDev))) { | ||||||
|         client->errorValue = stuff->deviceid; |         client->errorValue = stuff->deviceid; | ||||||
|         return BadDevice; |         return BadDevice; | ||||||
|  |  | ||||||
|  | @ -424,7 +424,7 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent) | ||||||
|         XISendDeviceHierarchyEvent(flags); |         XISendDeviceHierarchyEvent(flags); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if (!InputDevIsMaster(dev) && !IsFloating(dev)) |     if (!InputDevIsMaster(dev) && !InputDevIsFloating(dev)) | ||||||
|         XkbPushLockedStateToSlaves(GetMaster(dev, MASTER_KEYBOARD), 0, 0); |         XkbPushLockedStateToSlaves(GetMaster(dev, MASTER_KEYBOARD), 0, 0); | ||||||
| 
 | 
 | ||||||
|     /* Now make sure our LEDs are in sync with the locked state */ |     /* Now make sure our LEDs are in sync with the locked state */ | ||||||
|  | @ -1110,12 +1110,12 @@ CloseDownDevices(void) | ||||||
|      * to NULL and pretend nothing happened. |      * to NULL and pretend nothing happened. | ||||||
|      */ |      */ | ||||||
|     for (dev = inputInfo.devices; dev; dev = dev->next) { |     for (dev = inputInfo.devices; dev; dev = dev->next) { | ||||||
|         if (!InputDevIsMaster(dev) && !IsFloating(dev)) |         if (!InputDevIsMaster(dev) && !InputDevIsFloating(dev)) | ||||||
|             dev->master = NULL; |             dev->master = NULL; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     for (dev = inputInfo.off_devices; dev; dev = dev->next) { |     for (dev = inputInfo.off_devices; dev; dev = dev->next) { | ||||||
|         if (!InputDevIsMaster(dev) && !IsFloating(dev)) |         if (!InputDevIsMaster(dev) && !InputDevIsFloating(dev)) | ||||||
|             dev->master = NULL; |             dev->master = NULL; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -2667,13 +2667,13 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) | ||||||
|         return BadDevice; |         return BadDevice; | ||||||
| 
 | 
 | ||||||
|     /* set from floating to floating? */ |     /* set from floating to floating? */ | ||||||
|     if (IsFloating(dev) && !master && dev->enabled) |     if (InputDevIsFloating(dev) && !master && dev->enabled) | ||||||
|         return Success; |         return Success; | ||||||
| 
 | 
 | ||||||
|     input_lock(); |     input_lock(); | ||||||
| 
 | 
 | ||||||
|     /* free the existing sprite. */ |     /* free the existing sprite. */ | ||||||
|     if (IsFloating(dev) && dev->spriteInfo->paired == dev) { |     if (InputDevIsFloating(dev) && dev->spriteInfo->paired == dev) { | ||||||
|         screen = miPointerGetScreen(dev); |         screen = miPointerGetScreen(dev); | ||||||
|         screen->DeviceCursorCleanup(dev, screen); |         screen->DeviceCursorCleanup(dev, screen); | ||||||
|         free(dev->spriteInfo->sprite); |         free(dev->spriteInfo->sprite); | ||||||
|  | @ -2734,7 +2734,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) | ||||||
| DeviceIntPtr | DeviceIntPtr | ||||||
| GetPairedDevice(DeviceIntPtr dev) | GetPairedDevice(DeviceIntPtr dev) | ||||||
| { | { | ||||||
|     if (!InputDevIsMaster(dev) && !IsFloating(dev)) |     if (!InputDevIsMaster(dev) && !InputDevIsFloating(dev)) | ||||||
|         dev = GetMaster(dev, MASTER_ATTACHED); |         dev = GetMaster(dev, MASTER_ATTACHED); | ||||||
| 
 | 
 | ||||||
|     return (dev && dev->spriteInfo) ? dev->spriteInfo->paired: NULL; |     return (dev && dev->spriteInfo) ? dev->spriteInfo->paired: NULL; | ||||||
|  |  | ||||||
|  | @ -772,10 +772,10 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, | ||||||
| { | { | ||||||
|     deviceFocus event; |     deviceFocus event; | ||||||
|     xXIFocusInEvent *xi2event; |     xXIFocusInEvent *xi2event; | ||||||
|     DeviceIntPtr mouse; |  | ||||||
|     int btlen, len, i; |     int btlen, len, i; | ||||||
| 
 | 
 | ||||||
|     mouse = IsFloating(dev) ? dev : GetMaster(dev, MASTER_POINTER); |     DeviceIntPtr mouse = InputDevIsFloating(dev) ? | ||||||
|  |             dev : GetMaster(dev, MASTER_POINTER); | ||||||
| 
 | 
 | ||||||
|     /* XI 2 event contains the logical button map - maps are CARD8
 |     /* XI 2 event contains the logical button map - maps are CARD8
 | ||||||
|      * so we need 256 bits for the possibly maximum mapping */ |      * so we need 256 bits for the possibly maximum mapping */ | ||||||
|  |  | ||||||
							
								
								
									
										12
									
								
								dix/events.c
								
								
								
								
							
							
						
						
									
										12
									
								
								dix/events.c
								
								
								
								
							|  | @ -349,7 +349,7 @@ InputDevIsMaster(DeviceIntPtr dev) | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| Bool | Bool | ||||||
| IsFloating(DeviceIntPtr dev) | InputDevIsFloating(DeviceIntPtr dev) | ||||||
| { | { | ||||||
|     return !InputDevIsMaster(dev) && GetMaster(dev, MASTER_KEYBOARD) == NULL; |     return !InputDevIsMaster(dev) && GetMaster(dev, MASTER_KEYBOARD) == NULL; | ||||||
| } | } | ||||||
|  | @ -1393,7 +1393,7 @@ ScreenRestructured(ScreenPtr pScreen) | ||||||
|     DeviceIntPtr pDev; |     DeviceIntPtr pDev; | ||||||
| 
 | 
 | ||||||
|     for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { |     for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { | ||||||
|         if (!IsFloating(pDev) && !DevHasCursor(pDev)) |         if (!InputDevIsFloating(pDev) && !DevHasCursor(pDev)) | ||||||
|             continue; |             continue; | ||||||
| 
 | 
 | ||||||
|         /* GrabDevice doesn't have a confineTo field, so we don't need to
 |         /* GrabDevice doesn't have a confineTo field, so we don't need to
 | ||||||
|  | @ -1455,7 +1455,7 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) | ||||||
| static void | static void | ||||||
| DetachFromMaster(DeviceIntPtr dev) | DetachFromMaster(DeviceIntPtr dev) | ||||||
| { | { | ||||||
|     if (IsFloating(dev)) |     if (InputDevIsFloating(dev)) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     dev->saved_master_id = GetMaster(dev, MASTER_ATTACHED)->id; |     dev->saved_master_id = GetMaster(dev, MASTER_ATTACHED)->id; | ||||||
|  | @ -3261,7 +3261,7 @@ WindowsRestructured(void) | ||||||
|     DeviceIntPtr pDev = inputInfo.devices; |     DeviceIntPtr pDev = inputInfo.devices; | ||||||
| 
 | 
 | ||||||
|     while (pDev) { |     while (pDev) { | ||||||
|         if (InputDevIsMaster(pDev) || IsFloating(pDev)) |         if (InputDevIsMaster(pDev) || InputDevIsFloating(pDev)) | ||||||
|             CheckMotion(NULL, pDev); |             CheckMotion(NULL, pDev); | ||||||
|         pDev = pDev->next; |         pDev = pDev->next; | ||||||
|     } |     } | ||||||
|  | @ -3480,7 +3480,7 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) | ||||||
|     SpritePtr pSprite; |     SpritePtr pSprite; | ||||||
| 
 | 
 | ||||||
|     ptr = |     ptr = | ||||||
|         IsFloating(pDev) ? pDev : |         InputDevIsFloating(pDev) ? pDev : | ||||||
|         GetXTestDevice(GetMaster(pDev, MASTER_POINTER)); |         GetXTestDevice(GetMaster(pDev, MASTER_POINTER)); | ||||||
|     pSprite = ptr->spriteInfo->sprite; |     pSprite = ptr->spriteInfo->sprite; | ||||||
| 
 | 
 | ||||||
|  | @ -3967,7 +3967,7 @@ CheckPassiveGrab(DeviceIntPtr device, GrabPtr grab, InternalEvent *event, | ||||||
|          * attached master keyboard. Since the slave may have been |          * attached master keyboard. Since the slave may have been | ||||||
|          * reattached after the grab, the modifier device may not be the |          * reattached after the grab, the modifier device may not be the | ||||||
|          * same. */ |          * same. */ | ||||||
|         if (!InputDevIsMaster(grab->device) && !IsFloating(device)) |         if (!InputDevIsMaster(grab->device) && !InputDevIsFloating(device)) | ||||||
|             gdev = GetMaster(device, MASTER_KEYBOARD); |             gdev = GetMaster(device, MASTER_KEYBOARD); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -786,7 +786,7 @@ static void | ||||||
| moveRelative(DeviceIntPtr dev, int flags, ValuatorMask *mask) | moveRelative(DeviceIntPtr dev, int flags, ValuatorMask *mask) | ||||||
| { | { | ||||||
|     int i; |     int i; | ||||||
|     Bool clip_xy = InputDevIsMaster(dev) || !IsFloating(dev); |     Bool clip_xy = InputDevIsMaster(dev) || !InputDevIsFloating(dev); | ||||||
|     ValuatorClassPtr v = dev->valuator; |     ValuatorClassPtr v = dev->valuator; | ||||||
| 
 | 
 | ||||||
|     /* for abs devices in relative mode, we've just scaled wrong, since we
 |     /* for abs devices in relative mode, we've just scaled wrong, since we
 | ||||||
|  | @ -1006,7 +1006,7 @@ updateHistory(DeviceIntPtr dev, ValuatorMask *mask, CARD32 ms) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     updateMotionHistory(dev, ms, mask, dev->last.valuators); |     updateMotionHistory(dev, ms, mask, dev->last.valuators); | ||||||
|     if (!InputDevIsMaster(dev) && !IsFloating(dev)) { |     if (!InputDevIsMaster(dev) && !InputDevIsFloating(dev)) { | ||||||
|         DeviceIntPtr master = GetMaster(dev, MASTER_POINTER); |         DeviceIntPtr master = GetMaster(dev, MASTER_POINTER); | ||||||
| 
 | 
 | ||||||
|         updateMotionHistory(master, ms, mask, dev->last.valuators); |         updateMotionHistory(master, ms, mask, dev->last.valuators); | ||||||
|  | @ -1450,7 +1450,7 @@ fill_pointer_events(InternalEvent *events, DeviceIntPtr pDev, int type, | ||||||
|     storeLastValuators(pDev, &mask, devx, devy); |     storeLastValuators(pDev, &mask, devx, devy); | ||||||
| 
 | 
 | ||||||
|     /* Update the MD's coordinates, which are always in desktop space. */ |     /* Update the MD's coordinates, which are always in desktop space. */ | ||||||
|     if (!InputDevIsMaster(pDev) && !IsFloating(pDev)) { |     if (!InputDevIsMaster(pDev) && !InputDevIsFloating(pDev)) { | ||||||
|         DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER); |         DeviceIntPtr master = GetMaster(pDev, MASTER_POINTER); | ||||||
| 
 | 
 | ||||||
|         master->last.valuators[0] = screenx; |         master->last.valuators[0] = screenx; | ||||||
|  | @ -2067,7 +2067,7 @@ GetTouchEvents(InternalEvent *events, DeviceIntPtr dev, uint32_t ddx_touchid, | ||||||
|         storeLastValuators(dev, &mask, devx, devy); |         storeLastValuators(dev, &mask, devx, devy); | ||||||
| 
 | 
 | ||||||
|     /* Update the MD's coordinates, which are always in desktop space. */ |     /* Update the MD's coordinates, which are always in desktop space. */ | ||||||
|     if (emulate_pointer && !InputDevIsMaster(dev) && !IsFloating(dev)) { |     if (emulate_pointer && !InputDevIsMaster(dev) && !InputDevIsFloating(dev)) { | ||||||
| 	    DeviceIntPtr master = GetMaster(dev, MASTER_POINTER); | 	    DeviceIntPtr master = GetMaster(dev, MASTER_POINTER); | ||||||
| 
 | 
 | ||||||
| 	    master->last.valuators[0] = screenx; | 	    master->last.valuators[0] = screenx; | ||||||
|  |  | ||||||
|  | @ -474,7 +474,7 @@ Bool InputDevIsMaster(DeviceIntPtr dev) | ||||||
|  * @param dev   device to check |  * @param dev   device to check | ||||||
|  * @return TRUE if the device is in `floating` state |  * @return TRUE if the device is in `floating` state | ||||||
|  */ |  */ | ||||||
| Bool IsFloating(DeviceIntPtr dev) | Bool InputDevIsFloating(DeviceIntPtr dev) | ||||||
|     _X_ATTRIBUTE_NONNULL_ARG(1); |     _X_ATTRIBUTE_NONNULL_ARG(1); | ||||||
| 
 | 
 | ||||||
| #endif /* _XSERVER_INPUT_PRIV_H */ | #endif /* _XSERVER_INPUT_PRIV_H */ | ||||||
|  |  | ||||||
|  | @ -273,7 +273,7 @@ change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *modkeymap, | ||||||
|                     do_modmap_change(client, tmp, modmap); |                     do_modmap_change(client, tmp, modmap); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|     else if (!IsFloating(dev) && |     else if (!InputDevIsFloating(dev) && | ||||||
|              GetMaster(dev, MASTER_KEYBOARD)->lastSlave == dev) { |              GetMaster(dev, MASTER_KEYBOARD)->lastSlave == dev) { | ||||||
|         /* If this fails, expect the results to be weird. */ |         /* If this fails, expect the results to be weird. */ | ||||||
|         if (check_modmap_change(client, dev->master, modmap) == Success) |         if (check_modmap_change(client, dev->master, modmap) == Success) | ||||||
|  |  | ||||||
|  | @ -242,7 +242,7 @@ xf86RandRSetConfig(ScreenPtr pScreen, | ||||||
|     Bool view_adjusted = FALSE; |     Bool view_adjusted = FALSE; | ||||||
| 
 | 
 | ||||||
|     for (dev = inputInfo.devices; dev; dev = dev->next) { |     for (dev = inputInfo.devices; dev; dev = dev->next) { | ||||||
|         if (!InputDevIsMaster(dev) && !IsFloating(dev)) |         if (!InputDevIsMaster(dev) && !InputDevIsFloating(dev)) | ||||||
|             continue; |             continue; | ||||||
| 
 | 
 | ||||||
|         miPointerGetPosition(dev, &pos[dev->id][0], &pos[dev->id][1]); |         miPointerGetPosition(dev, &pos[dev->id][0], &pos[dev->id][1]); | ||||||
|  | @ -314,7 +314,7 @@ xf86RandRSetConfig(ScreenPtr pScreen, | ||||||
|      * FIXME: duplicated code, see modes/xf86RandR12.c |      * FIXME: duplicated code, see modes/xf86RandR12.c | ||||||
|      */ |      */ | ||||||
|     for (dev = inputInfo.devices; dev; dev = dev->next) { |     for (dev = inputInfo.devices; dev; dev = dev->next) { | ||||||
|         if (!InputDevIsMaster(dev) && !IsFloating(dev)) |         if (!InputDevIsMaster(dev) && !InputDevIsFloating(dev)) | ||||||
|             continue; |             continue; | ||||||
| 
 | 
 | ||||||
|         if (pScreen == miPointerGetScreen(dev)) { |         if (pScreen == miPointerGetScreen(dev)) { | ||||||
|  |  | ||||||
|  | @ -602,7 +602,7 @@ xf86RandR12SetConfig(ScreenPtr pScreen, | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     for (dev = inputInfo.devices; dev; dev = dev->next) { |     for (dev = inputInfo.devices; dev; dev = dev->next) { | ||||||
|         if (!InputDevIsMaster(dev) && !IsFloating(dev)) |         if (!InputDevIsMaster(dev) && !InputDevIsFloating(dev)) | ||||||
|             continue; |             continue; | ||||||
| 
 | 
 | ||||||
|         miPointerGetPosition(dev, &pos[dev->id][0], &pos[dev->id][1]); |         miPointerGetPosition(dev, &pos[dev->id][0], &pos[dev->id][1]); | ||||||
|  | @ -650,7 +650,7 @@ xf86RandR12SetConfig(ScreenPtr pScreen, | ||||||
|      * FIXME: duplicated code, see modes/xf86RandR12.c |      * FIXME: duplicated code, see modes/xf86RandR12.c | ||||||
|      */ |      */ | ||||||
|     for (dev = inputInfo.devices; dev; dev = dev->next) { |     for (dev = inputInfo.devices; dev; dev = dev->next) { | ||||||
|         if (!InputDevIsMaster(dev) && !IsFloating(dev)) |         if (!InputDevIsMaster(dev) && !InputDevIsFloating(dev)) | ||||||
|             continue; |             continue; | ||||||
| 
 | 
 | ||||||
|         if (pScreen == miPointerGetScreen(dev)) { |         if (pScreen == miPointerGetScreen(dev)) { | ||||||
|  |  | ||||||
|  | @ -399,7 +399,7 @@ CopyGetMasterEvent(DeviceIntPtr sdev, | ||||||
|     verify_internal_event(original); |     verify_internal_event(original); | ||||||
| 
 | 
 | ||||||
|     /* ET_XQuartz has sdev == NULL */ |     /* ET_XQuartz has sdev == NULL */ | ||||||
|     if (!sdev || InputDevIsMaster(sdev) || IsFloating(sdev)) |     if (!sdev || InputDevIsMaster(sdev) || InputDevIsFloating(sdev)) | ||||||
|         return NULL; |         return NULL; | ||||||
| 
 | 
 | ||||||
| #ifdef XFreeXDGA | #ifdef XFreeXDGA | ||||||
|  | @ -500,7 +500,7 @@ mieqProcessDeviceEvent(DeviceIntPtr dev, InternalEvent *event, ScreenPtr screen) | ||||||
|         handler(screenNum, event, dev); |         handler(screenNum, event, dev); | ||||||
|         /* Check for the SD's master in case the device got detached
 |         /* Check for the SD's master in case the device got detached
 | ||||||
|          * during event processing */ |          * during event processing */ | ||||||
|         if (master && !IsFloating(dev)) |         if (master && !InputDevIsFloating(dev)) | ||||||
|             handler(screenNum, &mevent, master); |             handler(screenNum, &mevent, master); | ||||||
|     } |     } | ||||||
|     else { |     else { | ||||||
|  | @ -509,7 +509,7 @@ mieqProcessDeviceEvent(DeviceIntPtr dev, InternalEvent *event, ScreenPtr screen) | ||||||
| 
 | 
 | ||||||
|         /* Check for the SD's master in case the device got detached
 |         /* Check for the SD's master in case the device got detached
 | ||||||
|          * during event processing */ |          * during event processing */ | ||||||
|         if (master && !IsFloating(dev)) |         if (master && !InputDevIsFloating(dev)) | ||||||
|             master->public.processInputProc(&mevent, master); |             master->public.processInputProc(&mevent, master); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -90,7 +90,7 @@ DevPrivateKeyRec miPointerScreenKeyRec; | ||||||
| DevPrivateKeyRec miPointerPrivKeyRec; | DevPrivateKeyRec miPointerPrivKeyRec; | ||||||
| 
 | 
 | ||||||
| #define MIPOINTER(dev) \ | #define MIPOINTER(dev) \ | ||||||
|     (IsFloating(dev) ? \ |     (InputDevIsFloating(dev) ? \ | ||||||
|         (miPointerPtr)dixLookupPrivate(&(dev)->devPrivates, miPointerPrivKey): \ |         (miPointerPtr)dixLookupPrivate(&(dev)->devPrivates, miPointerPrivKey): \ | ||||||
|         (miPointerPtr)dixLookupPrivate(&(GetMaster(dev, MASTER_POINTER))->devPrivates, miPointerPrivKey)) |         (miPointerPtr)dixLookupPrivate(&(GetMaster(dev, MASTER_POINTER))->devPrivates, miPointerPrivKey)) | ||||||
| 
 | 
 | ||||||
|  | @ -367,7 +367,7 @@ miPointerDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) | ||||||
| { | { | ||||||
|     SetupScreen(pScreen); |     SetupScreen(pScreen); | ||||||
| 
 | 
 | ||||||
|     if (!InputDevIsMaster(pDev) && !IsFloating(pDev)) |     if (!InputDevIsMaster(pDev) && !InputDevIsFloating(pDev)) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     (*pScreenPriv->spriteFuncs->DeviceCursorCleanup) (pDev, pScreen); |     (*pScreenPriv->spriteFuncs->DeviceCursorCleanup) (pDev, pScreen); | ||||||
|  |  | ||||||
|  | @ -148,7 +148,7 @@ GetSpriteScreen(ScreenPtr pScreen) | ||||||
| static miCursorInfoPtr | static miCursorInfoPtr | ||||||
| GetSprite(DeviceIntPtr dev) | GetSprite(DeviceIntPtr dev) | ||||||
| { | { | ||||||
|     if (IsFloating(dev)) |     if (InputDevIsFloating(dev)) | ||||||
|        return dixLookupPrivate(&dev->devPrivates, &miSpriteDevPrivatesKeyRec); |        return dixLookupPrivate(&dev->devPrivates, &miSpriteDevPrivatesKeyRec); | ||||||
| 
 | 
 | ||||||
|     return dixLookupPrivate(&(GetMaster(dev, MASTER_POINTER))->devPrivates, |     return dixLookupPrivate(&(GetMaster(dev, MASTER_POINTER))->devPrivates, | ||||||
|  | @ -614,7 +614,7 @@ miSpriteRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) | ||||||
| { | { | ||||||
|     miCursorInfoPtr pCursorInfo; |     miCursorInfoPtr pCursorInfo; | ||||||
| 
 | 
 | ||||||
|     if (IsFloating(pDev)) |     if (InputDevIsFloating(pDev)) | ||||||
|         return FALSE; |         return FALSE; | ||||||
| 
 | 
 | ||||||
|     pCursorInfo = GetSprite(pDev); |     pCursorInfo = GetSprite(pDev); | ||||||
|  | @ -638,7 +638,7 @@ miSpriteSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, | ||||||
|     miCursorInfoPtr pPointer; |     miCursorInfoPtr pPointer; | ||||||
|     miSpriteScreenPtr pScreenPriv; |     miSpriteScreenPtr pScreenPriv; | ||||||
| 
 | 
 | ||||||
|     if (IsFloating(pDev)) |     if (InputDevIsFloating(pDev)) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     pPointer = GetSprite(pDev); |     pPointer = GetSprite(pDev); | ||||||
|  | @ -690,7 +690,7 @@ miSpriteMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) | ||||||
| { | { | ||||||
|     CursorPtr pCursor; |     CursorPtr pCursor; | ||||||
| 
 | 
 | ||||||
|     if (IsFloating(pDev)) |     if (InputDevIsFloating(pDev)) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     pCursor = GetSprite(pDev)->pCursor; |     pCursor = GetSprite(pDev)->pCursor; | ||||||
|  | @ -742,7 +742,7 @@ miSpriteRemoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen) | ||||||
|     miSpriteScreenPtr pScreenPriv; |     miSpriteScreenPtr pScreenPriv; | ||||||
|     miCursorInfoPtr pCursorInfo; |     miCursorInfoPtr pCursorInfo; | ||||||
| 
 | 
 | ||||||
|     if (IsFloating(pDev)) |     if (InputDevIsFloating(pDev)) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     DamageDrawInternal(pScreen, TRUE); |     DamageDrawInternal(pScreen, TRUE); | ||||||
|  | @ -777,7 +777,7 @@ miSpriteSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen) | ||||||
|     miSpriteScreenPtr pScreenPriv; |     miSpriteScreenPtr pScreenPriv; | ||||||
|     miCursorInfoPtr pCursorInfo; |     miCursorInfoPtr pCursorInfo; | ||||||
| 
 | 
 | ||||||
|     if (IsFloating(pDev)) |     if (InputDevIsFloating(pDev)) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     DamageDrawInternal(pScreen, TRUE); |     DamageDrawInternal(pScreen, TRUE); | ||||||
|  | @ -813,7 +813,7 @@ miSpriteRestoreCursor(DeviceIntPtr pDev, ScreenPtr pScreen) | ||||||
|     CursorPtr pCursor; |     CursorPtr pCursor; | ||||||
|     miCursorInfoPtr pCursorInfo; |     miCursorInfoPtr pCursorInfo; | ||||||
| 
 | 
 | ||||||
|     if (IsFloating(pDev)) |     if (InputDevIsFloating(pDev)) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     DamageDrawInternal(pScreen, TRUE); |     DamageDrawInternal(pScreen, TRUE); | ||||||
|  | @ -852,7 +852,7 @@ miSpriteComputeSaved(DeviceIntPtr pDev, ScreenPtr pScreen) | ||||||
|     CursorPtr pCursor; |     CursorPtr pCursor; | ||||||
|     miCursorInfoPtr pCursorInfo; |     miCursorInfoPtr pCursorInfo; | ||||||
| 
 | 
 | ||||||
|     if (IsFloating(pDev)) |     if (InputDevIsFloating(pDev)) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     pCursorInfo = GetSprite(pDev); |     pCursorInfo = GetSprite(pDev); | ||||||
|  |  | ||||||
|  | @ -170,7 +170,7 @@ AnimCurDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) | ||||||
|     AnimCurScreenPtr as = GetAnimCurScreen(pScreen); |     AnimCurScreenPtr as = GetAnimCurScreen(pScreen); | ||||||
|     Bool ret = TRUE; |     Bool ret = TRUE; | ||||||
| 
 | 
 | ||||||
|     if (IsFloating(pDev)) |     if (InputDevIsFloating(pDev)) | ||||||
|         return FALSE; |         return FALSE; | ||||||
| 
 | 
 | ||||||
|     Unwrap(as, pScreen, DisplayCursor); |     Unwrap(as, pScreen, DisplayCursor); | ||||||
|  |  | ||||||
|  | @ -716,14 +716,14 @@ extern int xkbDevicePrivateIndex; | ||||||
| void | void | ||||||
| ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse) | ProcessPointerEvent(InternalEvent *ev, DeviceIntPtr mouse) | ||||||
| { | { | ||||||
|     DeviceIntPtr dev; |  | ||||||
|     XkbSrvInfoPtr xkbi = NULL; |     XkbSrvInfoPtr xkbi = NULL; | ||||||
|     unsigned changed = 0; |     unsigned changed = 0; | ||||||
|     ProcessInputProc backupproc; |     ProcessInputProc backupproc; | ||||||
|     xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); |     xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(mouse); | ||||||
|     DeviceEvent *event = &ev->device_event; |     DeviceEvent *event = &ev->device_event; | ||||||
| 
 | 
 | ||||||
|     dev = IsFloating(mouse) ? mouse : GetMaster(mouse, MASTER_KEYBOARD); |     DeviceIntPtr dev = InputDevIsFloating(mouse) | ||||||
|  |         ? mouse : GetMaster(mouse, MASTER_KEYBOARD); | ||||||
| 
 | 
 | ||||||
|     if (dev && dev->key) { |     if (dev && dev->key) { | ||||||
|         xkbi = dev->key->xkbInfo; |         xkbi = dev->key->xkbInfo; | ||||||
|  |  | ||||||
|  | @ -1569,7 +1569,7 @@ InjectPointerKeyEvents(DeviceIntPtr dev, int type, int button, int flags, | ||||||
|         lastSlave = mpointer->lastSlave; |         lastSlave = mpointer->lastSlave; | ||||||
|         ptr = GetXTestDevice(mpointer); |         ptr = GetXTestDevice(mpointer); | ||||||
|     } |     } | ||||||
|     else if (IsFloating(dev)) |     else if (InputDevIsFloating(dev)) | ||||||
|         ptr = dev; |         ptr = dev; | ||||||
|     else |     else | ||||||
|         return; |         return; | ||||||
|  | @ -1598,7 +1598,7 @@ XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags, int x, int y) | ||||||
|     int gpe_flags = 0; |     int gpe_flags = 0; | ||||||
| 
 | 
 | ||||||
|     /* ignore attached SDs */ |     /* ignore attached SDs */ | ||||||
|     if (!InputDevIsMaster(dev) && !IsFloating(dev)) |     if (!InputDevIsMaster(dev) && !InputDevIsFloating(dev)) | ||||||
|         return; |         return; | ||||||
| 
 | 
 | ||||||
|     if (flags & XkbSA_MoveAbsoluteX || flags & XkbSA_MoveAbsoluteY) |     if (flags & XkbSA_MoveAbsoluteX || flags & XkbSA_MoveAbsoluteY) | ||||||
|  | @ -1631,7 +1631,7 @@ XkbFakeDeviceButton(DeviceIntPtr dev, Bool press, int button) | ||||||
| 
 | 
 | ||||||
|         ptr = GetXTestDevice(mpointer); |         ptr = GetXTestDevice(mpointer); | ||||||
|     } |     } | ||||||
|     else if (IsFloating(dev)) |     else if (InputDevIsFloating(dev)) | ||||||
|         ptr = dev; |         ptr = dev; | ||||||
|     else |     else | ||||||
|         return; |         return; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue