mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kwin: add new KWin::Compositor::starting() method and use it in during startup
I have a feeling even that will not be enough Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
16d6d9df9a
commit
2935698c0c
2 changed files with 20 additions and 1 deletions
|
@ -122,6 +122,14 @@ public:
|
||||||
static bool compositing() {
|
static bool compositing() {
|
||||||
return s_compositor != NULL && s_compositor->isActive();
|
return s_compositor != NULL && s_compositor->isActive();
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* @brief Static check to test whether the Compositor is still starting.
|
||||||
|
*
|
||||||
|
* @return bool @c true if there is a Compositor and it is still starting, @c false otherwise
|
||||||
|
**/
|
||||||
|
static bool starting() {
|
||||||
|
return s_compositor != NULL && s_compositor->m_starting;
|
||||||
|
}
|
||||||
|
|
||||||
// for delayed supportproperty management of effects
|
// for delayed supportproperty management of effects
|
||||||
void keepSupportProperty(xcb_atom_t atom);
|
void keepSupportProperty(xcb_atom_t atom);
|
||||||
|
|
|
@ -60,6 +60,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
|
#include "composite.h"
|
||||||
#include "xcbutils.h"
|
#include "xcbutils.h"
|
||||||
|
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
|
@ -488,7 +489,17 @@ int main(int argc, char * argv[])
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.processEvents(); // trigger any events before resuming such as compositor setup
|
// wait for the workspace initialization to complete before resuming
|
||||||
|
while (KWin::Workspace::self() && KWin::Workspace::self()->initializing()) {
|
||||||
|
a.processEvents();
|
||||||
|
}
|
||||||
|
// and the compositor
|
||||||
|
while (KWin::Compositor::starting()) {
|
||||||
|
a.processEvents();
|
||||||
|
}
|
||||||
|
// and one more iteration just in case
|
||||||
|
a.processEvents();
|
||||||
|
|
||||||
ksmserver.resumeStartup("kwin");
|
ksmserver.resumeStartup("kwin");
|
||||||
KWin::SessionManager weAreIndeed;
|
KWin::SessionManager weAreIndeed;
|
||||||
KWin::SessionSaveDoneHelper helper;
|
KWin::SessionSaveDoneHelper helper;
|
||||||
|
|
Loading…
Add table
Reference in a new issue