Browse Source

fix pugl with strict flags

tags/1.9.4
falkTX 11 years ago
parent
commit
2a857b0529
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      source/modules/dgl/src/pugl/pugl_x11.c

+ 6
- 6
source/modules/dgl/src/pugl/pugl_x11.c View File

@@ -123,7 +123,7 @@ puglCreate(PuglNativeWindow parent,

impl->win = XCreateWindow(
impl->display, xParent,
0, 0, view->width, view->height, 0, vi->depth, InputOutput, vi->visual,
0, 0, (unsigned int)view->width, (unsigned int)view->height, 0, vi->depth, InputOutput, vi->visual,
CWBorderPixel | CWColormap | CWEventMask, &attr);

XSizeHints sizeHints;
@@ -247,9 +247,9 @@ keySymToSpecial(KeySym sym)
}

static void
setModifiers(PuglView* view, unsigned xstate, unsigned xtime)
setModifiers(PuglView* view, unsigned xstate, unsigned long xtime)
{
view->event_timestamp_ms = xtime;
view->event_timestamp_ms = (uint32_t)xtime;

view->mods = 0;
view->mods |= (xstate & ShiftMask) ? PUGL_MOD_SHIFT : 0;
@@ -275,7 +275,7 @@ dispatchKey(PuglView* view, XEvent* event, bool press)
if (special && view->specialFunc) {
view->specialFunc(view, press, special);
} else if (!special && view->keyboardFunc) {
view->keyboardFunc(view, press, str[0]);
view->keyboardFunc(view, press, (uint32_t)str[0]);
}
}

@@ -332,7 +332,7 @@ puglProcessEvents(PuglView* view)
if (view->mouseFunc &&
(event.xbutton.button < 4 || event.xbutton.button > 7)) {
view->mouseFunc(view,
event.xbutton.button, event.type == ButtonPress,
(int)event.xbutton.button, event.type == ButtonPress,
event.xbutton.x, event.xbutton.y);
}
break;
@@ -393,5 +393,5 @@ puglPostRedisplay(PuglView* view)
PuglNativeWindow
puglGetNativeWindow(PuglView* view)
{
return view->impl->win;
return (PuglNativeWindow)view->impl->win;
}

Loading…
Cancel
Save