fix redundant reflow on application start, might break on some x implementations
This commit is contained in:
parent
748bd60194
commit
7cd8169622
2 changed files with 8 additions and 1 deletions
|
@ -142,11 +142,17 @@ void Window::end_batch() {
|
||||||
m_invalidated_area = {0, 0, 0, 0};
|
m_invalidated_area = {0, 0, 0, 0};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Window::swallow_batches() {
|
||||||
|
m_batches = 0;
|
||||||
|
m_did_relayout_during_batch = false;
|
||||||
|
m_invalidated_area = {0, 0, 0, 0};
|
||||||
|
}
|
||||||
|
|
||||||
void Window::run(bool block) {
|
void Window::run(bool block) {
|
||||||
XEvent e;
|
XEvent e;
|
||||||
bool is_loop_batch_started = false;
|
bool is_loop_batch_started = false;
|
||||||
|
|
||||||
end_batch();
|
swallow_batches();
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (block || XPending(m_x_display))
|
if (block || XPending(m_x_display))
|
||||||
|
|
|
@ -22,6 +22,7 @@ public:
|
||||||
|
|
||||||
void start_batch();
|
void start_batch();
|
||||||
void end_batch();
|
void end_batch();
|
||||||
|
void swallow_batches();
|
||||||
|
|
||||||
|
|
||||||
Painter &painter() { return m_painter; }
|
Painter &painter() { return m_painter; }
|
||||||
|
|
Loading…
Reference in a new issue