drag and drop of message drags the whole outliner image

VERIFIED FIXED in mozilla0.9.1

Status

SeaMonkey
MailNews: Message Display
P2
normal
VERIFIED FIXED
17 years ago
13 years ago

People

(Reporter: (not reading, please use seth@sspitzer.org instead), Assigned: Jean-Francois Ducarroz)

Tracking

Trunk
mozilla0.9.1
PowerPC
Mac System 8.6

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta1+])

Attachments

(2 attachments)

ducarroz found this out, and pinkerton explained to me why this was the case.

something about getting the image from the frame, and in this case the frame
contains the whole outliner body.

pinkerton, can you clarify, and repeat your suggestion on how to fix this?
when you call nsIDragService::InvokeDragSession, there is a parameter that is an 
array of regions. This list of regions forms the structure dragged by the cursor. 
Instead of passing null, pass the rectangles of what is selected.

I also need to turn off the translucent dragging stuff for now. It just causes 
more problems than it's worth.
(Assignee)

Comment 2

17 years ago
Scott, Seth, do you know how I can retreive the rectangle from the ouliner widget?

Comment 3

17 years ago
nope...maybe dave knows.

Updated

17 years ago
Keywords: nsbeta1

Updated

17 years ago
QA Contact: esther → sheelar

Comment 4

17 years ago
marking nsbeta1+
Priority: -- → P2
Whiteboard: [nsbeta1+]

Updated

17 years ago
Target Milestone: --- → mozilla0.9.1

Comment 5

17 years ago
It sounds like this is probably going to be a fix needed in the outliner.  Who
is the right person to assign this to?  If it's a mailnews bug then feel free to
correct me.
this has nothing to do with the outliner. there is a param to InvokeDragSession() 
that everyone (incorrectly) passes null to that lists an array of rectangles. if 
this list is null, we cheat and use the frame. the bug is on the client side, not 
outliner.

Comment 7

17 years ago
How do we get this list of rectangles?  I don't know if the d&d code changed,
but I don't think this bug existed when we weren't using the outliner.  What is
different?
what is different is that outliner now uses 1 frame, where as before each cell of 
the tree widget was a frame. 

you get the rectangles from outliner itself, by iterating over the selection and 
asking outliner for the rectangles of the needed rows.
(Assignee)

Comment 9

17 years ago
the problem here is to retreive the rectangle to drag...Whe we have figure out 
that, should be very easy to fix it!
(Assignee)

Comment 10

17 years ago
pink, I did the following test:

var region =
Components.classesByID["{da5b130a-1dd1-11b2-ad47-f455b1814a78}"].createInstance(Components.interfaces.nsIScriptableRegion);
    region.Init();
    region.SetToRect(10, 20, 30, 50);
    dump("region=" + region + "\n");

...

    var nsIDragService = Components.interfaces.nsIDragService;
    dragService.invokeDragSession ( event.target, transArray, region,
nsIDragService.DRAGDROP_ACTION_COPY +
    nsIDragService.DRAGDROP_ACTION_MOVE );

and, despite I pass a valid region, we still drag the whole outliner frame??

BTW, I still don't know how to retreive the rects from the outliner!

Comment 11

17 years ago
Note that this applies even when the mousedown isn't on a message -- you can 
drag the thread pane of an empty folder. Is that a separate bug?
Hardware: PC → Macintosh
Summary: drag and drop of message causes us to drag an the whole outliner image → drag and drop of message drags the whole outliner image

Updated

17 years ago
Depends on: 74831
ok, that should have at least given a smaller rectangle...i'll try looking into 
it when i get a free second (heh).

regarding getting the rects, ben has hiding in his tree (for months) an api to 
get the appropriate rectangles of a row, but it's been beta1-'d or something. i 
forget the exact bug, but it's already marked as a blocker. check his buglist and 
make some noise.
(Assignee)

Comment 13

17 years ago
Thanks for looking at it...
74831 has landed to the point where it's good enough to start using.
No longer depends on: 74831
i have a fix to nsIScriptableRegion and to the mac drag service to make this work 
with the hacked region.

durcarroz, you need to make your calls to nsIScriptableRegion lowercase (eg, 
init(), setRect(), etc) as I changed the IDL while i was in there.

filed 80196 for my changes.
Depends on: 80196
(Assignee)

Comment 16

17 years ago
much better this time, I can drag my test rectangle. Now I still need to extract
the right one...
(Assignee)

Updated

17 years ago
Status: NEW → ASSIGNED
Whiteboard: [nsbeta1+] → [nsbeta1+] Have fix
(Assignee)

Comment 17

17 years ago
Created attachment 34702 [details] [diff] [review]
Proposed fix, v1
(Assignee)

Comment 18

17 years ago
Created attachment 35080 [details] [diff] [review]
proposed fix, v2. No more hardcoded 20 pixels :-)

Comment 19

17 years ago
r=varada
I was going to ask:  please use the prog id ("@mozilla.org/gfx/region;1")
instead of the CID.  

but then looking at nsGfxFactoryWin.cpp and nsGfxFactoryMac.cpp, that wouldn't
work. not all the Gfx factories (for all the various toolkits) are generic
modules.  can you log a byg on switching from CID to progid in messengerdnd.js?
we'll make it blocked by bugs to switch the factories to use generic modules.

sr=sspitzer
(Assignee)

Comment 21

17 years ago
Fixed and checked in
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Whiteboard: [nsbeta1+] Have fix → [nsbeta1+]

Comment 22

17 years ago
Mac only bug
verified 2001052112 buildid Mac G4 9.0.4. This problem is now fixed.
Status: RESOLVED → VERIFIED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.