Difference for arch/ogl/glx.c from version 1.12 to 1.13


version 1.12 version 1.13
Line 21
 
Line 21
 Window win;  Window win;
 XVisualInfo *visinfo;  XVisualInfo *visinfo;
 GLXContext glxcontext;  GLXContext glxcontext;
 static int fullscreen=0;  
 Pixmap blankpixmap=None;  Pixmap blankpixmap=None;
 Cursor blankcursor=None;  Cursor blankcursor=None;
   
 int gr_check_fullscreen(void){  void ogl_do_fullscreen_internal(void){
  return fullscreen;  // ogl_smash_texture_list_internal();//not needed
 }   if (ogl_fullscreen){
 void gr_do_fullscreen(int f){  
  fullscreen=f;  
  if (gl_initialized){  
  if (fullscreen){  
  XMoveWindow(dpy,win,0,0);   XMoveWindow(dpy,win,0,0);
 // XDefineCursor(dpy,win,blankcursor);  // XDefineCursor(dpy,win,blankcursor);
  //XGrabPointer(dpy,win,0,swa.event_mask,GrabModeAsync,GrabModeAsync,win,blankcursor,CurrentTime);   //XGrabPointer(dpy,win,0,swa.event_mask,GrabModeAsync,GrabModeAsync,win,blankcursor,CurrentTime);
Line 39
 
Line 34
 // XGrabKeyboard(dpy,win,1,GrabModeAsync,GrabModeAsync,CurrentTime);//grabbing keyboard doesn't seem to do much good anyway.  // XGrabKeyboard(dpy,win,1,GrabModeAsync,GrabModeAsync,CurrentTime);//grabbing keyboard doesn't seem to do much good anyway.
    
 #ifdef XFREE86_DGA  #ifdef XFREE86_DGA
  //make fullscreen   //make ogl_fullscreen
  //can you even do this with DGA ?  just resizing with ctrl-alt-(-/+) caused X to die a horrible death.   //can you even do this with DGA ?  just resizing with ctrl-alt-(-/+) caused X to die a horrible death.
  //might have to kill the window/context/whatever first?  HRm.   //might have to kill the window/context/whatever first?  HRm.
 #endif  #endif
Line 52
 
Line 47
 #endif  #endif
  }   }
  }   }
 }  
 int gr_toggle_fullscreen(void){  
  gr_do_fullscreen(!fullscreen);  
  // grd_curscreen->sc_mode=0;//hack to get it to reset screen mode  
  return fullscreen;  
 }  
   
 inline void ogl_swap_buffers_internal(void){  inline void ogl_swap_buffers_internal(void){
  glXSwapBuffers(dpy,win);   glXSwapBuffers(dpy,win);
Line 97
 
Line 86
 // sleep(1);  // sleep(1);
  }   }
    
  if (fullscreen)   if (ogl_fullscreen)
  gr_do_fullscreen(fullscreen);   ogl_do_fullscreen_internal();
   // gr_do_fullscreen(ogl_fullscreen);
  }   }
 #ifdef GII_XWIN  #ifdef GII_XWIN
  init_gii_xwin(dpy,win);   init_gii_xwin(dpy,win);
Line 124
 
Line 114
  Error("no visual\n");   Error("no visual\n");
 }  }
 void ogl_close(void){  void ogl_close(void){
  gr_do_fullscreen(0);   if (ogl_fullscreen){
    ogl_fullscreen=0;
    ogl_do_fullscreen_internal();
    }
  ogl_destroy_window();   ogl_destroy_window();
  if (blankcursor!=None){   if (blankcursor!=None){
  XFreeCursor(dpy,blankcursor);   XFreeCursor(dpy,blankcursor);

Legend:
line(s) removed in v.1.12 
line(s) changed
 line(s) added in v.1.13