Closed
Bug 418359
Opened 16 years ago
Closed 16 years ago
Start drag of background tabs with one click
Categories
(Camino Graveyard :: Tabbed Browsing, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: Jeff.Dlouhy, Assigned: stuart.morgan+bugzilla)
References
Details
Attachments
(1 file, 1 obsolete file)
12.08 KB,
patch
|
murph
:
review+
mikepinkerton
:
superreview+
|
Details | Diff | Splinter Review |
Moved from bug 160720 comment #62: We only begin a drag if the tab button is the active tab. Dragging tabs does not feel as natural this way - if I decide to move a background one I have to first select it, release the mouse, then click again and start dragging. I think a better approach would be to active the tab immediately and begin a drag all under the same mouseDown: event.
Flags: camino2.0b1?
Blocking b1, per the meeting; Sean should have a patch for it soon.
Flags: camino2.0b1? → camino2.0b1+
Comment 3•16 years ago
|
||
When a background TabButtonView is clicked on and dragged, we are not receiving any mouseDragged: events on either the button itself or the BrowserTabBarView. The reason for this is because the TabButtonView that first received the event is removed from the view hierarchy when the tab bar is rebuilt (which needs to be done on selection change). It seems that, when the view that first received the |mouseDown:| event is removed from the view hierarchy, AppKit will not follow with any further |mouseDragged:| events. I created a test project to exclude any other factors, such as Gecko issues, and can reproduce this assumption. As sort of a workaround, the only way I can think of us solving this is to simulate another mouseDown: event after the bar is rebuilt, which will allow the |mouseDragged:| events to be processed. I put some checks in to make sure we do not simulate that event during any other situation, and I could not find any negative side-effects from doing it. Hopefully it's a suitable approach :).
Attachment #351473 -
Flags: review?(stuart.morgan+bugzilla)
Assignee | ||
Updated•16 years ago
|
Attachment #351473 -
Flags: review?(stuart.morgan+bugzilla) → review-
Assignee | ||
Comment 4•16 years ago
|
||
Comment on attachment 351473 [details] [diff] [review] Patch Good find on the cause here! I'm not wild about the idea of hacking around this though; alternate approach coming in a second.
Assignee | ||
Comment 5•16 years ago
|
||
When we are doing nothing but changing the selection (which is, as it turns out, always the case when one is starting a drag), there's no need to tear out and re-add the views--we've just never had any real reason not to before. This is more plumbing, but the the effect is minor: we just do somewhat less work in the simple case, and the same thing we've always done the rest of the time.
Attachment #351473 -
Attachment is obsolete: true
Attachment #351700 -
Flags: review?(murph)
Comment 6•16 years ago
|
||
Comment on attachment 351700 [details] [diff] [review] don't mess with the views Thanks for stepping in Stuart with the alternate approach. I do not see any issues at all, everything looks great to me. r=murph.
Attachment #351700 -
Flags: superreview?(mikepinkerton)
Attachment #351700 -
Flags: review?(murph)
Attachment #351700 -
Flags: review+
Comment 7•16 years ago
|
||
+typedef enum { + kTabRebuildForSelectionChange, + kTabRebuildForStructureChange +} ETabRebuildReason; in c++, i don't think you need the |typedef| keyword. sr=pink
Comment 8•16 years ago
|
||
Comment on attachment 351700 [details] [diff] [review] don't mess with the views sr=pink
Attachment #351700 -
Flags: superreview?(mikepinkerton) → superreview+
Assignee: murph → stuart.morgan+bugzilla
Landed on cvs trunk for Stuart with enum ETabRebuildReason { kTabRebuildForSelectionChange, kTabRebuildForStructureChange }; I think we can freeze for b1 now!
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•