Repository: incubator-guacamole-server
Updated Branches:
  refs/heads/master 701268271 -> 075c77043


GUACAMOLE-187: Do not perform surface resize unless the new size is actually 
different.


Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/commit/f3534114
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/tree/f3534114
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/diff/f3534114

Branch: refs/heads/master
Commit: f353411460fb561198d7cc1fb589584fbceb9f34
Parents: ea6b094
Author: Michael Jumper <[email protected]>
Authored: Fri Sep 23 15:43:35 2016 -0700
Committer: Michael Jumper <[email protected]>
Committed: Fri Jan 27 16:44:24 2017 -0800

----------------------------------------------------------------------
 src/common/surface.c | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-guacamole-server/blob/f3534114/src/common/surface.c
----------------------------------------------------------------------
diff --git a/src/common/surface.c b/src/common/surface.c
index a4fd4c6..c5cee00 100644
--- a/src/common/surface.c
+++ b/src/common/surface.c
@@ -1104,6 +1104,10 @@ void guac_common_surface_resize(guac_common_surface* 
surface, int w, int h) {
 
     pthread_mutex_lock(&surface->_lock);
 
+    /* Ignore if resize will have no effect */
+    if (w == surface->width && h == surface->height)
+        goto complete;
+
     guac_socket* socket = surface->socket;
     const guac_layer* layer = surface->layer;
 
@@ -1153,6 +1157,7 @@ void guac_common_surface_resize(guac_common_surface* 
surface, int w, int h) {
     if (surface->realized)
         guac_protocol_send_size(socket, layer, w, h);
 
+complete:
     pthread_mutex_unlock(&surface->_lock);
 
 }

Reply via email to