gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cursors on MS Windows


From: Germán Arias
Subject: Re: Cursors on MS Windows
Date: Mon, 09 Mar 2015 15:15:45 -0600

The problem is that Windows constantly try to update the cursor. So, we
need a way to determine when allow GNUstep handle the cursor and when
allow Windows do it. If we allow GNUstep handle the cursor all the time,
we will need take care of the cursor at window borders (this is display
the double arrow to resize the window or any other Windows cursor). If
we allow Windows handle the cursor we will have an arrow cursor almost
all the time (the current status). So, I'm using the same approach on
TestPlant branch to determine when allow GNUstep handle the cursor. If
we have a cursor on the stack then allow GNUstep handle the cursor. But
there are other situations.

If the user move the mouse over a contextual menu, we should remove our
cursor and then update it when the menu is closed.  GNUstep
contextual/transient menus use its own cursor. But in the case of native
menus on Windows, we should take care of this. This is not a problem
because I handle it with messages WM_ENTERMENULOOP and WM_EXITMENULOOP,
so this only happen when using native menus. If the user move the mouse
over the border, we can have a cursor on the stack but this don't mean
we should allow GNUstep handle the cursor (this occurs because the event
UpdateCursor is sent after the event MouseMove). So, we need take care
in this situations. This is also the case when the user move the mouse
to a window, maybe the stack is empty, but we should check if GNUstep
should update the cursor.

This is how I understand this, but keep in mind I'm investigating this
only from some days ago.

Germán.

El lun, 09-03-2015 a las 08:52 +0100, Fred Kiefer escribió:
> Hi German,
> 
> adding this method is fine for me, but I would also like to understand what 
> the issue is and how you are going to address it. From your mail I conclude 
> that it is about window borders or subviews that aten't managed by GNUstep 
> and we need to reset the cursors when entering into these, is this correct? 
> Normally we use enter and exit events to handle this situation, why aren't 
> these working on Windows?
> 
> Fred
> 
> On the road
> 
> Am 09.03.2015 um 07:45 schrieb Germán Arias <address@hidden>:
> 
> > After some days trying to solve the cursor problems on Windows, I found
> > a solution that, I think, is better than the corresponding solution in
> > TestPlant branch. Initially I tried to implement the TestPlant solution,
> > but this have problems (as you can see in the comments in that branch).
> > So I worked in my own solution, but this (like the TestPlant solution)
> > requires a small change in the side of GUI. We need know the count of
> > cursors in gnustep_gui_cursor_stack, to remove our cursors when the
> > mouse enter an area which is drawed by Windows (a menu or a nonclient
> > area). But the variable "gnustep_gui_cursor_stack" is not accessible
> > outside of NSCursor. So, could I add something like this at NSCursor?:
> > 
> > #ifdef WIN32
> > + (NSUInteger) count
> > {
> >  return [gnustep_gui_cursor_stack count];
> > }
> > #endif
> > 
> > Germán
> > 
> > 
> > 
> > _______________________________________________
> > Gnustep-dev mailing list
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/gnustep-dev





reply via email to

[Prev in Thread] Current Thread [Next in Thread]