Closed
Bug 201342
Opened 22 years ago
Closed 22 years ago
Drag initiation should use system drag thresholds where available
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
People
(Reporter: saari, Assigned: bryner)
Details
(Keywords: topembed+, Whiteboard: edt_b3)
Attachments
(1 file)
8.45 KB,
patch
|
blizzard
:
review+
sfraser_bugs
:
superreview+
sspitzer
:
approval1.4b+
|
Details | Diff | Splinter Review |
On Win32 we should use the drag threshold rect that the system is using.
Available via getsystemmetrics SM_CXDRAG and SM_CYDRAG
Do Mac and Linux have similar settings we can query?
Comment 1•22 years ago
|
||
Discussed in edt. Plussing.
Updated•22 years ago
|
Summary: Drag initiation should use system draq thresholds where available → Drag initiation should use system drag thresholds where available
Comment 2•22 years ago
|
||
mac has no similar setting, iirc.
Assignee | ||
Comment 3•22 years ago
|
||
I can't find an API for this on Mac either. By inspection, as you're dragging
the mouse (on a Finder icon), the item deselects after you move 4 pixels; the
item starts to move on the 5th pixel.
On linux, the threshold is hardcoded in gtk+ (1.x, anyway) to start the drag if
you've moved more than 3 pixels in any direction (gtk+ 1.2.10, gtkdnd.c, line
2433). blizzard, is there something better we can do for gtk2?
Assignee | ||
Comment 4•22 years ago
|
||
Ah, indeed there is. We can do something like:
gint drag_threshold;
g_object_get (gtk_widget_get_settings (widget),
"gtk-dnd-drag-threshold", &drag_threshold,
NULL);
on gtk2.
Assignee | ||
Comment 5•22 years ago
|
||
Use system setting for drag threshold on Win32 and gtk2; hardcode observed
threshold for Mac and gtk1.
Assignee | ||
Updated•22 years ago
|
Attachment #122233 -
Flags: superreview?(sfraser)
Attachment #122233 -
Flags: review?(blizzard)
Updated•22 years ago
|
Attachment #122233 -
Flags: superreview?(sfraser) → superreview+
Comment 6•22 years ago
|
||
Comment on attachment 122233 [details] [diff] [review]
patch
>+ gint threshold;
>+ g_object_get(gtk_widget_get_settings(box),
>+ "gtk-dnd-drag-threshold", &threshold,
>+ NULL);
Initialize threshold to zero in case that object_get() fails? Other than that,
r=blizzard.
Attachment #122233 -
Flags: review?(blizzard) → review+
Assignee | ||
Comment 7•22 years ago
|
||
Comment on attachment 122233 [details] [diff] [review]
patch
Can we get this in for 1.4b? It's a pretty low-risk fix that makes our behavior
more platform-native.
Attachment #122233 -
Flags: approval1.4b?
Comment 8•22 years ago
|
||
Comment on attachment 122233 [details] [diff] [review]
patch
a=sspitzer
I know that nsEventStateManager.cpp just loves to regress, but if bryner thinks
it is low risk, that's enough for me.
Attachment #122233 -
Flags: approval1.4b? → approval1.4b+
Assignee | ||
Comment 9•22 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•