Commit cf9d3943 authored by Joel Martin's avatar Joel Martin

rfb.js: add onFBResize event callback.

parent c67d032b
......@@ -163,6 +163,8 @@ Util.conf_defaults(conf, that, defaults, [
'onFBUReceive(rfb, fbu): RFB FBU received but not yet processed '],
['onFBUComplete', 'rw', 'func', function() { },
'onFBUComplete(rfb, fbu): RFB FBU received and processed '],
['onFBResize', 'rw', 'func', function() { },
'onFBResize(rfb, width, height): frame buffer resized'],
// These callback names are deprecated
['updateState', 'rw', 'func', function() { },
......@@ -878,6 +880,7 @@ init_msg = function() {
}
display.set_true_color(conf.true_color);
conf.onFBResize(that, fb_width, fb_height);
display.resize(fb_width, fb_height);
keyboard.grab();
mouse.grab();
......@@ -1577,6 +1580,7 @@ encHandlers.DesktopSize = function set_desktopsize() {
Util.Debug(">> set_desktopsize");
fb_width = FBU.width;
fb_height = FBU.height;
conf.onFBResize(that, fb_width, fb_height);
display.resize(fb_width, fb_height);
timing.fbu_rt_start = (new Date()).getTime();
// Send a new non-incremental request
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment