src/components/screen.cpp
/**
 * Handle XCB_RANDR_SCREEN_CHANGE_NOTIFY events
 *
 * If any of the monitors have changed we trigger a reload
 */
Handle XCB_RANDR_SCREEN_CHANGE_NOTIFY events
If any of the monitors have changed we trigger a reload
Handle XCB_RANDR_SCREEN_CHANGE_NOTIFY events If any of the monitors have changed we trigger a reload
void screen::handle(const evt::randr_screen_change_notify& evt) {
  if (m_sigraised || evt->request_window != m_proxy) {
    return;
  }
  auto screen = m_connection.screen(true);
  auto changed = false;
  if (screen->width_in_pixels != m_size.w || screen->height_in_pixels != m_size.h) {
    changed = true;
  } else {
    changed = have_monitors_changed();
  }
  if (changed) {
    m_log.notice("randr_screen_change_notify (%ux%u)... reloading", evt->width, evt->height);
    m_sig.emit(exit_reload{});
    m_sigraised = true;
  }
}
void screen :: handle ( const evt :: randr_screen_change_notify & evt ) { if ( m_sigraised || evt -> request_window != m_proxy ) { return ; } auto screen = m_connection . screen ( true ) ; auto changed = false ; if ( screen -> width_in_pixels != m_size . w || screen -> height_in_pixels != m_size . h ) { changed = true ; } else { changed = have_monitors_changed ( ) ; } if ( changed ) { m_log . notice ( " " , evt -> width , evt -> height ) ; m_sig . emit ( exit_reload { } ) ; m_sigraised = true ; } }
Handle XCB_RANDR_SCREEN_CHANGE_NOTIFY events
 If any of the monitors have changed we trigger a reload
Handle XCB_RANDR_SCREEN_CHANGE_NOTIFY events If any of the monitors have changed we trigger a reload
// We need to reload if the screen size changed as well