diff options
| author | Brandon Schaefer <brandon.schaefer@canonical.com> | 2012-08-24 20:17:58 -0700 |
|---|---|---|
| committer | Brandon Schaefer <brandon.schaefer@canonical.com> | 2012-08-24 20:17:58 -0700 |
| commit | e4a112092ede872b41a2fb9e8a3c13a52979fab6 (patch) | |
| tree | 8218fa38d5c245cc3c5dd4c3314f72d3e9311f41 /dash | |
| parent | 5a46666d512d9bed481593564123cb6909046604 (diff) | |
* The Launcher was stealing X focus from the Dash when it opened.
* Now the dash has the correct focus, so XIM works. (bzr r2624.1.1)
Diffstat (limited to 'dash')
| -rw-r--r-- | dash/DashController.cpp | 16 | ||||
| -rw-r--r-- | dash/DashController.h | 1 |
2 files changed, 12 insertions, 5 deletions
diff --git a/dash/DashController.cpp b/dash/DashController.cpp index 4d9085c7e..008e76ba4 100644 --- a/dash/DashController.cpp +++ b/dash/DashController.cpp @@ -122,7 +122,7 @@ void Controller::RegisterUBusInterests() sigc::mem_fun(this, &Controller::OnActivateRequest)); ubus_manager_.RegisterInterest(UBUS_DASH_ABOUT_TO_SHOW, [&] (GVariant*) { EnsureDash(); }); - ubus_manager_.RegisterInterest(UBUS_OVERLAY_SHOWN, [&] (GVariant *data) + ubus_manager_.RegisterInterest(UBUS_OVERLAY_SHOWN, [&] (GVariant *data) { unity::glib::String overlay_identity; gboolean can_maximise = FALSE; @@ -258,6 +258,16 @@ void Controller::ShowDash() need_show_ = true; return; } + + // The launcher must receive UBUS_OVERLAY_SHOW before window_->EnableInputWindow(). + // Other wise the Launcher gets focus for X, which causes XIM to fail. + sources_.AddIdle([this] { + monitor_ = GetIdealMonitor(); + GVariant* info = g_variant_new(UBUS_OVERLAY_FORMAT_STRING, "dash", TRUE, monitor_); + ubus_manager_.SendMessage(UBUS_OVERLAY_SHOWN, info); + return false; + }); + view_->AboutToShow(); window_->ShowWindow(true); @@ -274,10 +284,6 @@ void Controller::ShowDash() visible_ = true; StartShowHideTimeline(); - - monitor_ = GetIdealMonitor(); - GVariant* info = g_variant_new(UBUS_OVERLAY_FORMAT_STRING, "dash", TRUE, monitor_); - ubus_manager_.SendMessage(UBUS_OVERLAY_SHOWN, info); } void Controller::HideDash(bool restore) diff --git a/dash/DashController.h b/dash/DashController.h index df41ad1d3..a03745782 100644 --- a/dash/DashController.h +++ b/dash/DashController.h @@ -97,6 +97,7 @@ private: sigc::connection screen_ungrabbed_slot_; glib::SignalManager sig_manager_; glib::TimeoutSeconds ensure_timeout_; + glib::SourceManager sources_; Animator timeline_animator_; UBusManager ubus_manager_; }; |
