~kelemeng/compiz-core/bug780505

« back to all changes in this revision

Viewing changes to src/action.cpp

  • Committer: Daniel van Vugt
  • Date: 2012-02-13 08:52:30 UTC
  • mfrom: (2996.1.1 altf4)
  • Revision ID: vanvugt@gmail.com-20120213085230-j890ctb1wj946ias
Fixed: Core keybindings like Alt+F4 not being registered due to bad
construct/init ordering (LP: #930412)

Moved CoreOptions initialization to ensure that it only happens after the
critical parts of PrivateScreen::init are done. This ensures ::screen and
PrivateScreen::dpy are both initialized before CoreOptions, so that
CompAction::KeyBinding::fromString no longer fails due to screen being NULL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include <stdio.h>
27
27
#include <stdlib.h>
28
28
#include <string.h>
 
29
#include <cassert>
29
30
 
30
31
#include <core/option.h>
31
32
#include <core/action.h>
158
159
    size_t       pos, start = 0;
159
160
    KeySym       keysym;
160
161
 
 
162
    /* This assertion is a regression test for LP: #930412 */
 
163
    assert (screen);
161
164
    if (!screen)
162
165
        return false;
163
166