To Robin or anyone here who uses Ubuntu: I have produced a runnable sample, but I’m not near an Ubuntu VM, so can please someone run it?
What’s supposed to happen, (before the bug,) is that when you click on the frame, the cursor changes, But it doesn’t in Ubuntu, unless you comment out the CaptureMouse
line. Please tell me if this happens, and then I’ll post a ticket.
The sample:
‘’’
import wx
import cursor_collection
class Frame(wx.Frame):
def init(self, parent):
wx.Frame.init(self, parent)
self.cursors = [wx.StockCursor(wx.CURSOR_ARROW),
wx.StockCursor(wx.CURSOR_BULLSEYE)]
self.i_current_cursor = 0
self.SetCursor(self.cursors[self.i_current_cursor])
self.Bind(wx.EVT_MOUSE_EVENTS, self.on_mouse)
self.Show()
This line causes the cursor not to change on Ubuntu. Comment it out to
see it start working.
self.CaptureMouse()
def toggle_cursor(self):
self.i_current_cursor = 1 - self.i_current_cursor
self.SetCursor(self.cursors[self.i_current_cursor])
def on_mouse(self, event):
event.Skip()
if event.LeftDown():
self.toggle_cursor()
app = wx.PySimpleApp()
frame = Frame(None)
app.MainLoop()
‘’’
Ram.
···
On Mon, Apr 26, 2010 at 10:15 PM, cool-RR cool-rr@cool-rr.com wrote:
On Mon, Apr 26, 2010 at 7:26 PM, Robin Dunn robin@alldunn.com wrote:
On 4/24/10 3:54 AM, cool-RR wrote:
Hey,
Do you know about this phenomenon on Ubuntu where if you do
SetCursor
while your window HasCapture
, the cursor won’t really
change? If this is unknown to you I can try to make a sample and/or
open a bug.
Please create a ticket for it.
Is the window you are calling SetCursor on the same as the one with the capture?
–
Robin Dunn
Yes it is. Ticket coming soon.
Ram.
–
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en