fix CM reselection
only return early if we cannot create a selectionwatcher, otherwise the claiming code turns unreachable after the creation of cm_selection BUG: 347813 REVIEW: 123826
This commit is contained in:
parent
87a3d01a75
commit
e6176ffc02
1 changed files with 4 additions and 3 deletions
|
@ -289,10 +289,11 @@ void Compositor::claimCompositorSelection()
|
||||||
sprintf(selection_name, "_NET_WM_CM_S%d", Application::x11ScreenNumber());
|
sprintf(selection_name, "_NET_WM_CM_S%d", Application::x11ScreenNumber());
|
||||||
cm_selection = new CompositorSelectionOwner(selection_name);
|
cm_selection = new CompositorSelectionOwner(selection_name);
|
||||||
connect(cm_selection, SIGNAL(lostOwnership()), SLOT(finish()));
|
connect(cm_selection, SIGNAL(lostOwnership()), SLOT(finish()));
|
||||||
} else {
|
|
||||||
// no X11 yet
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!cm_selection) // no X11 yet
|
||||||
|
return;
|
||||||
|
|
||||||
if (!cm_selection->owning) {
|
if (!cm_selection->owning) {
|
||||||
cm_selection->claim(true); // force claiming
|
cm_selection->claim(true); // force claiming
|
||||||
cm_selection->owning = true;
|
cm_selection->owning = true;
|
||||||
|
|
Loading…
Reference in a new issue