[Spice-devel] [PATCH 3/5] Don't use _singleton if we already have the right this pointer
Frediano Ziglio
fziglio at redhat.com
Fri Aug 12 11:02:07 UTC 2016
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
vdagent/vdagent.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp
index c67f30c..bbf0989 100644
--- a/vdagent/vdagent.cpp
+++ b/vdagent/vdagent.cpp
@@ -620,13 +620,12 @@ bool VDAgent::handle_mouse_event(VDAgentMouseState* state)
bool VDAgent::handle_mon_config(VDAgentMonitorsConfig* mon_config, uint32_t port)
{
- VDAgent* a = _singleton;
VDIChunk* reply_chunk;
VDAgentMessage* reply_msg;
VDAgentReply* reply;
size_t display_count;
- a->_updating_display_config = true;
+ _updating_display_config = true;
display_count = _desktop_layout->get_display_count();
for (uint32_t i = 0; i < display_count; i++) {
@@ -657,9 +656,9 @@ bool VDAgent::handle_mon_config(VDAgentMonitorsConfig* mon_config, uint32_t port
_desktop_layout->set_displays();
}
- a->_updating_display_config = false;
+ _updating_display_config = false;
/* refresh again, in case something else changed */
- a->_desktop_layout->get_displays();
+ _desktop_layout->get_displays();
DWORD msg_size = VD_MESSAGE_HEADER_SIZE + sizeof(VDAgentReply);
reply_chunk = new_chunk(msg_size);
--
2.7.4
More information about the Spice-devel
mailing list