~canonical-dx-team/unity/unity.fix-ql-losing-focus

« back to all changes in this revision

Viewing changes to src/QuicklistView.cpp

  • Committer: Jay Taoko
  • Date: 2011-02-27 08:18:45 UTC
  • mto: (894.1.8 dash-fixes-2011-02-28)
  • mto: This revision was merged to the branch mainline in revision 895.
  • Revision ID: jay.taoko@canonical.com-20110227081845-b1dm4nzyvh3kbf7w
* Dash Fixes:
    - Quicklist closes
    - Dash scrolling does not stop when mouse goes out of the BaseWindow.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
  OnMouseMove.connect (sigc::mem_fun (this, &QuicklistView::RecvMouseMove));
96
96
  OnMouseDrag.connect (sigc::mem_fun (this, &QuicklistView::RecvMouseDrag));
97
97
  OnKeyPressed.connect (sigc::mem_fun (this, &QuicklistView::RecvKeyPressed));
 
98
  OnStartFocus.connect (sigc::mem_fun (this, &QuicklistView::RecvStartFocus));
 
99
  OnEndFocus.connect   (sigc::mem_fun (this, &QuicklistView::RecvEndFocus));
98
100
 
99
101
  _mouse_down = false;
100
102
  _enable_quicklist_for_testing = false;
104
106
}
105
107
 
106
108
void
 
109
QuicklistView::RecvStartFocus ()
 
110
{
 
111
  PushToFront ();
 
112
}
 
113
 
 
114
void
 
115
QuicklistView::RecvEndFocus ()
 
116
{
 
117
}
 
118
 
 
119
void
107
120
QuicklistView::RecvKeyPressed (unsigned int  key_sym,
108
121
                               unsigned long key_code,
109
122
                               unsigned long key_state)
263
276
  {
264
277
    // FIXME: ShowWindow shouldn't need to be called first
265
278
    ShowWindow (true);
266
 
    EnableInputWindow (true, "quicklist", true, false);
267
 
    SetInputFocus ();
 
279
    PushToFront ();
 
280
    EnableInputWindow (true, "quicklist", false, true);
 
281
    //SetInputFocus ();
268
282
    GrabPointer ();
269
 
    NeedRedraw ();
270
 
 
 
283
    GrabKeyboard ();
 
284
    QueueDraw ();
271
285
    _compute_blur_bkg = true;
272
286
  }
273
287
}