GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Aug 27, 2016 4:49 pm

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: How do I unobtrusivly get cursor position anywhere on screen
PostPosted: Wed Jan 16, 2013 11:34 pm 

Joined: Wed Jan 16, 2013 12:50 am
Posts: 1
I have a shaped GTK window which follows the cursor around the screen. (This is because the OS cursor is not always sent reliably across VNC.)
I am using PyGTK on linux.
My problem is that events, such as mouse button clicks, are being captured by my window, instead of going to whatever window is under the cursor.
To get the global cursor position, instead of a position relative to my window, I am using gtk.gdk.pointer_grab(), so I guess this is why the events are getting consumed by my window.

Is there a way to pass the events back to the operating system for processing by other windows?

Or alternatively, is there a different way to get the global, screen cursor coordinates. I have tried getting window relative coordinates and adding them to the window's screen position, but this only works if the user moves the cursor slowly. If it moves quickly outside the window, within one refresh frame, the 'grabbing' is lost.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group