Created
          November 13, 2011 18:17 
        
      - 
      
 - 
        
Save ankurs/1362439 to your computer and use it in GitHub Desktop.  
    Watch movie without screen getting locked
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include<X11/Xlib.h> | |
| #include<X11/Xutil.h> | |
| #include<X11/keysym.h> | |
| #include<unistd.h> | |
| #define DURATION 100 | |
| int main() | |
| { | |
| Display *display = NULL; | |
| display = XOpenDisplay(NULL); | |
| while(1) | |
| { | |
| XWarpPointer(display, None, None, 0, 0, 0, 0, 100, 100); | |
| XFlush(display); | |
| sleep(DURATION); | |
| XWarpPointer(display, None, None, 0, 0, 0, 0, -100, -100); | |
| XFlush(display); | |
| sleep(DURATION); | |
| } | |
| return 0; | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment