src/video/x11/SDL_x11events.c
author Szymon Wilczek <kazeuser@gmail.com>
Thu, 19 Jun 2008 17:24:30 +0000
branchgsoc2008_manymouse
changeset 3761 e0c95ad1ba87
parent 3760 64f346a83ed3
child 3763 81ea7d9a6624
permissions -rw-r--r--
Major bug fixes
slouken@1951
     1
/*
slouken@1951
     2
    SDL - Simple DirectMedia Layer
slouken@1951
     3
    Copyright (C) 1997-2006 Sam Lantinga
slouken@1951
     4
slouken@1951
     5
    This library is free software; you can redistribute it and/or
slouken@1951
     6
    modify it under the terms of the GNU Lesser General Public
slouken@1951
     7
    License as published by the Free Software Foundation; either
slouken@1951
     8
    version 2.1 of the License, or (at your option) any later version.
slouken@1951
     9
slouken@1951
    10
    This library is distributed in the hope that it will be useful,
slouken@1951
    11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
slouken@1951
    12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
slouken@1951
    13
    Lesser General Public License for more details.
slouken@1951
    14
slouken@1951
    15
    You should have received a copy of the GNU Lesser General Public
slouken@1951
    16
    License along with this library; if not, write to the Free Software
slouken@1951
    17
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
slouken@1951
    18
slouken@1951
    19
    Sam Lantinga
slouken@1951
    20
    slouken@libsdl.org
slouken@1951
    21
*/
slouken@1951
    22
#include "SDL_config.h"
slouken@1951
    23
slouken@2046
    24
#include <sys/types.h>
slouken@2046
    25
#include <sys/time.h>
slouken@2046
    26
#include <unistd.h>
slouken@2046
    27
slouken@1951
    28
#include "SDL_syswm.h"
slouken@1951
    29
#include "SDL_x11video.h"
slouken@1951
    30
#include "../../events/SDL_events_c.h"
slouken@1951
    31
kazeuser@3760
    32
//XEventClass *SDL_XEvents;
kazeuser@3760
    33
//int SDL_numOfEvents;
kazeuser@3760
    34
kazeuser@3761
    35
extern int motion;
kazeuser@3761
    36
extern int button_pressed;
kazeuser@3761
    37
extern int button_released;
kazeuser@3761
    38
slouken@1951
    39
static void
slouken@1951
    40
