X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgbase%2Fwindow.cpp;h=089136003529f2fbd56a0c002ddcccdde88304ee;hb=22d13842e2bc956f941b6372045c1aa6a062bc10;hp=06af1ae7662fae81ed8b18c07db8b05ecd4aee0a;hpb=ac4a20591d64b08d435c88acce724a891a51d551;p=libs%2Fgui.git diff --git a/source/gbase/window.cpp b/source/gbase/window.cpp index 06af1ae..0891360 100644 --- a/source/gbase/window.cpp +++ b/source/gbase/window.cpp @@ -49,7 +49,7 @@ LRESULT CALLBACK wndproc_(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) #else Bool match_event_type(Display *, XEvent *event, XPointer arg) { - return event->type==reinterpret_cast(arg); + return event->type==*reinterpret_cast(arg); } #endif @@ -252,7 +252,8 @@ void Window::reconfigure(const WindowOptions &opts) // Wait for the window to be unmapped. This makes window managers happy. XEvent ev; - XPeekIfEvent(dpy, &ev, match_event_type, reinterpret_cast(UnmapNotify)); + int ev_type=UnmapNotify; + XPeekIfEvent(dpy, &ev, match_event_type, reinterpret_cast(&ev_type)); } XSetWindowAttributes attr; @@ -456,12 +457,14 @@ bool Window::event(const Event &evnt) resizing=false; signal_resize.emit(options.width, options.height); } +#ifdef WITH_XF86VIDMODE if(options.fullscreen) { ::Display *dpy=display.get_private().display; int screen=DefaultScreen(dpy); XF86VidModeSetViewPort(dpy, screen, ev.xconfigure.x, ev.xconfigure.y); } +#endif break; case ClientMessage: if(ev.xclient.data.l[0]==static_cast(priv->wm_delete_window))