fetch motif hints when get them for managed client

notably *after* storing the old values.
Otherwise the old value is polluted because of
m_hints being nullptr, thus a default value is
returned (instead of the actual old value)

BUG: 347818
FIXED-IN: 5.4.2
REVIEW: 125007
This commit is contained in:
Thomas Lübking 2015-08-31 22:25:48 +02:00
parent 57f8c6d5f8
commit cc6886d7dd
2 changed files with 2 additions and 1 deletions

View file

@ -1710,6 +1710,8 @@ void Client::getMotifHints()
{ {
const bool wasClosable = m_motif.close(); const bool wasClosable = m_motif.close();
const bool wasNoBorder = m_motif.noBorder(); const bool wasNoBorder = m_motif.noBorder();
if (m_managed) // only on property change, initial read is prefetched
m_motif.fetch();
m_motif.read(); m_motif.read();
if (m_motif.hasDecoration() && m_motif.noBorder() != wasNoBorder) { if (m_motif.hasDecoration() && m_motif.noBorder() != wasNoBorder) {
// If we just got a hint telling us to hide decorations, we do so. // If we just got a hint telling us to hide decorations, we do so.

View file

@ -909,7 +909,6 @@ void Client::propertyNotifyEvent(xcb_property_notify_event_t *e)
break; break;
default: default:
if (e->atom == atoms->motif_wm_hints) { if (e->atom == atoms->motif_wm_hints) {
m_motif.fetch();
getMotifHints(); getMotifHints();
} else if (e->atom == atoms->net_wm_sync_request_counter) } else if (e->atom == atoms->net_wm_sync_request_counter)
getSyncCounter(); getSyncCounter();