///////////////////////////////////////////////////////
| 508 | |
| 509 | //////////////////////////////////////////////////////////// |
| 510 | WindowImplX11::WindowImplX11(WindowHandle handle) : m_isExternal(true) |
| 511 | { |
| 512 | using namespace WindowImplX11Impl; |
| 513 | |
| 514 | // Open a connection with the X server |
| 515 | m_display = openDisplay(); |
| 516 | |
| 517 | // Make sure to check for EWMH support before we do anything |
| 518 | ewmhSupported(); |
| 519 | |
| 520 | m_screen = DefaultScreen(m_display.get()); |
| 521 | |
| 522 | // Save the window handle |
| 523 | m_window = handle; |
| 524 | |
| 525 | if (m_window) |
| 526 | { |
| 527 | // Make sure the window is listening to all the required events |
| 528 | XSetWindowAttributes attributes; |
| 529 | attributes.event_mask = eventMask; |
| 530 | |
| 531 | XChangeWindowAttributes(m_display.get(), m_window, CWEventMask, &attributes); |
| 532 | |
| 533 | // Set the WM protocols |
| 534 | setProtocols(); |
| 535 | |
| 536 | // Do some common initializations |
| 537 | initialize(); |
| 538 | } |
| 539 | } |
| 540 | |
| 541 | |
| 542 | //////////////////////////////////////////////////////////// |
nothing calls this directly
no test coverage detected