Last Comment Bug 308536 - Support monochrome cursors when GTK version is less than 2.4
: Support monochrome cursors when GTK version is less than 2.4
Status: RESOLVED FIXED
: fixed1.8.1
Product: Core
Classification: Components
Component: Widget: Gtk (show other bugs)
: Trunk
: x86 Linux
: P3 minor (vote)
: mozilla1.9alpha1
Assigned To: Christian :Biesinger (don't email me, ping me on IRC)
:
:
Mentors:
http://developer.gnome.org/doc/API/2....
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-09-14 12:07 PDT by Darin Fisher
Modified: 2006-06-26 04:43 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (4.81 KB, patch)
2005-09-14 18:22 PDT, Christian :Biesinger (don't email me, ping me on IRC)
bryner: review+
roc: superreview+
darin.moz: approval1.8.1+
Details | Diff | Splinter Review

Description Darin Fisher 2005-09-14 12:07:57 PDT
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.
Comment 1 Christian :Biesinger (don't email me, ping me on IRC) 2005-09-14 18:22:19 PDT
Created attachment 196101 [details] [diff] [review]
patch

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.
Comment 2 Christian :Biesinger (don't email me, ping me on IRC) 2005-09-14 18:24:35 PDT
darin: could you verify that this patch works under your gtk version? I only
have gtk 2.6 available.
Comment 3 Darin Fisher 2005-09-14 18:55:56 PDT
Works great!  Thanks for the patch, biesi :)
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2005-12-29 22:31:03 PST
Would it make more sense to look at the luminance instead of the average?
Comment 5 Christian :Biesinger (don't email me, ping me on IRC) 2005-12-30 02:49:21 PST
hmm, it may... do we have an easy way to get that?
Comment 6 Boris Zbarsky [:bz] (still a bit busy) 2005-12-30 08:49:47 PST
http://lxr.mozilla.org/seamonkey/source/layout/base/nsCSSColorUtils.h#64 and the corresponding cpp has some code.  Maybe it should move to nsColor?
Comment 7 Christian :Biesinger (don't email me, ping me on IRC) 2006-03-04 06:21:00 PST
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.
Comment 8 Christian :Biesinger (don't email me, ping me on IRC) 2006-03-07 10:37:53 PST
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
Comment 9 Christian :Biesinger (don't email me, ping me on IRC) 2006-03-07 10:38:16 PST
Comment on attachment 196101 [details] [diff] [review]
patch

I think this would also be good for firefox 2.
Comment 10 Robert O'Callahan (:roc) (email my personal email if necessary) 2006-03-07 14:41:04 PST
I'm not really sure about that ... I'd like to see some reports of actual problems in the wild
Comment 11 Christian :Biesinger (don't email me, ping me on IRC) 2006-06-26 04:43:43 PDT
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

Note You need to log in before you can comment on or make changes to this bug.