X11_DispatchEvent(_THIS)
slouken@1951
    41
{
slouken@1951
    42
    SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
slouken@1951
    43
    SDL_WindowData *data;
slouken@1951
    44
    XEvent xevent;
kazeuser@3760
    45
    int i,z;
kazeuser@3761
    46
    //extern int motion;
kazeuser@3761
    47
    //extern int button_pressed;
kazeuser@3761
    48
    //extern int button_released;
slouken@1951
    49
slouken@1951
    50
    SDL_zero(xevent);           /* valgrind fix. --ryan. */
slouken@1951
    51
    XNextEvent(videodata->display, &xevent);
slouken@1951
    52
bob@2325
    53
    /* filter events catchs XIM events and sends them to the correct
bob@2325
    54
       handler */
bob@2325
    55
    if (XFilterEvent(&xevent, None) == True) {
bob@2327
    56
#if 0
bob@2328
    57
        printf("Filtered event type = %d display = %d window = %d\n",
bob@2328
    58
               xevent.type, xevent.xany.display, xevent.xany.window);
bob@2325
    59
#endif
bob@2325
    60
        return;
bob@2325
    61
    }
bob@2325
    62
slouken@1951
    63
    /* Send a SDL_SYSWMEVENT if the application wants them */
slouken@1951
    64
    if (SDL_ProcessEvents[SDL_SYSWMEVENT] == SDL_ENABLE) {
slouken@1951
    65
        SDL_SysWMmsg wmmsg;
slouken@1951
    66
slouken@1951
    67
        SDL_VERSION(&wmmsg.version);
slouken@1951
    68
        wmmsg.subsystem = SDL_SYSWM_X11;
slouken@1951
    69
        wmmsg.event.xevent = xevent;
slouken@1951
    70
        SDL_SendSysWMEvent(&wmmsg);
slouken@1951
    71
    }
slouken@1951
    72
slouken@1951
    73
    data = NULL;
bob@2324
    74
    if (videodata && videodata->windowlist) {
bob@2324
    75
        for (i = 0; i < videodata->numwindows; ++i) {
bob@2324
    76
            if ((videodata->windowlist[i] != NULL) &&
bob@2324
    77
                (videodata->windowlist[i]->window == xevent.xany.window)) {
bob@2324
    78
                data = videodata->windowlist[i];
bob@2324
    79
                break;
bob@2324
    80
            }
slouken@1951
    81
        }
slouken@1951
    82
    }
slouken@1951
    83
    if (!data) {
slouken@1951
    84
        return;
slouken@1951
    85
    }
bob@2327
    86
#if 0
bob@2328
    87
    printf("type = %d display = %d window = %d\n",
bob@2328
    88
           xevent.type, xevent.xany.display, xevent.xany.window);
bob@2327
    89
#endif
slouken@1951
    90
    switch (xevent.type) {
slouken@1951
    91
slouken@1951
    92
        /* Gaining mouse coverage? */
slouken@1951
    93
    case EnterNotify:{
slouken@1951
    94
#ifdef DEBUG_XEVENTS
slouken@1951
    95
            printf("EnterNotify! (%d,%d)\n", xevent.xcrossing.x,
slouken@1951
    96
                   xevent.xcrossing.y);
slouken@1951
    97
            if (xevent.xcrossing.mode == NotifyGrab)
slouken@1951
    98
                printf("Mode: NotifyGrab\n");
slouken@1951
    99
            if (xevent.xcrossing.mode == NotifyUngrab)
slouken@1951
   100
                printf("Mode: NotifyUngrab\n");
slouken@1951
   101
#endif
slouken@1951
   102
            if ((xevent.xcrossing.mode != NotifyGrab) &&
slouken@1951
   103
                (xevent.xcrossing.mode != NotifyUngrab)) {
kazeuser@3760
   104
			    XDeviceMotionEvent* move=(XDeviceMotionEvent*)&xevent;
kazeuser@3760
   105
                SDL_SetMouseFocus(move->deviceid, data->windowID);
kazeuser@3760
   106
                SDL_SendMouseMotion(move->deviceid, 0, move->x,
kazeuser@3760
   107
                                    move->y,move->axis_data[2]);
slouken@1951
   108
            }
slouken@1951
   109
        }
slouken@1951
   110
        break;
slouken@1951
   111
slouken@1951
   112
        /* Losing mouse coverage? */
slouken@1951
   113
    case LeaveNotify:{
slouken@1951
   114
#ifdef DEBUG_XEVENTS
slouken@1951
   115
            printf("LeaveNotify! (%d,%d)\n", xevent.xcrossing.x,
slouken@1951
   116
                   xevent.xcrossing.y);
slouken@1951
   117
            if (xevent.xcrossing.mode == NotifyGrab)
slouken@1951
   118
                printf("Mode: NotifyGrab\n");
slouken@1951
   119
            if (xevent.xcrossing.mode == NotifyUngrab)
slouken@1951
   120
                printf("Mode: NotifyUngrab\n");
slouken@1951
   121
#endif
slouken@1951
   122
            if ((xevent.xcrossing.mode != NotifyGrab) &&
slouken@1951
   123
                (xevent.xcrossing.mode != NotifyUngrab) &&
slouken@1951
   124
                (xevent.xcrossing.detail != NotifyInferior)) {
kazeuser@3760
   125
			    XDeviceMotionEvent* move=(XDeviceMotionEvent*)&xevent;
kazeuser@3760
   126
                SDL_SendMouseMotion(move->deviceid, 0,
kazeuser@3760
   127
                                    move->x, move->y,move->axis_data[2]);
kazeuser@3760
   128
                SDL_SetMouseFocus(move->deviceid, 0);
slouken@1951
   129
            }
slouken@1951
   130
        }
slouken@1951
   131
        break;
slouken@1951
   132
slouken@1951
   133
        /* Gaining input focus? */
slouken@1951
   134
    case FocusIn:{
slouken@1951
   135
#ifdef DEBUG_XEVENTS
slouken@1951
   136
            printf("FocusIn!\n");
slouken@1951
   137
#endif
slouken@1951
   138
            SDL_SetKeyboardFocus(videodata->keyboard, data->windowID);
slouken@1951
   139
#ifdef X_HAVE_UTF8_STRING
slouken@1951
   140
            if (data->ic) {
slouken@1951
   141
                XSetICFocus(data->ic);
slouken@1951
   142
            }
slouken@1951
   143
#endif
slouken@1951
   144
        }
slouken@1951
   145
        break;
slouken@1951
   146
slouken@1951
   147
        /* Losing input focus? */
slouken@1951
   148
    case FocusOut:{
slouken@1951
   149
#ifdef DEBUG_XEVENTS
slouken@1951
   150
            printf("FocusOut!\n");
slouken@1951
   151
#endif
slouken@1951
   152
            SDL_SetKeyboardFocus(videodata->keyboard, 0);
slouken@1951
   153
#ifdef X_HAVE_UTF8_STRING
slouken@1951
   154
            if (data->ic) {
slouken@1951
   155
                XUnsetICFocus(data->ic);
slouken@1951
   156
            }
slouken@1951
   157
#endif
slouken@1951
   158
        }
slouken@1951
   159
        break;
slouken@1951
   160
slouken@1951
   161
        /* Generated upon EnterWindow and FocusIn */
slouken@1951
   162
    case KeymapNotify:{
slouken@1951
   163
#ifdef DEBUG_XEVENTS
slouken@1951
   164
            printf("KeymapNotify!\n");
slouken@1951
   165
#endif
slouken@1951
   166
            /* FIXME:
slouken@1951
   167
               X11_SetKeyboardState(SDL_Display, xevent.xkeymap.key_vector);
slouken@1951
   168
             */
slouken@1951
   169
        }
slouken@1951
   170
        break;
slouken@1951
   171
slouken@2305
   172
        /* Has the keyboard layout changed? */
slouken@2305
   173
    case MappingNotify:{
slouken@2305
   174
#ifdef DEBUG_XEVENTS
slouken@2305
   175
            printf("MappingNotify!\n");
slouken@2305
   176
#endif
slouken@2306
   177
            X11_UpdateKeymap(_this);
slouken@2305
   178
        }
slouken@2305
   179
        break;
slouken@2305
   180
slouken@1951
   181
        /* Key press? */
slouken@1951
   182
    case KeyPress:{
slouken@1951
   183
            KeyCode keycode = xevent.xkey.keycode;
bob@2300
   184
            KeySym keysym = NoSymbol;
slouken@2306
   185
            char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];
bob@2325
   186
            Status status = 0;
slouken@1951
   187
slouken@1951
   188
#ifdef DEBUG_XEVENTS
slouken@1951
   189
            printf("KeyPress (X11 keycode = 0x%X)\n", xevent.xkey.keycode);
slouken@1951
   190
#endif
bob@2299
   191
            SDL_SendKeyboardKey(videodata->keyboard, SDL_PRESSED,
slouken@2305
   192
                                videodata->key_layout[keycode]);
bob@2325
   193
#if 0
slouken@2305
   194
            if (videodata->key_layout[keycode] == SDLK_UNKNOWN) {
slouken@2305
   195
                int min_keycode, max_keycode;
slouken@2305
   196
                XDisplayKeycodes(videodata->display, &min_keycode,
slouken@2305
   197
                                 &max_keycode);
slouken@2305
   198
                keysym = XKeycodeToKeysym(videodata->display, keycode, 0);
bob@2299
   199
                fprintf(stderr,
slouken@2305
   200
                        "The key you just pressed is not recognized by SDL. To help get this fixed, please report this to the SDL mailing list <sdl@libsdl.org> X11 KeyCode %d (%d), X11 KeySym 0x%X (%s).\n",
slouken@2305
   201
                        keycode, keycode - min_keycode, keysym,
slouken@2305
   202
                        XKeysymToString(keysym));
bob@2299
   203
            }
bob@2295
   204
#endif
bob@2325
   205
            /* */
slouken@2305
   206
            SDL_zero(text);
bob@2325
   207
#ifdef X_HAVE_UTF8_STRING
bob@2325
   208
            if (data->ic) {
bob@2325
   209
                Xutf8LookupString(data->ic, &xevent.xkey, text, sizeof(text),
bob@2325
   210
                                  &keysym, status);
bob@2325
   211
            }
bob@2325
   212
#else
slouken@2306
   213
            XLookupString(&xevent.xkey, text, sizeof(text), &keysym, NULL);
bob@2325
   214
#endif
slouken@2305
   215
            if (*text) {
slouken@2305
   216
                printf("Sending text event %s\n", text);
bob@2300
   217
                SDL_SendKeyboardText(videodata->keyboard, text);
bob@2300
   218
            }
slouken@1951
   219
        }
slouken@1951
   220
        break;
slouken@1951
   221
slouken@1951
   222
        /* Key release? */
slouken@1951
   223
    case KeyRelease:{
slouken@1951
   224
            KeyCode keycode = xevent.xkey.keycode;
slouken@1951
   225
slouken@1951
   226
#ifdef DEBUG_XEVENTS
slouken@1951
   227
            printf("KeyRelease (X11 keycode = 0x%X)\n", xevent.xkey.keycode);
slouken@1951
   228
#endif
bob@2295
   229
            SDL_SendKeyboardKey(videodata->keyboard, SDL_RELEASED,
slouken@2305
   230
                                videodata->key_layout[keycode]);
slouken@1951
   231
        }
slouken@1951
   232
        break;
slouken@1951
   233
slouken@1951
   234
        /* Have we been iconified? */
slouken@1951
   235
    case UnmapNotify:{
slouken@1951
   236
#ifdef DEBUG_XEVENTS
slouken@1951
   237
            printf("UnmapNotify!\n");
slouken@1951
   238
#endif
slouken@1951
   239
            SDL_SendWindowEvent(data->windowID, SDL_WINDOWEVENT_HIDDEN, 0, 0);
slouken@1951
   240
            SDL_SendWindowEvent(data->windowID, SDL_WINDOWEVENT_MINIMIZED, 0,
slouken@1951
   241
                                0);
slouken@1951
   242
        }
slouken@1951
   243
        break;
slouken@1951
   244
slouken@1951
   245
        /* Have we been restored? */
slouken@1951
   246
    case MapNotify:{
slouken@1951
   247
#ifdef DEBUG_XEVENTS
slouken@1951
   248
            printf("MapNotify!\n");
slouken@1951
   249
#endif
slouken@1951
   250
            SDL_SendWindowEvent(data->windowID, SDL_WINDOWEVENT_SHOWN, 0, 0);
slouken@1951
   251
            SDL_SendWindowEvent(data->windowID, SDL_WINDOWEVENT_RESTORED, 0,
slouken@1951
   252
                                0);
slouken@1951
   253
        }
slouken@1951
   254
        break;
slouken@1951
   255
slouken@1951
   256
        /* Have we been resized or moved? */
slouken@1951
   257
    case ConfigureNotify:{
slouken@1951
   258
#ifdef DEBUG_XEVENTS
slouken@1951
   259
            printf("ConfigureNotify! (resize: %dx%d)\n",
slouken@1951
   260
                   xevent.xconfigure.width, xevent.xconfigure.height);
slouken@1951
   261
#endif
slouken@1951
   262
            SDL_SendWindowEvent(data->windowID, SDL_WINDOWEVENT_MOVED,
slouken@1951
   263
                                xevent.xconfigure.x, xevent.xconfigure.y);
slouken@1951
   264
            SDL_SendWindowEvent(data->windowID, SDL_WINDOWEVENT_RESIZED,
slouken@1951
   265
                                xevent.xconfigure.width,
slouken@1951
   266
                                xevent.xconfigure.height);
slouken@1951
   267
        }
slouken@1951
   268
        break;
slouken@1951
   269
slouken@1951
   270
        /* Have we been requested to quit (or another client message?) */
slouken@1951
   271
    case ClientMessage:{
slouken@1951
   272
            if ((xevent.xclient.format == 32) &&
slouken@1951
   273
                (xevent.xclient.data.l[0] == videodata->WM_DELETE_WINDOW)) {
slouken@1951
   274
slouken@1951
   275
                SDL_SendWindowEvent(data->windowID, SDL_WINDOWEVENT_CLOSE, 0,
slouken@1951
   276
                                    0);
slouken@1951
   277
            }
slouken@1951
   278
        }
slouken@1951
   279
        break;
slouken@1951
   280
slouken@1951
   281
        /* Do we need to refresh ourselves? */
slouken@1951
   282
    case Expose:{
slouken@1951
   283
#ifdef DEBUG_XEVENTS
slouken@1951
   284
            printf("Expose (count = %d)\n", xevent.xexpose.count);
slouken@1951
   285
#endif
slouken@1951
   286
            SDL_SendWindowEvent(data->windowID, SDL_WINDOWEVENT_EXPOSED, 0,
slouken@1951
   287
                                0);
slouken@1951
   288
        }
slouken@1951
   289
        break;
slouken@1951
   290
slouken@1951
   291
    default:{
kazeuser@3761
   292
            if(xevent.type==motion)//MotionNotify
kazeuser@3761
   293
            {
kazeuser@3761
   294
#ifdef DEBUG_MOTION
kazeuser@3761
   295
                printf("X11 motion: %d,%d\n", xevent.xmotion.x, xevent.xmotion.y);
kazeuser@3761
   296
#endif
kazeuser@3761
   297
			    XDeviceMotionEvent* move=(XDeviceMotionEvent*)&xevent;
kazeuser@3761
   298
                SDL_SendMouseMotion(move->deviceid, 0, move->x,
kazeuser@3761
   299
                                move->y,move->axis_data[2]);
kazeuser@3761
   300
            }
kazeuser@3761
   301
    /*
kazeuser@3761
   302
kazeuser@3761
   303
        Mouse button press? */
kazeuser@3761
   304
            else if(xevent.type==button_pressed)//ButtonPress
kazeuser@3761
   305
            {
kazeuser@3761
   306
			    XDeviceButtonPressedEvent* pressed=(XDeviceButtonPressedEvent*)&xevent;
kazeuser@3761
   307
                SDL_SendMouseButton(pressed->deviceid, SDL_PRESSED,
kazeuser@3761
   308
                                pressed->button);
kazeuser@3761
   309
            }
kazeuser@3761
   310
kazeuser@3761
   311
        /* Mouse button release? */
kazeuser@3761
   312
            else if(xevent.type==button_released)//ButtonRelease
kazeuser@3761
   313
            {
kazeuser@3761
   314
			    XDeviceButtonReleasedEvent* released=(XDeviceButtonReleasedEvent*)&xevent;
kazeuser@3761
   315
                SDL_SendMouseButton(released->deviceid, SDL_RELEASED,
kazeuser@3761
   316
                                released->button);
kazeuser@3761
   317
            }
kazeuser@3761
   318
            else
kazeuser@3761
   319
            {
slouken@1951
   320
#ifdef DEBUG_XEVENTS
kazeuser@3761
   321
                printf("Unhandled event %d\n", xevent.type);
slouken@1951
   322
#endif
kazeuser@3761
   323
            }
slouken@1951
   324
        }
slouken@1951
   325
        break;
slouken@1951
   326
    }
slouken@1951
   327
}
slouken@1951
   328
kazeuser@3761
   329
slouken@1951
   330
/* Ack!  XPending() actually performs a blocking read if no events available */
slouken@1951
   331
int
slouken@1951
   332
X11_Pending(Display * display)
slouken@1951
   333
{
slouken@1951
   334
    /* Flush the display connection and look to see if events are queued */
slouken@1951
   335
    XFlush(display);
slouken@1951
   336
    if (XEventsQueued(display, QueuedAlready)) {
slouken@1951
   337
        return (1);
slouken@1951
   338
    }
slouken@1951
   339
slouken@1951
   340
    /* More drastic measures are required -- see if X is ready to talk */
slouken@1951
   341
    {
slouken@1951
   342
        static struct timeval zero_time;        /* static == 0 */
slouken@1951
   343
        int x11_fd;
slouken@1951
   344
        fd_set fdset;
slouken@1951
   345
slouken@1951
   346
        x11_fd = ConnectionNumber(display);
slouken@1951
   347
        FD_ZERO(&fdset);
slouken@1951
   348
        FD_SET(x11_fd, &fdset);
slouken@1951
   349
        if (select(x11_fd + 1, &fdset, NULL, NULL, &zero_time) == 1) {
slouken@1951
   350
            return (XPending(display));
slouken@1951
   351
        }
slouken@1951
   352
    }
slouken@1951
   353
slouken@1951
   354
    /* Oh well, nothing is ready .. */
slouken@1951
   355
    return (0);
slouken@1951
   356
}
slouken@1951
   357
