diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2017-10-27 08:47:37 +0000 |
|---|---|---|
| committer | Tavmjong Bah <tavmjong@free.fr> | 2017-10-27 08:47:37 +0000 |
| commit | c8666174565f985a966c9e6ae292f54dda5377c3 (patch) | |
| tree | 32cc419774c68a7b6801e73aec44cc0169d4eac0 /src/desktop.cpp | |
| parent | Remove unused functions. (diff) | |
| download | inkscape-c8666174565f985a966c9e6ae292f54dda5377c3.tar.gz inkscape-c8666174565f985a966c9e6ae292f54dda5377c3.zip | |
Try to ensure that panels are created with the correct desktop.
Fixes bug #1720096. (Crash under Wayland in gdl code.)
Diffstat (limited to 'src/desktop.cpp')
| -rw-r--r-- | src/desktop.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/desktop.cpp b/src/desktop.cpp index c56c42267..d8f11a09c 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -1936,10 +1936,16 @@ SPDesktop::show_dialogs() mapVerbPreference.insert(std::make_pair ("ObjectsPanel", "/dialogs/objects") ); mapVerbPreference.insert(std::make_pair ("TagsPanel", "/dialogs/tags") ); + for (std::map<Glib::ustring, Glib::ustring>::const_iterator iter = mapVerbPreference.begin(); iter != mapVerbPreference.end(); ++iter) { Glib::ustring pref = iter->second; int visible = prefs->getInt(pref + "/visible", 0); if (visible) { + + // Try to ensure that the panel is created attached to the correct desktop (bug 1720096). + // There must be a better way of handling this problem! + INKSCAPE.activate_desktop(this); + _dlg_mgr->showDialog(iter->first.c_str(), false); // without grabbing focus, we need focus to remain on the canvas } } |
