Disable redraw optimization

WTSupported in traditional Synergy on Windows




The OPTIMIZE_REDRAW environment variable disables the Synergy runtime’s optimization of screen redraw and causes all repainting to occur immediately.




The Synergy runtime on Windows attempts to minimize the repainting of windows by occasionally turning updates off. Updates are automatically resumed when a W_UPDT subroutine (or its implied equivalent) or any operation that causes physical window updates to occur (such as field input, menu processing, and so forth) is processed. However, some applications have experienced undesirable display effects while updates are off. Especially if updates remain off for an extended period of time, other windows on the desktop may “show through” the Synergy application.

To disable the optimization of redraw, set OPTIMIZE_REDRAW in the environment prior to starting dbr.exe, or put it in synergy.ini. Currently, we only look for a value of 0, and if that is found, we disable repainting optimization. All other values for this variable currently have the same behavior as not setting the variable and cause normal redraw optimization to occur. However, we recommend that you only use a value of 0 or leave the variable unset, so that we may reserve other values for other possible operational behaviors in the future.

Setting OPTIMIZE_REDRAW may cause excessive repainting to occur in the application, but it may also solve other display anomalies. We recommend that you do not use this setting unless you need it to cure known display problems. If OPTIMIZE_REDRAW is set, XCALL U_UPDATE(FALSE) (to explicitly turn updates off) has no effect.

If the container is not moved, only the container and contained windows are updated. However, if the container is moved or resized, the whole desk top is repainted when updates are turned back on. This is a Microsoft Windows limitation.

Setting location

The environment or in the [synergy], [dbr], or [myprog] section of synergy.ini (where myprog is any .dbr file).

Used by