slouken@1951
   358
void
slouken@1951
   359
X11_PumpEvents(_THIS)
slouken@1951
   360
{
slouken@1951
   361
    SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
slouken@1951
   362
slouken@1951
   363
    /* Keep processing pending events */
slouken@1951
   364
    while (X11_Pending(data->display)) {
slouken@1951
   365
        X11_DispatchEvent(_this);
slouken@1951
   366
    }
slouken@1951
   367
}
slouken@1951
   368
slouken@1951
   369
void
slouken@1951
   370
X11_SaveScreenSaver(Display * display, int *saved_timeout, BOOL * dpms)
slouken@1951
   371
{
slouken@1951
   372
    int timeout, interval, prefer_blank, allow_exp;
slouken@1951
   373
    XGetScreenSaver(display, &timeout, &interval, &prefer_blank, &allow_exp);
slouken@1951
   374
    *saved_timeout = timeout;
slouken@1951
   375
slouken@1951
   376
#if SDL_VIDEO_DRIVER_X11_DPMS
slouken@1951
   377
    if (SDL_X11_HAVE_DPMS) {
slouken@1951
   378
        int dummy;
slouken@1951
   379
        if (DPMSQueryExtension(display, &dummy, &dummy)) {
slouken@1951
   380
            CARD16 state;
slouken@1951
   381
            DPMSInfo(display, &state, dpms);
slouken@1951
   382
        }
slouken@1951
   383
    }
slouken@1951
   384
#else
slouken@1951
   385
    *dpms = 0;
slouken@1951
   386
#endif /* SDL_VIDEO_DRIVER_X11_DPMS */
slouken@1951
   387
}
slouken@1951
   388
