Ignore:
Timestamp:
Dec 5, 2008, 2:48:29 PM (16 years ago)
Author:
garnier
Message:

x,y position should be ok

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/OpenGL/src/G4OpenGLXmViewer.cc

    r897 r898  
    126126  borcol = XBlackPixelOfScreen (XtScreen(shell));
    127127 
     128  fWinSize_x = fVP.GetWindowSizeHintX();
     129  fWinSize_y = fVP.GetWindowSizeHintY();
     130  G4int x_origin = fVP.GetWindowAbsoluteLocationHintX(DisplayWidth(dpy, vi -> screen));
     131  G4int y_origin = fVP.GetWindowAbsoluteLocationHintY(DisplayHeight(dpy, vi -> screen));
     132
    128133  XtVaSetValues (shell,
    129134                 XtNvisual, vi -> visual,
    130                  XtNdepth, vi -> depth, 
     135                 XtNdepth, vi -> depth,
    131136                 XtNcolormap, cmap,
     137                 XtNwidth, fWinSize_x,
     138                 XtNheight, fWinSize_y,
     139                 XtNx, x_origin,
     140                 XtNy, y_origin,
    132141                 XtNborderColor, &borcol,
    133142                 XtNbackground, &bgnd,
     
    593602  // Once widget is realized (ie, associated with a created X window), we
    594603  // can bind the OpenGL rendering context to the window.
    595 
    596   Dimension width, height;
    597   XtVaGetValues (glxarea,XmNwidth,&width,XmNheight,&height,NULL);
    598   fWinSize_x = (unsigned int) width;
    599   fWinSize_y = (unsigned int) height;
    600604
    601605  win = XtWindow (glxarea);
Note: See TracChangeset for help on using the changeset viewer.