Changeset 896 for trunk/source/visualization/OpenGL/src/G4OpenGLXViewer.cc
- Timestamp:
- Dec 3, 2008, 5:31:19 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/OpenGL/src/G4OpenGLXViewer.cc
r893 r896 258 258 #endif 259 259 260 size_hints->width = fVP.GetWindowSizeHintX(); 261 size_hints->height = fVP.GetWindowSizeHintY(); 262 size_hints->flags |= PSize; 260 261 Window root_return; 262 int x_return, y_return; 263 unsigned int width_return, height_return; 264 unsigned int border_width_return; 265 unsigned int depth_return; 266 267 #ifdef G4DEBUG 268 printf("G4OpenGLXViewer::CreateMainWindow 1\n"); 269 #endif 270 // get the parent window's geometry 271 XGetGeometry(dpy, XRootWindow (dpy, vi -> screen), &root_return, &x_return, &y_return, 272 &width_return, &height_return, &border_width_return, 273 &depth_return); 274 275 #ifdef G4DEBUG 276 printf("G4OpenGLXViewer::CreateMainWindow 2 root W :%d H :%d\n",width_return, height_return); 277 #endif 263 278 264 279 // G4int WinSize_x; … … 266 281 WinSize_x = fVP.GetWindowSizeHintX(); 267 282 WinSize_y = fVP.GetWindowSizeHintY(); 268 x_origin = fVP.GetWindowLocationHintX(); 269 y_origin = fVP.GetWindowLocationHintY(); 270 283 x_origin = fVP.GetWindowAbsoluteLocationHintX(width_return); 284 y_origin = fVP.GetWindowAbsoluteLocationHintY(height_return); 285 286 size_hints->base_width = WinSize_x; 287 size_hints->base_height = WinSize_y; 288 size_hints->x = x_origin; 289 size_hints->y = y_origin; 290 size_hints->flags |= PSize | PPosition; 271 291 #ifdef G4DEBUG 272 292 printf("G4OpenGLXViewer::CreateMainWindow CreateWindow Size:W:%d H:%d X:%d Y:%d \n",WinSize_x,WinSize_y,x_origin,y_origin); … … 292 312 class_hints -> res_class = NewString("G4OpenGL"); 293 313 294 win = XCreateWindow (dpy, XRootWindow (dpy, vi -> screen), x_origin,295 y_origin, WinSize_x, WinSize_y, 0, vi -> depth,296 InputOutput, vi -> visual,297 CWBorderPixel | CWColormap |298 CWEventMask | CWBackingStore,299 &swa);300 301 XSetWMProperties (dpy, win, &windowName, &iconName, 0, 0,302 size_hints, wm_hints, class_hints);314 win = XCreateWindow (dpy, XRootWindow (dpy, vi -> screen), x_origin, 315 y_origin, WinSize_x, WinSize_y, 0, vi -> depth, 316 InputOutput, vi -> visual, 317 CWBorderPixel | CWColormap | 318 CWEventMask | CWBackingStore, 319 &swa); 320 321 XSetWMProperties (dpy, win, &windowName, &iconName, 0, 0, 322 size_hints, wm_hints, class_hints); 303 323 304 324 // request X to Draw window on screen.
Note: See TracChangeset
for help on using the changeset viewer.