slouken@1951
   389
void
slouken@1951
   390
X11_DisableScreenSaver(Display * display)
slouken@1951
   391
{
slouken@1951
   392
    int timeout, interval, prefer_blank, allow_exp;
slouken@1951
   393
    XGetScreenSaver(display, &timeout, &interval, &prefer_blank, &allow_exp);
slouken@1951
   394
    timeout = 0;
slouken@1951
   395
    XSetScreenSaver(display, timeout, interval, prefer_blank, allow_exp);
slouken@1951
   396
slouken@1951
   397
#if SDL_VIDEO_DRIVER_X11_DPMS
slouken@1951
   398
    if (SDL_X11_HAVE_DPMS) {
slouken@1951
   399
        int dummy;
slouken@1951
   400
        if (DPMSQueryExtension(display, &dummy, &dummy)) {
slouken@1951
   401
            DPMSDisable(display);
slouken@1951
   402
        }
slouken@1951
   403
    }
slouken@1951
   404
#endif /* SDL_VIDEO_DRIVER_X11_DPMS */
slouken@1951
   405
}
slouken@1951
   406
slouken@1951
   407
void
slouken@1951
   408
X11_RestoreScreenSaver(Display * display, int saved_timeout, BOOL dpms)
slouken@1951
   409
{
slouken@1951
   410
    int timeout, interval, prefer_blank, allow_exp;
slouken@1951
   411
    XGetScreenSaver(display, &timeout, &interval, &prefer_blank, &allow_exp);
slouken@1951
   412
    timeout = saved_timeout;
slouken@1951
   413
    XSetScreenSaver(display, timeout, interval, prefer_blank, allow_exp);
slouken@1951
   414
slouken@1951
   415
#if SDL_VIDEO_DRIVER_X11_DPMS
slouken@1951
   416
    if (SDL_X11_HAVE_DPMS) {
slouken@1951
   417
        int dummy;
slouken@1951
   418
        if (DPMSQueryExtension(display, &dummy, &dummy)) {
slouken@1951
   419
            if (dpms) {
slouken@1951
   420
                DPMSEnable(display);
slouken@1951
   421
            }
slouken@1951
   422
        }
slouken@1951
   423
    }
slouken@1951
   424
#endif /* SDL_VIDEO_DRIVER_X11_DPMS */
slouken@1951
   425
}
slouken@1951
   426
slouken@1951
   427
/* vi: set ts=4 sw=4 expandtab: */