Last Comment Bug 751429 - Drag action is not changed on pressing Ctrl, until the mouse is moved
: Drag action is not changed on pressing Ctrl, until the mouse is moved
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Widget: Gtk (show other bugs)
: Other Branch
: x86_64 Linux
: -- normal (vote)
: mozilla15
Assigned To: Karl Tomlinson (ni?:karlt)
:
Mentors:
Depends on: 750061
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-02 17:17 PDT by Karl Tomlinson (ni?:karlt)
Modified: 2012-05-04 10:42 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
handle modifier changes in periodic synthetic mouse events for drag sources (9.80 KB, patch)
2012-05-02 22:13 PDT, Karl Tomlinson (ni?:karlt)
roc: review+
Details | Diff | Review

Description Karl Tomlinson (ni?:karlt) 2012-05-02 17:17:11 PDT
STR:
1. Type some text in a text area or input.
2. Select a portion of the text.
3. Drag the text to a destination within the same window (but don't drop).
4. Press Control.
5. Drop text.

Expected results:
After 4: Cursor changes to show a plus.
After 5: Text is copied.

Actual results:
After 4: Nothing.
After 5: Text is moved.

If the pointer is moved between 4 and 5, the drag action changes as expected.
Comment 1 Karl Tomlinson (ni?:karlt) 2012-05-02 21:56:15 PDT
Part of the issue here is that GTK is not getting keyboard events because its grab widget is not in the window group of the focus window.  (See bug 750061 comment 10 ff.)
Comment 2 Karl Tomlinson (ni?:karlt) 2012-05-02 22:13:55 PDT
Created attachment 620585 [details] [diff] [review]
handle modifier changes in periodic synthetic mouse events for drag sources

With the patch in bug 750061, the grab widget gets keyboard events and we just need to update our periodic motion event code to deal with them.
Comment 3 Karl Tomlinson (ni?:karlt) 2012-05-03 18:56:57 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/3f9893107926
Comment 4 Ed Morley [:emorley] 2012-05-04 10:42:29 PDT
https://hg.mozilla.org/mozilla-central/rev/3f9893107926

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