Closed Bug 308536 Opened 19 years ago Closed 18 years ago

Support monochrome cursors when GTK version is less than 2.4

Categories

(Core :: Widget: Gtk, defect, P3)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: darin.moz, Assigned: Biesinger)

References

()

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

Support monochrome cursors when GTK version is less than 2.4

It'd be cool if we still supported URL-valued CSS cursors on older systems that
do not have the ability to render full-color cursors.  Biesi suggested that we
could do this by rendering the supplied images as monochrome.
Attached patch patchSplinter Review
I'm not sure whether this is the best possible algorithm... I'm currently
making the pixel black if the average of the r,g,b values is < 128.
Attachment #196101 - Flags: review?(bryner)
Status: NEW → ASSIGNED
Priority: -- → P3
Target Milestone: --- → mozilla1.9alpha
darin: could you verify that this patch works under your gtk version? I only
have gtk 2.6 available.
Works great!  Thanks for the patch, biesi :)
Component: Style System (CSS) → Widget: Gtk
QA Contact: ian → gtk
Would it make more sense to look at the luminance instead of the average?
hmm, it may... do we have an easy way to get that?
http://lxr.mozilla.org/seamonkey/source/layout/base/nsCSSColorUtils.h#64 and the corresponding cpp has some code.  Maybe it should move to nsColor?
Attachment #196101 - Flags: review?(bryner) → review+
Comment on attachment 196101 [details] [diff] [review]
patch

ok, I think I don't want to move that function around as part of this bug, so I'll file a new bug on that.
Attachment #196101 - Flags: superreview?(roc)
Attachment #196101 - Flags: superreview?(roc) → superreview+
filed bug 329646 for luminance

Checking in widget/src/gtk2/nsWindow.cpp;
/cvsroot/mozilla/widget/src/gtk2/nsWindow.cpp,v  <--  nsWindow.cpp
new revision: 1.160; previous revision: 1.159
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment on attachment 196101 [details] [diff] [review]
patch

I think this would also be good for firefox 2.
Attachment #196101 - Flags: approval-branch-1.8.1?(roc)
I'm not really sure about that ... I'd like to see some reports of actual problems in the wild
Attachment #196101 - Flags: approval-branch-1.8.1?(roc) → approval1.8.1?
Attachment #196101 - Flags: approval1.8.1? → approval1.8.1+
Checked in on MOZILLA_1_8_BRANCH

Checking in widget/src/gtk2/nsWindow.cpp;
/cvsroot/mozilla/widget/src/gtk2/nsWindow.cpp,v  <--  nsWindow.cpp
new revision: 1.145.2.3; previous revision: 1.145.2.2
done
Keywords: fixed1.8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: