Closed Bug 40421 Opened 24 years ago Closed 24 years ago

Assert failure when rolling mouse cursor over URL d&d icon in RH6.2

Categories

(Core :: XUL, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: scott, Assigned: pavlov)

References

()

Details

(4 keywords)

From Bugzilla Helper:
BuildID:    2000042708 (using CVS)

Using Red Hat 6.2 with Gnome desktop.  If I move the mouse cursor over the url 
bar d&d (drag and drop) icon, I get multiple ASSERTION: Invalid cursor type,... 
nsWindow.cpp line 888.

The cursor does not change when rolling over the icon.  Another RH 6.2 Gnome 
user reports no assertions, but his cursor does not change either.

There is a request for enhancement in this area: # 33649

Reproducible: Always
Steps to Reproduce:
1. Go to any URL
2. Roll the mouse over the url d&d icon.
After inserting a debug fprintf into the offending routine, it's clear what the 
problem is.

http://lxr.mozilla.org/seamonkey/source/widget/src/gtk/nsWindow.cpp

In this file, nsWindow::SetCursor(nsCursor aCursor) is called with a value of 
eCursor_grab.  There is no entry in the switch() statement for eCursor_grab, so 
it falls through to the default, which is the assert statement.

We see that the CSS3 cursors were recently added by <michael.lowe@bigfoot.com> 
in the windows version, and no-operation versions were added to the gtk version:

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/widget/src/gtk/nsWidget.cpp

"case eCursor_grab:" falls through to do no-operation along with several others 
and the comment:

// XXX: these CSS3 cursors need to be implemented

The windows version of the file handles the cursor change in:

http://lxr.mozilla.org/seamonkey/source/widget/src/windows/nsWindow.cpp

case eCursor_grab:
  newCursor = ::LoadCursor(nsToolkit::mDllInstance, MAKEINTRESOURCE(IDC_GRAB));
  break;

However, the new cursors cause an assertion in gtk/nsWindow.cpp.

I suggest adding the same no-operation case statements that we find in 
gtk/nsWidget.cpp.  A better solution would be to make eCursor_grab use some 
cursor that is available in gtk such as GDK_HAND1 or 2 and make the rest 
no-operation.  It is not a serious problem in that the assert is effectively a 
no-operation.

For some reason this doesn't occur on the nightly build, but only when I compile 
the source code myself on RH 6.2.  Perhaps the nsWidget version is being used in 
the nightly build, but the nsWindow version is being used if I compile the tree?  
Or, perhaps the nightly build has assert() turned off?
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
Thanks for taking the time to look at this. Do you feel like putting together
a patch for it?

Even better, you could take a crack at bug #38444, which is to implement the
CSS2/3 cursors for GTK. pavlov says he's taking patches for this :-]
Assignee: trudelle → pavlov
Severity: minor → normal
Depends on: 38444
Keywords: css2, css3, helpwanted, pp
I'm working on a patch for this and bug 38444.
this was fixed with the patch to 38444 wasn't it?
no word back..  marking fixed.  please reopen if it hasn't been completed.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Yes, this was fixed with the patch to 38444.
Thanks. verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.