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

« back to all changes in this revision

Viewing changes to Xi/allowev.c

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Parra Novo
  • Date: 2006-07-25 20:06:28 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060725200628-gjmmd9gxfxdc4ejs
Tags: 1:1.1.1-0ubuntu1
* New Upstream version
* Changed Build-Depends from mesa-swrast-source to mesa-swx11-source,
  following Debian package nomenclature
* Re-did 12_security_policy_in_etc.diff for 1.1.1
* Dropped 15_security_allocate_local.diff (applied upstream)
* Dropped 16_SECURITY_setuid.diff (applied upstream)
* Dropped 000_ubuntu_fix_read_kernel_mapping.patch (applied upstream)
* Dropped 002_ubuntu_fix_for_certain_intel_chipsets.patch (applied upstream)
* Updated versioned Build-Depends on mesa-swx11-source to version
  6.5.0.cvs.20060725-0ubuntu1
* Added arrayobj.c, arrayobj.h, bitset.h & rbadaptors.h to
  GL/symlink-mesa.sh (linked from mesa-swx11-source)
* Added arrayobj.c to default build target on GL/mesa/main

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Xorg: allowev.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */
2
 
 
3
1
/************************************************************
4
2
 
5
3
Copyright 1989, 1998  The Open Group
45
43
SOFTWARE.
46
44
 
47
45
********************************************************/
48
 
/* $XFree86: xc/programs/Xserver/Xi/allowev.c,v 3.3 2001/01/17 22:13:23 dawes Exp $ */
49
46
 
50
47
/***********************************************************************
51
48
 *
59
56
#include <dix-config.h>
60
57
#endif
61
58
 
62
 
#include <X11/X.h>                              /* for inputstr.h    */
63
 
#include <X11/Xproto.h>                 /* Request macro     */
64
 
#include "inputstr.h"                   /* DeviceIntPtr      */
 
59
#include <X11/X.h>      /* for inputstr.h    */
 
60
#include <X11/Xproto.h> /* Request macro     */
 
61
#include "inputstr.h"   /* DeviceIntPtr      */
65
62
#include <X11/extensions/XI.h>
66
63
#include <X11/extensions/XIproto.h>
67
64
 
68
65
#include "extnsionst.h"
69
 
#include "extinit.h"                    /* LookupDeviceIntRec */
 
66
#include "extinit.h"    /* LookupDeviceIntRec */
70
67
#include "exglobals.h"
71
68
 
72
69
#include "allowev.h"
79
76
 */
80
77
 
81
78
int
82
 
SProcXAllowDeviceEvents(client)
83
 
    register ClientPtr client;
84
 
    {
 
79
SProcXAllowDeviceEvents(register ClientPtr client)
 
80
{
85
81
    register char n;
86
82
 
87
83
    REQUEST(xAllowDeviceEventsReq);
88
84
    swaps(&stuff->length, n);
89
85
    REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
90
86
    swapl(&stuff->time, n);
91
 
    return(ProcXAllowDeviceEvents(client));
92
 
    }
 
87
    return (ProcXAllowDeviceEvents(client));
 
88
}
93
89
 
94
90
/***********************************************************************
95
91
 *
98
94
 */
99
95
 
100
96
int
101
 
ProcXAllowDeviceEvents(client)
102
 
    register ClientPtr client;
103
 
    {
104
 
    TimeStamp           time;
105
 
    DeviceIntPtr        thisdev;
 
97
ProcXAllowDeviceEvents(register ClientPtr client)
 
98
{
 
99
    TimeStamp time;
 
100
    DeviceIntPtr thisdev;
106
101
 
107
102
    REQUEST(xAllowDeviceEventsReq);
108
103
    REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
109
104
 
110
 
    thisdev = LookupDeviceIntRec (stuff->deviceid);
111
 
    if (thisdev == NULL)
112
 
        {
 
105
    thisdev = LookupDeviceIntRec(stuff->deviceid);
 
106
    if (thisdev == NULL) {
113
107
        SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadDevice);
114
108
        return Success;
115
 
        }
 
109
    }
116
110
    time = ClientTimeToServerTime(stuff->time);
117
111
 
118
 
    switch (stuff->mode)
119
 
        {
120
 
        case ReplayThisDevice:
121
 
            AllowSome(client, time, thisdev, NOT_GRABBED);
122
 
            break;
123
 
        case SyncThisDevice: 
124
 
            AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT);
125
 
            break;
126
 
        case AsyncThisDevice: 
127
 
            AllowSome(client, time, thisdev, THAWED);
128
 
            break;
129
 
        case AsyncOtherDevices: 
130
 
            AllowSome(client, time, thisdev, THAW_OTHERS);
131
 
            break;
132
 
        case SyncAll:
133
 
            AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT);
134
 
            break;
135
 
        case AsyncAll:
136
 
            AllowSome(client, time, thisdev, THAWED_BOTH);
137
 
            break;
138
 
        default: 
139
 
            SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, 
140
 
                BadValue);
141
 
            client->errorValue = stuff->mode;
142
 
            return Success;
143
 
        }
 
112
    switch (stuff->mode) {
 
113
    case ReplayThisDevice:
 
114
        AllowSome(client, time, thisdev, NOT_GRABBED);
 
115
        break;
 
116
    case SyncThisDevice:
 
117
        AllowSome(client, time, thisdev, FREEZE_NEXT_EVENT);
 
118
        break;
 
119
    case AsyncThisDevice:
 
120
        AllowSome(client, time, thisdev, THAWED);
 
121
        break;
 
122
    case AsyncOtherDevices:
 
123
        AllowSome(client, time, thisdev, THAW_OTHERS);
 
124
        break;
 
125
    case SyncAll:
 
126
        AllowSome(client, time, thisdev, FREEZE_BOTH_NEXT_EVENT);
 
127
        break;
 
128
    case AsyncAll:
 
129
        AllowSome(client, time, thisdev, THAWED_BOTH);
 
130
        break;
 
131
    default:
 
132
        SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadValue);
 
133
        client->errorValue = stuff->mode;
 
134
        return Success;
 
135
    }
144
136
    return Success;
145
 
    }
 
137
}