Changeset View
Changeset View
Standalone View
Standalone View
main_x11.cpp
Show First 20 Lines • Show All 334 Lines • ▼ Show 20 Line(s) | 334 | sprintf(cmd, "%s --crashes %d &", | |||
---|---|---|---|---|---|
335 | QFile::encodeName(QCoreApplication::applicationFilePath()).constData(), crashes); | 335 | QFile::encodeName(QCoreApplication::applicationFilePath()).constData(), crashes); | ||
336 | 336 | | |||
337 | sleep(1); | 337 | sleep(1); | ||
338 | system(cmd); | 338 | system(cmd); | ||
339 | } | 339 | } | ||
340 | 340 | | |||
341 | } // namespace | 341 | } // namespace | ||
342 | 342 | | |||
343 | extern "C" | 343 | int main(int argc, char * argv[]) | ||
344 | KWIN_EXPORT int kdemain(int argc, char * argv[]) | | |||
345 | { | 344 | { | ||
346 | KWin::Application::setupMalloc(); | 345 | KWin::Application::setupMalloc(); | ||
347 | KWin::Application::setupLocalizedString(); | 346 | KWin::Application::setupLocalizedString(); | ||
348 | 347 | | |||
349 | int primaryScreen = 0; | 348 | int primaryScreen = 0; | ||
350 | xcb_connection_t *c = xcb_connect(nullptr, &primaryScreen); | 349 | xcb_connection_t *c = xcb_connect(nullptr, &primaryScreen); | ||
351 | if (!c || xcb_connection_has_error(c)) { | 350 | if (!c || xcb_connection_has_error(c)) { | ||
352 | fprintf(stderr, "%s: FATAL ERROR while trying to open display %s\n", | 351 | fprintf(stderr, "%s: FATAL ERROR while trying to open display %s\n", | ||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |