summaryrefslogtreecommitdiff
path: root/vdagent
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-03-16 00:55:15 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2013-03-16 00:55:15 +0100
commit67c1bcf49367d1726033b298a8ab016b4e22cf23 (patch)
tree5f070b44040deb3386d2f90576c6dee436a4c493 /vdagent
parentda07ced71c864992a5806524f010fd8c2fb8c835 (diff)
Refresh monitor config only when needed
Somehow wnd_proc()->get_display() may be reentered during ChangeDisplaySettings
Diffstat (limited to 'vdagent')
-rw-r--r--vdagent/vdagent.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp
index 6f2a49c..c56025d 100644
--- a/vdagent/vdagent.cpp
+++ b/vdagent/vdagent.cpp
@@ -579,6 +579,7 @@ bool VDAgent::handle_mon_config(VDAgentMonitorsConfig* mon_config, uint32_t port
VDAgentReply* reply;
size_t display_count;
+ _desktop_layout->get_displays();
display_count = _desktop_layout->get_display_count();
for (uint32_t i = 0; i < display_count; i++) {
DisplayMode* mode = _desktop_layout->get_display(i);
@@ -1327,7 +1328,6 @@ LRESULT CALLBACK VDAgent::wnd_proc(HWND hwnd, UINT message, WPARAM wparam, LPARA
switch (message) {
case WM_DISPLAYCHANGE:
vd_printf("Display change");
- a->_desktop_layout->get_displays();
break;
case WM_TIMER:
a->send_input();