[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libcvd-members] libcvd/cvd_src/Win32 glwindow.cpp
From: |
Gerhard Reitmayr |
Subject: |
[libcvd-members] libcvd/cvd_src/Win32 glwindow.cpp |
Date: |
Wed, 27 Aug 2008 19:52:20 +0000 |
CVSROOT: /cvsroot/libcvd
Module name: libcvd
Changes by: Gerhard Reitmayr <gerhard> 08/08/27 19:52:20
Modified files:
cvd_src/Win32 : glwindow.cpp
Log message:
some fixes for window position and size in windows implementation
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd_src/Win32/glwindow.cpp?cvsroot=libcvd&r1=1.1&r2=1.2
Patches:
Index: glwindow.cpp
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd_src/Win32/glwindow.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- glwindow.cpp 12 Jun 2008 13:04:16 -0000 1.1
+++ glwindow.cpp 27 Aug 2008 19:52:20 -0000 1.2
@@ -241,14 +241,14 @@
void GLWindow::set_size(const ImageRef & s_){
state->size = s_;
- MoveWindow(state->hWnd, state->position.x, state->position.y,
state->size.x, state->size.y, FALSE);
+ MoveWindow(state->hWnd, state->position.x + state->position_offset.x,
state->position.y + state->position_offset.y, state->size.x +
state->size_offset.x, state->size.y + state->size_offset.y, FALSE);
}
ImageRef GLWindow::position() const { return state->position; }
void GLWindow::set_position(const ImageRef & p_){
state->position = p_;
- MoveWindow(state->hWnd, state->position.x, state->position.y,
state->size.x, state->size.y, FALSE);
+ MoveWindow(state->hWnd, state->position.x + state->position_offset.x,
state->position.y + state->position_offset.y, state->size.x +
state->size_offset.x, state->size.y + state->size_offset.y, FALSE);
}
void GLWindow::set_cursor_position(const ImageRef& where)
@@ -499,8 +499,10 @@
state.size = newSize;
state.parent->activate();
glViewport(0, 0, state.size.x, state.size.y);
- assert(currentHandler != NULL);
+ if(currentHandler != NULL)
currentHandler->on_resize(*state.parent, state.size);
+ else
+ cerr << "Event outside of cvd control for " << state.title
<< endl;
}
state.position = ImageRef(pos->x, pos->y) - state.position_offset;
return 0;
- [libcvd-members] libcvd/cvd_src/Win32 glwindow.cpp,
Gerhard Reitmayr <=