Find the answer to your Linux question:
Results 1 to 2 of 2
I wonder if it's posible to make the mouse cursor move to the top left corner of the screen when Xorg starts....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    May 2008
    Location
    NYC, moved from KS & MO
    Posts
    251

    [SOLVED] Start Xorg with cursor on the top left corner


    I wonder if it's posible to make the mouse cursor move to the top left corner of the screen when Xorg starts.

  2. #2
    Linux User
    Join Date
    May 2008
    Location
    NYC, moved from KS & MO
    Posts
    251
    OK found the solution (I am programming with fltk 1.1 under debian etch)

    Code:
    #include <FL/x.H>
    extern Display *fl_display;
    
    int jump_cursor (int new_x, int new_y)
    {
          Window rootwindow = DefaultRootWindow(fl_display);
          XWarpPointer(fl_display, rootwindow, rootwindow, 0, 0, 0, 0,new_x, new_y);
    }
    Then I just add the following line to function main()
    Code:
    	jump_cursor(0,0);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •