Hello community, here is the log from the commit of package xpra for openSUSE:Leap:15.2 checked in at 2020-04-17 13:37:54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/xpra (Old) and /work/SRC/openSUSE:Leap:15.2/.xpra.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xpra" Fri Apr 17 13:37:54 2020 rev:3 rq:794279 version:3.0.9 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/xpra/xpra.changes 2020-04-05 17:07:38.654250052 +0200 +++ /work/SRC/openSUSE:Leap:15.2/.xpra.new.2738/xpra.changes 2020-04-17 13:38:18.576254466 +0200 @@ -1,0 +2,52 @@ +Tue Apr 14 16:14:15 UTC 2020 - Luigi Baldoni <aloi...@gmx.com> + +- Update to version 3.0.9 + * fix HTML5 client XSS + * fix focus issues + * fix server hangs and unpainted windows due to invalid + dimensions + * fix window icons and cursors visual corruption or crashes + * fix unbearably slow screen updates when vrefresh value is + invalid + * fix client OpenGL crashes with remote starts (run probe + first) + * fix keypad regression (AltGr changes, again) + * fix MS Windows shadow servers + * fix race condition collecting latency data for session info + * fix missing pycuda dependency for nvenc on MS Windows + * fix missing signatures on MS Windows EXE and MSI builds + * fix scoring of NVENC codec (should be used ahead of sofware + encoders) + * fix start menu updates getting lost + * fix OpenGL diagnostic messages getting cut off + * fix change of encoding from the system tray + * fix quality and speed changes from the system tray + * fix clipboard and popup menu problems with Eclipse + * fix name of shadow server process on MS Windows, used in log + file names + * fix audio query subprocess with MS shadow servers + * fix unlikely race condition in speaker forwarding shutdown + sequence + * fix desktop-fullscreen=yes automatic scaling + * fix missing bug report data due to uninitialized X11 bindings + * fix bug report error if we cannot grab a screenshot (ie: + Wayland) + * fix error saving binary data with python3 builds of the bug + report tool + * fix errors querying the display under Wayland + * hide scary stacktraces when shutting down ssh proxy commands + * if we have an ssh password we can use, try that first + * blacklist VirtualBox's SVGA3D OpenGL driver (fixes black + windows) + * don't use webp with image dimensions beyond its limits + * use regular X11 system tray with i3 + * hide confusing named-pipe prefix in empty output on MS + Windows + * HTML5 fixes: invalid IMG tag, reserved keyword, language + detection, draw debugging, etc + * don't try to read /proc if not on Posix + * use a more specific python3 interpreter version + * update application content-type mappings + * remove out of date information from man page + +------------------------------------------------------------------- Old: ---- xpra-3.0.8.tar.xz New: ---- xpra-3.0.9.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xpra.spec ++++++ --- /var/tmp/diff_new_pack.S8vOR9/_old 2020-04-17 13:38:19.004254788 +0200 +++ /var/tmp/diff_new_pack.S8vOR9/_new 2020-04-17 13:38:19.004254788 +0200 @@ -19,7 +19,7 @@ %global __requires_exclude ^typelib\\(GtkosxApplication\\)|typelib\\(GdkGLExt\\)|typelib\\(GtkGLExt\\).*$ Name: xpra -Version: 3.0.8 +Version: 3.0.9 Release: 0 Summary: Remote display server for applications and desktops License: GPL-2.0-or-later AND BSD-3-Clause AND LGPL-3.0-or-later AND MIT ++++++ xpra-3.0.8.tar.xz -> xpra-3.0.9.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/NEWS new/xpra-3.0.9/NEWS --- old/xpra-3.0.8/NEWS 2020-03-31 13:39:15.000000000 +0200 +++ new/xpra-3.0.9/NEWS 2020-04-14 16:02:35.000000000 +0200 @@ -1,3 +1,45 @@ +v3.0.9 (2020-04-14) +====================== + -- fix HTML5 client XSS + -- fix focus issues + -- fix server hangs and unpainted windows due to invalid dimensions + -- fix window icons and cursors visual corruption or crashes + -- fix unbearably slow screen updates when vrefresh value is invalid + -- fix client OpenGL crashes with remote starts (run probe first) + -- fix keypad regression (AltGr changes, again) + -- fix MS Windows shadow servers + -- fix race condition collecting latency data for session info + -- fix missing pycuda dependency for nvenc on MS Windows + -- fix missing signatures on MS Windows EXE and MSI builds + -- fix scoring of NVENC codec (should be used ahead of sofware encoders) + -- fix start menu updates getting lost + -- fix OpenGL diagnostic messages getting cut off + -- fix change of encoding from the system tray + -- fix quality and speed changes from the system tray + -- fix clipboard and popup menu problems with Eclipse + -- fix name of shadow server process on MS Windows, used in log file names + -- fix audio query subprocess with MS shadow servers + -- fix unlikely race condition in speaker forwarding shutdown sequence + -- fix desktop-fullscreen=yes automatic scaling + -- fix missing bug report data due to uninitialized X11 bindings + -- fix bug report error if we cannot grab a screenshot (ie: Wayland) + -- fix error saving binary data with python3 builds of the bug report tool + -- fix errors querying the display under Wayland + -- hide scary stacktraces when shutting down ssh proxy commands + -- if we have an ssh password we can use, try that first + -- blacklist VirtualBox's SVGA3D OpenGL driver (fixes black windows) + -- don't use webp with image dimensions beyond its limits + -- use regular X11 system tray with i3 + -- hide confusing named-pipe prefix in empty output on MS Windows + -- HTML5 fixes: invalid IMG tag, reserved keyword, language detection, draw debugging, etc + -- don't try to read /proc if not on Posix + -- support more versions of Visual Studio when compiling CUDA kernels + -- use a more specific python3 interpreter version + -- update application content-type mappings + -- remove out of date information from man page + -- MacOS: openssl 1.1.1f + + v3.0.8 (2020-03-31) ====================== -- fix handling of dpi command line switch (correctly this time?) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/content-type/30_title.conf new/xpra-3.0.9/content-type/30_title.conf --- old/xpra-3.0.8/content-type/30_title.conf 2019-09-24 15:53:53.000000000 +0200 +++ new/xpra-3.0.9/content-type/30_title.conf 2020-04-03 12:05:46.000000000 +0200 @@ -21,3 +21,8 @@ title:glxgears=video title:GLX Spheres=video +title:IcedTea-Web Control Panel=text +title:Java Monitoring & Management Console=text + +title:Python .* Shell=text +title:NetBeans IDE=text diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/content-type/50_class.conf new/xpra-3.0.9/content-type/50_class.conf --- old/xpra-3.0.8/content-type/50_class.conf 2020-03-08 03:21:09.000000000 +0100 +++ new/xpra-3.0.9/content-type/50_class.conf 2020-04-03 12:05:47.000000000 +0200 @@ -3,26 +3,131 @@ # aka WM_CLASS class-instance:xterm=text -class-instance:terminal=text +class-instance:.*terminal.*=text + +class-instance:abiword=text +class-instance:avahi-discover=text +class-instance:baobab=picture +class-instance:bluetooth-sendto=text +class-instance:bssh=text +class-instance:bvnc=text +class-instance:camorama=video +class-instance:cheese=video +class-instance:chromium-browser=browser +class-instance:clipit=text +class-instance:dde-file-manager=text +class-instance:dde-desktop=picture +class-instance:deepin-movie=video +class-instance:deepin-music=text +class-instance:deepin-system-monitor=picture +class-instance:deepin-terminal=text +class-instance:dolphin=browser +class-instance:d-feet=text class-instance:Eclipse=text -class-instance:gedit=text -class-instance:Mail=text -class-instance:tkdiff=text -class-instance:xxdiff=text class-instance:emacs=text -class-instance:gvim=text - -class-instance:libreoffice=text -class-instance:vlc=video - -class-instance:VirtualBox Machine=picture - +class-instance:eog=picture +class-instance:evince.*=text +class-instance:evolution=text class-instance:Firefox=browser -class-instance:Thunderbird=browser +class-instance:file-roller=text +class-instance:gcm-picker=picture +class-instance:gcm-import=text +class-instance:gcm-viewer=text +class-instance:gedit=text +class-instance:gimp=picture +class-instance:git-gui=text +class-instance:gitk=text +class-instance:gkbd-keyboard-display=text +class-instance:gnome-about=text +class-instance:gnome-abrt=text +class-instance:gnome-boxes=browser +class-instance:gnome-calculator=text +class-instance:gnome-calendar=text +class-instance:gnome-clocks=text +class-instance:gnome-contacts=text +class-instance:gnome-disks=text +class-instance:gnome-disk-image-mounter=text +#gnome-control-center +#gnome-shell-extension-prefs +class-instance:gnome-font-viewer=picture +class-instance:gnome-logs=text +class-instance:gnome-screenshot=text +class-instance:gnome-shell-portal-helper=browser +class-instance:gnome-software=browser +class-instance:gnome-system-monitor=text +class-instance:gnome-terminal.*=text +class-instance:gnome-tweaks=text class-instance:google-chrome.*=browser -class-instance:chromium-browser=browser +class-instance:gpartedbin=text +class-instance:gst=text +class-instance:gtk3-demo.*=text +class-instance:gtk3-widget-factory=text +class-instance:gupnp-av-cp=text +class-instance:gupnp-universal-cp=text +class-instance:gvim=text +class-instance:ibus.*=text +class-instance:IBus Panel=picture +class-instance:ibus-ui-emojier=picture +class-instance:sun-tools-jconsole-JConsole=text +class-instance:sun-security-tools-policytool-PolicyTool=text +class-instance:libfm-pref-apps=text +class-instance:libreoffice.*=text +class-instance:LYNE.*=video +class-instance:Mail=text +class-instance:mate-terminal=text +class-instance:net-sourceforge-jnlp-security-policyeditor-PolicyEditor=text +class-instance:mousepad=text +class-instance:notepad.exe=text +class-instance:Mail=text +class-instance:mpv=video class-instance:Navigator=browser -class-instance:VirtualBox Manager=browser - +class-instance:nm-connection-editor=text +class-instance:Nsight=text +class-instance:nv-nsight-cu.bin=text +class-instance:nvidia-settings=picture +class-instance:NVIDIA Visual Profiler=text +class-instance:okular=text +class-instance:onboard.*=text +class-instance:org.inkscape.Inkscape=text +class-instance:org.gnome.Characters=picture +class-instance:org.gnome.Maps=picture +class-instance:org.gnome.meld=text +class-instance:org.gnome.Nautilus=picture +class-instance:org.gnome.Photos=browser +class-instance:org.gnome.Weather=picture +class-instance:pavucontrol=picture +class-instance:pcmanfm=browser +class-instance:projectM-pulseaudio=video +class-instance:qemu=browser +class-instance:setroubleshoot=text +class-instance:scribus=text +class-instance:simple-scan=picture +class-instance:Steam=browser +class-instance:system-config-printer=text +class-instance:tkdiff=text +class-instance:Thunderbird=browser +class-instance:totem=video +class-instance:transmission.*=text +class-instance:usbview.*=text +class-instance:VirtualBox Manager=text class-instance:VirtualBox Machine=picture -class-instance:gimp=picture \ No newline at end of file +class-instance:vlc=video +class-instance:vncviewer=picture +class-instance:wineboot.*=text +class-instance:wineconsole.*=text +class-instance:oleview.*=text +class-instance:winecfg.*=text +class-instance:regedit.*=text +class-instance:zenity=text +class-instance:winemine.*=picture +class-instance:winefile.*=text +class-instance:winhlp.*=text +class-instance:wordpad.*=text +class-instance:wireshark.*=text +class-instance:xfce4-terminal=text +class-instance:xxdiff=text +class-instance:xpra-sessions-gui=text +class-instance:xpra-toolbox=text +class-instance:xpra-gui=text +class-instance:xpra-launcher-gui=text +class-instance:yelp=text diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/cups/xpraforwarder new/xpra-3.0.9/cups/xpraforwarder --- old/xpra-3.0.8/cups/xpraforwarder 2020-03-21 14:16:55.000000000 +0100 +++ new/xpra-3.0.9/cups/xpraforwarder 2020-04-08 08:45:00.000000000 +0200 @@ -42,7 +42,7 @@ from urllib.parse import urlparse, parse_qs -__version__ = "3.0.8" +__version__ = "3.0.9" #Writes a syslog entry (msg) at the default facility: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/html5/connect.html new/xpra-3.0.9/html5/connect.html --- old/xpra-3.0.8/html5/connect.html 2020-03-13 17:51:18.000000000 +0100 +++ new/xpra-3.0.9/html5/connect.html 2020-04-14 16:02:35.000000000 +0200 @@ -341,7 +341,7 @@ if(disconnect_reason) { document.getElementById("alert-disconnect").style.display = "block"; - document.getElementById("disconnect-reason").innerHTML = disconnect_reason; + document.getElementById("disconnect-reason").innerText = disconnect_reason; } //Populate the form: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/html5/index.html new/xpra-3.0.9/html5/index.html --- old/xpra-3.0.8/html5/index.html 2020-03-13 17:51:18.000000000 +0100 +++ new/xpra-3.0.9/html5/index.html 2020-04-08 08:45:00.000000000 +0200 @@ -781,10 +781,10 @@ if (window.clipboardData && window.clipboardData.setData) { try { if (Utilities.isIE()) { - clipboardData.setData("Text", clipboard_buffer); + window.clipboardData.setData("Text", clipboard_buffer); } else { - clipboardData.setData(clipboard_datatype, clipboard_buffer); + window.clipboardData.setData(clipboard_datatype, clipboard_buffer); } success = true; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/html5/js/Client.js new/xpra-3.0.9/html5/js/Client.js --- old/xpra-3.0.8/html5/js/Client.js 2020-01-20 20:48:07.000000000 +0100 +++ new/xpra-3.0.9/html5/js/Client.js 2020-04-08 08:45:00.000000000 +0200 @@ -2128,13 +2128,13 @@ this.send(["configure-window", Number(wid), x, y, w, h, {}]); } XpraClient.prototype._tray_geometry_changed = function(win) { - ctx.debug("tray", "tray geometry changed (ignored)"); + win.client.debug("tray", "tray geometry changed (ignored)"); } XpraClient.prototype._tray_set_focus = function(win) { - ctx.debug("tray", "tray set focus (ignored)"); + win.client.debug("tray", "tray set focus (ignored)"); } XpraClient.prototype._tray_closed = function(win) { - ctx.debug("tray", "tray closed (ignored)"); + win.client.debug("tray", "tray closed (ignored)"); } XpraClient.prototype.reconfigure_all_trays = function() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/html5/js/Keycodes.js new/xpra-3.0.9/html5/js/Keycodes.js --- old/xpra-3.0.8/html5/js/Keycodes.js 2020-02-07 12:19:08.000000000 +0100 +++ new/xpra-3.0.9/html5/js/Keycodes.js 2020-04-08 08:45:00.000000000 +0200 @@ -1626,8 +1626,8 @@ //console.debug("KEYSYM_TO_UNICODE=", KEYSYM_TO_UNICODE); for (var keysym in KEYSYM_TO_UNICODE) { var u = KEYSYM_TO_UNICODE[keysym]; - var char = String.fromCharCode(u); - CHAR_TO_NAME[char] = keysym; + var character = String.fromCharCode(u); + CHAR_TO_NAME[character] = keysym; } //console.debug("CHAR_TO_NAME=", KEYSYM_TO_UNICODE); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/html5/js/Notifications.js new/xpra-3.0.9/html5/js/Notifications.js --- old/xpra-3.0.8/html5/js/Notifications.js 2019-09-24 15:53:54.000000000 +0200 +++ new/xpra-3.0.9/html5/js/Notifications.js 2020-04-08 08:45:00.000000000 +0200 @@ -15,7 +15,7 @@ console.debug("doNotification", type, nid, title, message, timeout, icon, actions, hints, onAction, onClose); var nID = 'notification' + nid; var a = $('<div id="' + nID + '" class="alert ' + type + '">'+ - '<img class="notification_icon" id="notification_icon' + nID + '"></img>'+ + '<img class="notification_icon" id="notification_icon' + nID + '">'+ '<span class="title">'+title+'</span>'+ '<span class="message">' + message + '</span>'+ '<div class="dismiss">×</div>'+ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/html5/js/Utilities.js new/xpra-3.0.9/html5/js/Utilities.js --- old/xpra-3.0.8/html5/js/Utilities.js 2020-03-21 14:16:55.000000000 +0100 +++ new/xpra-3.0.9/html5/js/Utilities.js 2020-04-08 08:45:00.000000000 +0200 @@ -10,7 +10,7 @@ 'use strict'; var Utilities = { - VERSION : "3.0.8", + VERSION : "3.0.9", exc : function() { console.error.apply(console, arguments); @@ -179,8 +179,8 @@ if (l.length === 1){ return ''; } - //ie: "gb" - layout=l[1].toLowerCase(); + //ie: "en" + layout = l[0].toLowerCase(); console.debug("getKeyboardLayout()=", layout); return layout; }, @@ -606,4 +606,4 @@ //convert a language code into an X11 keyboard layout code: var LANGUAGE_TO_LAYOUT = { "da" : "dk", -} \ No newline at end of file +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/html5/js/Window.js new/xpra-3.0.9/html5/js/Window.js --- old/xpra-3.0.8/html5/js/Window.js 2020-01-20 20:48:07.000000000 +0100 +++ new/xpra-3.0.9/html5/js/Window.js 2020-04-08 08:45:00.000000000 +0200 @@ -1276,14 +1276,14 @@ } function paint_box(color, px, py, pw, ph) { me.offscreen_canvas_ctx.strokeStyle = color; - me.offscreen_canvas_ctx.lineWidth = "2"; + me.offscreen_canvas_ctx.lineWidth = 2; me.offscreen_canvas_ctx.strokeRect(px, py, pw, ph); } function painted(skip_box) { img_data = null; me.paint_pending = 0; - if (me.paint_debug && !skip_box) { + if (!skip_box && me.debug_categories.includes("draw")) { var color = DEFAULT_BOX_COLORS[coding] || "white"; paint_box(color, x, y, width, height); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/man/xpra.1 new/xpra-3.0.9/man/xpra.1 --- old/xpra-3.0.8/man/xpra.1 2020-02-07 12:19:08.000000000 +0100 +++ new/xpra-3.0.9/man/xpra.1 2020-04-03 12:05:47.000000000 +0200 @@ -813,8 +813,7 @@ The filename used to store the password can be specified using the \fIfilename\fP option. If this option is not specified, it will fallback to using the -password filename specified with the \fIpassword-file\fP switch -or if that is also unset, \fIpassword.txt\fP will be used. +password filename specified with the \fIpassword-file\fP switch. .IP \fBenv\fP Use the password specified using the environment variable specified using the \fIname\fP option, which defaults to diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/setup.py new/xpra-3.0.9/setup.py --- old/xpra-3.0.8/setup.py 2020-03-13 17:51:18.000000000 +0100 +++ new/xpra-3.0.9/setup.py 2020-04-03 14:51:57.000000000 +0200 @@ -2063,6 +2063,7 @@ #find nvcc: path_options = os.environ.get("PATH", "").split(os.path.pathsep) if WIN32: + external_includes += ["pycuda"] nvcc_exe = "nvcc.exe" CUDA_DIR = os.environ.get("CUDA_DIR", "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA") path_options = [os.path.join(CUDA_DIR, x, "bin") for x in ( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/svn-info new/xpra-3.0.9/svn-info --- old/xpra-3.0.8/svn-info 2020-03-31 13:40:32.000000000 +0200 +++ new/xpra-3.0.9/svn-info 2020-04-14 17:42:59.000000000 +0200 @@ -4,10 +4,10 @@ Relative URL: ^/tags/v3.0.x/src Repository Root: file:///var/svn/repos/Xpra Repository UUID: 3bb7dfac-3a0b-4e04-842a-767bc560f471 -Revision: 25881 +Revision: 26127 Node Kind: directory Schedule: normal Last Changed Author: antoine -Last Changed Rev: 25879 -Last Changed Date: 2020-03-31 10:03:56 +0100 (Tue, 31 Mar 2020) +Last Changed Rev: 26125 +Last Changed Date: 2020-04-14 16:08:28 +0100 (Tue, 14 Apr 2020) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/svn-version new/xpra-3.0.9/svn-version --- old/xpra-3.0.8/svn-version 2020-03-31 13:40:32.000000000 +0200 +++ new/xpra-3.0.9/svn-version 2020-04-14 17:42:59.000000000 +0200 @@ -1 +1 @@ -25881 +26127 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/win32/BUILD_CUDA_KERNEL.BAT new/xpra-3.0.9/win32/BUILD_CUDA_KERNEL.BAT --- old/xpra-3.0.8/win32/BUILD_CUDA_KERNEL.BAT 2019-11-26 16:58:06.000000000 +0100 +++ new/xpra-3.0.9/win32/BUILD_CUDA_KERNEL.BAT 2020-04-03 14:51:57.000000000 +0200 @@ -7,7 +7,12 @@ SET NVCC_DIR=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\ SET NVCC=%NVCC_DIR%\nvcc.exe -CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 +SET MSVC2019VCBAT=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvarsall.bat +IF EXIST "%MSVC2019VCBAT%" ( + CALL "%MSVC2019VCBAT%" x86_amd64 +) else ( + CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86_amd64 +) "%NVCC%" -fatbin -c %CUDA_SRC% -o %CUDA_BIN% ^ --use-local-env --machine 64 ^ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/win32/MINGW_BUILD.sh new/xpra-3.0.9/win32/MINGW_BUILD.sh --- old/xpra-3.0.8/win32/MINGW_BUILD.sh 2020-03-13 17:51:18.000000000 +0100 +++ new/xpra-3.0.9/win32/MINGW_BUILD.sh 2020-04-14 16:02:35.000000000 +0200 @@ -59,6 +59,12 @@ SIGNTOOL="${PROGRAMFILES_X86}\\Windows Kits\\8.1\\Bin\\x64\\signtool.exe" fi fi +if [ ! -e "${SIGNTOOL}" ]; then + SIGNTOOL=`find /c/Program\ Files* -wholename "*/x64/signtool.exe"` +fi +if [ -e "${SIGNTOOL}" ]; then + cp "$SIGNTOOL" ./ +fi ################################################################################ # Get version information, generate filenames @@ -379,11 +385,11 @@ if [ "${DO_VERPATCH}" == "1" ]; then for exe in `ls dist/*exe | grep -v Plink.exe`; do tool_name=`echo $exe | sed 's+dist/++g;s+Xpra_++g;s+Xpra-++g;s+_+ +g;s+-+ +g;s+\.exe++g'` - verpatch $exe //s desc "Xpra $tool_name" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2019" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" + verpatch $exe //s desc "Xpra $tool_name" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2020" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" done - verpatch dist/Xpra_cmd.exe //s desc "Xpra command line" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2019" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" - verpatch dist/Xpra-Proxy.exe //s desc "Xpra Proxy Server" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2019" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" - verpatch dist/Xpra.exe //s desc "Xpra" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2019" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" + verpatch dist/Xpra_cmd.exe //s desc "Xpra command line" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2020" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" + verpatch dist/Xpra-Proxy.exe //s desc "Xpra Proxy Server" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2020" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" + verpatch dist/Xpra.exe //s desc "Xpra" //va "${ZERO_PADDED_VERSION}" //s company "xpra.org" //s copyright "(c) xpra.org 2020" //s product "xpra" //pv "${ZERO_PADDED_VERSION}" fi ################################################################################ @@ -435,7 +441,7 @@ if [ "${DO_SIGN}" == "1" ]; then SIGNTOOL_LOG="win32/signtool.log" echo "* Signing EXE" - cmd.exe //c "${SIGNTOOL}" sign //v //f "${KEY_FILE}" //t "http://timestamp.comodoca.com/authenticode" "${INSTALLER_FILENAME}" > ${SIGNTOOL_LOG} + cmd.exe //c signtool.exe sign //v //f "${KEY_FILE}" //t "http://timestamp.comodoca.com/authenticode" "${INSTALLER_FILENAME}" > ${SIGNTOOL_LOG} if [ "$?" != 0 ]; then echo "signtool command failed, see ${SIGNTOOL_LOG}:" cat ${SIGNTOOL_LOG} @@ -470,7 +476,7 @@ if [ "${DO_SIGN}" == "1" ]; then SIGNTOOL_LOG="win32/signtool.log" echo "* Signing MSI" - cmd.exe //c "${SIGNTOOL}" sign //v //f "${KEY_FILE}" //t "http://timestamp.comodoca.com/authenticode" "${MSI_FILENAME}" > ${SIGNTOOL_LOG} + cmd.exe //c signtool.exe sign //v //f "${KEY_FILE}" //t "http://timestamp.comodoca.com/authenticode" "${MSI_FILENAME}" > ${SIGNTOOL_LOG} if [ "$?" != 0 ]; then echo "signtool command failed, see ${SIGNTOOL_LOG}:" cat ${SIGNTOOL_LOG} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/win32/service/shadow_server.py new/xpra-3.0.9/win32/service/shadow_server.py --- old/xpra-3.0.8/win32/service/shadow_server.py 2019-09-24 15:53:58.000000000 +0200 +++ new/xpra-3.0.9/win32/service/shadow_server.py 2020-04-08 08:45:00.000000000 +0200 @@ -29,7 +29,7 @@ #os.environ["XPRA_ALL_DEBUG"] = "1" #os.environ["XPRA_NAMED_PIPE_UNRESTRICTED"] = "1" from xpra.platform import init, set_default_name - set_default_name("Xpra-Proxy") + set_default_name("Xpra-Shadow") init() from xpra.scripts.main import main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/win32/xpra.iss new/xpra-3.0.9/win32/xpra.iss --- old/xpra-3.0.8/win32/xpra.iss 2020-03-21 14:16:55.000000000 +0100 +++ new/xpra-3.0.9/win32/xpra.iss 2020-04-08 08:45:00.000000000 +0200 @@ -1,9 +1,9 @@ [Setup] AppName=Xpra AppId=Xpra_is1 -AppVersion=3.0.8 -AppVerName=Xpra 3.0.8 -UninstallDisplayName=Xpra 3.0.8 +AppVersion=3.0.9 +AppVerName=Xpra 3.0.9 +UninstallDisplayName=Xpra 3.0.9 AppPublisher=xpra.org AppPublisherURL=http:;xpra.org/ DefaultDirName={pf}\Xpra @@ -16,7 +16,7 @@ Compression=lzma2/max SolidCompression=yes AllowUNCPath=false -VersionInfoVersion=3.0.8 +VersionInfoVersion=3.0.9 VersionInfoCompany=xpra.org VersionInfoDescription=multi-platform screen and application forwarding system WizardImageFile=win32\xpra-logo.bmp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/__init__.py new/xpra-3.0.9/xpra/__init__.py --- old/xpra-3.0.8/xpra/__init__.py 2020-03-31 13:40:33.000000000 +0200 +++ new/xpra-3.0.9/xpra/__init__.py 2020-04-14 17:42:59.000000000 +0200 @@ -4,4 +4,4 @@ # Xpra is released under the terms of the GNU GPL v2, or, at your option, any # later version. See the file COPYING for details. -__version__ = "3.0.8" +__version__ = "3.0.9" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/client/client_window_base.py new/xpra-3.0.9/xpra/client/client_window_base.py --- old/xpra-3.0.8/xpra/client/client_window_base.py 2019-12-23 17:11:42.000000000 +0100 +++ new/xpra-3.0.9/xpra/client/client_window_base.py 2020-04-14 16:02:36.000000000 +0200 @@ -451,6 +451,9 @@ geomlog("intpair(%s)=%s", a, v) if v: v1, v2 = v + if a==b"maximum-size" and v1>=32000 and v2>=32000 and WIN32: + #causes problems, see #2714 + continue sv1 = client.sx(v1) sv2 = client.sy(v2) if a in (b"base-size", b"increment"): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/client/gl/gl_drivers.py new/xpra-3.0.9/xpra/client/gl/gl_drivers.py --- old/xpra-3.0.8/xpra/client/gl/gl_drivers.py 2020-01-25 11:03:51.000000000 +0100 +++ new/xpra-3.0.9/xpra/client/gl/gl_drivers.py 2020-04-08 08:45:00.000000000 +0200 @@ -26,6 +26,7 @@ BLACKLIST = { "renderer" : [ + "SVGA3D", "Software Rasterizer", "Mesa DRI Intel(R) Ivybridge Desktop", "Mesa DRI Intel(R) Haswell Mobile", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/client/gl/window_backend.py new/xpra-3.0.9/xpra/client/gl/window_backend.py --- old/xpra-3.0.8/xpra/client/gl/window_backend.py 2019-11-05 18:31:07.000000000 +0100 +++ new/xpra-3.0.9/xpra/client/gl/window_backend.py 2020-04-08 08:45:00.000000000 +0200 @@ -131,7 +131,7 @@ log("paint_callback(%s, %s)", success, message) draw_result.update({ "success" : success, - "message" : message, + "message" : message.replace("\n", " "), }) log("OpenGL: testing draw on %s widget %s with %s : %s", window, widget, coding, pixel_format) pix = AtomicInteger(0x7f) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/client/gtk_base/bug_report.py new/xpra-3.0.9/xpra/client/gtk_base/bug_report.py --- old/xpra-3.0.8/xpra/client/gtk_base/bug_report.py 2020-03-21 14:16:55.000000000 +0100 +++ new/xpra-3.0.9/xpra/client/gtk_base/bug_report.py 2020-04-14 16:02:36.000000000 +0200 @@ -358,7 +358,7 @@ log.error("Error: cannot create mmap file:") log.error(" %s", e) else: - zf.write(temp.name, cfile, zipfile.ZIP_STORED, 0) + zf.write(temp.name, cfile, zipfile.ZIP_STORED) finally: if temp: os.unlink(temp.name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/client/gtk_base/client_launcher.py new/xpra-3.0.9/xpra/client/gtk_base/client_launcher.py --- old/xpra-3.0.8/xpra/client/gtk_base/client_launcher.py 2019-12-08 12:59:03.000000000 +0100 +++ new/xpra-3.0.9/xpra/client/gtk_base/client_launcher.py 2020-04-14 16:02:36.000000000 +0200 @@ -31,7 +31,7 @@ FILE_CHOOSER_ACTION_SAVE, FILE_CHOOSER_ACTION_OPEN, ) from xpra.util import DEFAULT_PORT, csv, repr_ellipsized -from xpra.os_util import WIN32, OSX, PYTHON3 +from xpra.os_util import WIN32, OSX, PYTHON3, POSIX from xpra.make_thread import start_thread from xpra.client.gtk_base.gtk_tray_menu_base import ( make_min_auto_menu, make_encodingsmenu, @@ -1175,6 +1175,10 @@ from xpra.gtk_common.quit import gtk_main_quit_on_fatal_exceptions_enable from xpra.platform.gui import init as gui_init, ready as gui_ready + if POSIX and not OSX: + from xpra.x11.gtk_x11.gdk_display_source import init_gdk_display_source + init_gdk_display_source() + gui_init() gtk_main_quit_on_fatal_exceptions_enable() try: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/client/gtk_base/gtk_client_window_base.py new/xpra-3.0.9/xpra/client/gtk_base/gtk_client_window_base.py --- old/xpra-3.0.8/xpra/client/gtk_base/gtk_client_window_base.py 2020-03-21 14:16:55.000000000 +0100 +++ new/xpra-3.0.9/xpra/client/gtk_base/gtk_client_window_base.py 2020-04-14 16:02:36.000000000 +0200 @@ -1761,7 +1761,10 @@ #we may have cleared the backing, so we must re-create one: self._set_backing_size(w, h) if not self._override_redirect: - self.idle_add(self._focus_change, "initial") + htf = self.has_toplevel_focus() + focuslog("mapped: has-toplevel-focus=%s", htf) + if htf: + self._client.update_focus(self._id, htf) def get_window_frame_size(self): frame = self._client.get_frame_extents(self) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/client/gtk_base/gtk_keyboard_helper.py new/xpra-3.0.9/xpra/client/gtk_base/gtk_keyboard_helper.py --- old/xpra-3.0.8/xpra/client/gtk_base/gtk_keyboard_helper.py 2019-09-24 15:53:59.000000000 +0200 +++ new/xpra-3.0.9/xpra/client/gtk_base/gtk_keyboard_helper.py 2020-04-14 16:02:36.000000000 +0200 @@ -84,8 +84,8 @@ def main(): #use gtk as display source: - from xpra.os_util import POSIX - if POSIX: + from xpra.os_util import POSIX, OSX + if POSIX and not OSX: from xpra.x11.gtk_x11.gdk_display_source import init_gdk_display_source init_gdk_display_source() from xpra.util import print_nested_dict diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/client/gtk_base/gtk_tray_menu_base.py new/xpra-3.0.9/xpra/client/gtk_base/gtk_tray_menu_base.py --- old/xpra-3.0.8/xpra/client/gtk_base/gtk_tray_menu_base.py 2020-03-24 06:22:25.000000000 +0100 +++ new/xpra-3.0.9/xpra/client/gtk_base/gtk_tray_menu_base.py 2020-04-08 08:45:00.000000000 +0200 @@ -995,11 +995,11 @@ return self.client.quality def set_min_quality(self, q): self.client.min_quality = q - self.client.quality = 0 + self.client.quality = -1 self.client.send_min_quality() self.client.send_quality() def set_quality(self, q): - self.client.min_quality = 0 + self.client.min_quality = -1 self.client.quality = q self.client.send_min_quality() self.client.send_quality() @@ -1044,11 +1044,11 @@ return self.client.speed def set_min_speed(self, s): self.client.min_speed = s - self.client.speed = 0 + self.client.speed = -1 self.client.send_min_speed() self.client.send_speed() def set_speed(self, s): - self.client.min_speed = 0 + self.client.min_speed = -1 self.client.speed = s self.client.send_min_speed() self.client.send_speed() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/client/gtk_base/session_info.py new/xpra-3.0.9/xpra/client/gtk_base/session_info.py --- old/xpra-3.0.8/xpra/client/gtk_base/session_info.py 2020-03-30 18:52:50.000000000 +0200 +++ new/xpra-3.0.9/xpra/client/gtk_base/session_info.py 2020-04-03 14:51:57.000000000 +0200 @@ -657,8 +657,8 @@ l.append(v) addavg(self.avg_batch_delay, "batch", "delay") addavg(self.avg_damage_out_latency, "damage", "out_latency") - spl = tuple(1000.0*x[1] for x in self.client.server_ping_latency) - cpl = tuple(1000.0*x[1] for x in self.client.client_ping_latency) + spl = tuple(1000.0*x[1] for x in tuple(self.client.server_ping_latency)) + cpl = tuple(1000.0*x[1] for x in tuple(self.client.client_ping_latency)) if spl and cpl: self.avg_ping_latency.append(iround(sum(spl+cpl)/len(spl+cpl))) pc = tuple(self.client.pixel_counter) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/client/mixins/audio.py new/xpra-3.0.9/xpra/client/mixins/audio.py --- old/xpra-3.0.8/xpra/client/mixins/audio.py 2020-01-08 12:52:06.000000000 +0100 +++ new/xpra-3.0.9/xpra/client/mixins/audio.py 2020-04-14 16:02:36.000000000 +0200 @@ -471,8 +471,8 @@ ss = start_receiving_sound(codec) if not ss: return False - self.sound_sink = ss ss.sequence = self.sound_sink_sequence + self.sound_sink = ss ss.connect("state-changed", self.sound_sink_state_changed) ss.connect("error", self.sound_sink_error) ss.connect("exit", self.sound_sink_exit) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/client/mixins/display.py new/xpra-3.0.9/xpra/client/mixins/display.py --- old/xpra-3.0.8/xpra/client/mixins/display.py 2020-03-21 14:16:55.000000000 +0100 +++ new/xpra-3.0.9/xpra/client/mixins/display.py 2020-04-14 16:02:36.000000000 +0200 @@ -325,24 +325,32 @@ scalinglog("may_adjust_scaling() server desktop size=%s, client root size=%s", self.server_actual_desktop_size, self.get_root_size()) scalinglog(" scaled client root size using %sx%s: %s", self.xscale, self.yscale, (sw, sh)) - if sw<(max_w+1) and sh<(max_h+1): - #no change needed - return #server size is too small for the client screen size with the current scaling value, #calculate the minimum scaling to fit it: def clamp(v): return max(MIN_SCALING, min(MAX_SCALING, v)) - x = clamp(float(w)/max_w) - y = clamp(float(h)/max_h) + if self.desktop_fullscreen: + sw, sh = self.server_actual_desktop_size + x = clamp(float(w)/sw) + y = clamp(float(h)/sh) + else: + if sw<(max_w+1) and sh<(max_h+1): + #no change needed + return + x = clamp(float(w)/max_w) + y = clamp(float(h)/max_h) + #avoid wonky scaling: + if not 0.75<x/y<1.25: + x = y = min(x, y) def mint(v): #prefer int over float, #and even tolerate a 0.1% difference to get it: if iround(v)*1000==iround(v*1000): return int(v) return v - mscale = max(mint(x), mint(y)) - self.xscale = mscale - self.yscale = mscale + self.xscale = mint(x) + self.yscale = mint(y) + scalinglog(" xscale=%s, yscale=%s", self.xscale, self.yscale) #to use the same scale for both axes: #self.xscale = mint(max(x, y)) #self.yscale = self.xscale diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/client/ui_client_base.py new/xpra-3.0.9/xpra/client/ui_client_base.py --- old/xpra-3.0.8/xpra/client/ui_client_base.py 2020-03-24 06:22:25.000000000 +0100 +++ new/xpra-3.0.9/xpra/client/ui_client_base.py 2020-04-08 08:45:00.000000000 +0200 @@ -515,9 +515,11 @@ log.info("unknown server setting changed: %s=%s", setting, repr_ellipsized(bytestostr(value))) return log("_process_setting_change: %s=%s", setting, value) - #xdg-menu is too big to log - if setting not in ("xdg-menu", ): - log.info("server setting changed: %s=%s", setting, repr_ellipsized(str(value))) + #xdg-menu is too big to log, and we have to update our attribute: + if setting=="xdg-menu": + self.server_xdg_menu = value + else: + log.info("server setting changed: %s=%s", setting, repr_ellipsized(value)) self.server_setting_changed(setting, value) def server_setting_changed(self, setting, value): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/clipboard/clipboard_core.py new/xpra-3.0.9/xpra/clipboard/clipboard_core.py --- old/xpra-3.0.8/xpra/clipboard/clipboard_core.py 2020-03-08 03:21:09.000000000 +0100 +++ new/xpra-3.0.9/xpra/clipboard/clipboard_core.py 2020-04-14 16:02:36.000000000 +0200 @@ -49,6 +49,8 @@ r"^com\.apple\.", r"^CorePasteboardFlavorType", r"^dyn\.", + r"^resource-transfer-format", #eclipse + r"^x-special/", #ie: gnome file copy ))) #targets some applications are known to request, #even when the peer did not expose them as valid targets, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/codecs/nv_util.py new/xpra-3.0.9/xpra/codecs/nv_util.py --- old/xpra-3.0.8/xpra/codecs/nv_util.py 2019-11-30 13:36:58.000000000 +0100 +++ new/xpra-3.0.9/xpra/codecs/nv_util.py 2020-04-08 08:45:00.000000000 +0200 @@ -1,6 +1,6 @@ #!/usr/bin/env python # This file is part of Xpra. -# Copyright (C) 2013-2017 Antoine Martin <anto...@xpra.org> +# Copyright (C) 2013-2020 Antoine Martin <anto...@xpra.org> # Xpra is released under the terms of the GNU GPL v2, or, at your option, any # later version. See the file COPYING for details. @@ -8,7 +8,7 @@ import os from xpra.util import pver, print_nested_dict, engs, envbool, csv -from xpra.os_util import bytestostr, strtobytes +from xpra.os_util import bytestostr, strtobytes, POSIX from xpra.log import Logger log = Logger("encoder", "util") @@ -51,6 +51,8 @@ def get_proc_driver_version(): + if not POSIX: + return () from xpra.os_util import load_binary_file proc_file = "/proc/driver/nvidia/version" v = load_binary_file(proc_file) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/codecs/nvenc/encoder.pyx new/xpra-3.0.9/xpra/codecs/nvenc/encoder.pyx --- old/xpra-3.0.8/xpra/codecs/nvenc/encoder.pyx 2019-11-18 16:50:49.000000000 +0100 +++ new/xpra-3.0.9/xpra/codecs/nvenc/encoder.pyx 2020-04-08 08:45:00.000000000 +0200 @@ -1354,7 +1354,8 @@ has_lossless_mode = colorspace in ("XRGB", "ARGB", "BGRX", "BGRA" ) and encoding=="h264" cs = video_spec(encoding=encoding, input_colorspace=colorspace, output_colorspaces=get_COLORSPACES(encoding)[colorspace], has_lossless_mode=LOSSLESS_CODEC_SUPPORT.get(encoding, LOSSLESS_ENABLED), codec_class=Encoder, codec_type=get_type(), - quality=60+has_lossless_mode*40, speed=100, setup_cost=80, cpu_cost=10, gpu_cost=100, + quality=60+has_lossless_mode*40, speed=100, size_efficiency=100, + setup_cost=80, cpu_cost=10, gpu_cost=100, #using a hardware encoder for something this small is silly: min_w=min_w, min_h=min_h, max_w=max_w, max_h=max_h, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/gtk_common/gtk_util.py new/xpra-3.0.9/xpra/gtk_common/gtk_util.py --- old/xpra-3.0.8/xpra/gtk_common/gtk_util.py 2019-11-30 13:36:58.000000000 +0100 +++ new/xpra-3.0.9/xpra/gtk_common/gtk_util.py 2020-04-14 17:40:50.000000000 +0200 @@ -171,10 +171,10 @@ def get_pixbuf_from_data(rgb_data, has_alpha, w, h, rowstride): - data = array.array('B', strtobytes(rgb_data)) - return GdkPixbuf.Pixbuf.new_from_data(data, GdkPixbuf.Colorspace.RGB, - has_alpha, 8, w, h, rowstride, - None, None) + from gi.repository import GLib + data = GLib.Bytes(rgb_data) + return GdkPixbuf.Pixbuf.new_from_bytes(data, GdkPixbuf.Colorspace.RGB, + has_alpha, 8, w, h, rowstride) get_pixbuf_from_window = gdk.pixbuf_get_from_window diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/net/ssh.py new/xpra-3.0.9/xpra/net/ssh.py --- old/xpra-3.0.8/xpra/net/ssh.py 2020-03-21 14:16:55.000000000 +0100 +++ new/xpra-3.0.9/xpra/net/ssh.py 2020-04-14 16:02:36.000000000 +0200 @@ -225,6 +225,14 @@ } } + def close(self): + try: + super().close() + except Exception: + #this can happen if the proxy command gets a SIGINT, + #it's closed already and we don't care + log("SSHProxyCommandConnection.close()", exc_info=True) + def ssh_paramiko_connect_to(display_desc): #plain socket attributes: @@ -627,6 +635,9 @@ if not transport.is_authenticated() and NONE_AUTH: auth_none() + if not transport.is_authenticated() and PASSWORD_AUTH and password: + auth_password() + if not transport.is_authenticated() and AGENT_AUTH: auth_agent() @@ -637,9 +648,6 @@ if not transport.is_authenticated() and PASSWORD_AUTH: auth_interactive() - if not transport.is_authenticated() and PASSWORD_AUTH and password: - auth_password() - if not transport.is_authenticated() and PASSWORD_AUTH and not password: for _ in range(1+PASSWORD_RETRY): password = input_pass("please enter the SSH password for %s@%s:" % (username, host)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/os_util.py new/xpra-3.0.9/xpra/os_util.py --- old/xpra-3.0.8/xpra/os_util.py 2020-03-30 18:52:50.000000000 +0200 +++ new/xpra-3.0.9/xpra/os_util.py 2020-04-08 08:45:00.000000000 +0200 @@ -380,6 +380,9 @@ return os.environ.get("XDG_CURRENT_DESKTOP", "").lower().find("unity")>=0 def is_gnome(): + if os.environ.get("XDG_SESSION_DESKTOP", "").split("-", 1)[0] in ("i3", "ubuntu", ): + #"i3-gnome" is not really gnome... ie: the systray does work! + return False return os.environ.get("XDG_CURRENT_DESKTOP", "").lower().find("gnome")>=0 def is_kde(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/platform/win32/dotxpra.py new/xpra-3.0.9/xpra/platform/win32/dotxpra.py --- old/xpra-3.0.8/xpra/platform/win32/dotxpra.py 2019-09-24 15:54:00.000000000 +0200 +++ new/xpra-3.0.9/xpra/platform/win32/dotxpra.py 2020-04-08 08:45:00.000000000 +0200 @@ -50,7 +50,10 @@ #find the matching sockets, and return: #(state, local_display, sockpath) def socket_details(self, check_uid=0, matching_state=None, matching_display=None): - return {PIPE_PREFIX.rstrip("\\"): [(LIVE, display, pipe_name) for display, pipe_name in self.get_all_namedpipes().items()]} + np = self.get_all_namedpipes() + if not np: + return {} + return {PIPE_PREFIX.rstrip("\\"): [(LIVE, display, pipe_name) for display, pipe_name in np.items()]} def get_all_namedpipes(self): log = get_util_logger() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/platform/xposix/gui.py new/xpra-3.0.9/xpra/platform/xposix/gui.py --- old/xpra-3.0.8/xpra/platform/xposix/gui.py 2020-02-07 12:19:09.000000000 +0100 +++ new/xpra-3.0.9/xpra/platform/xposix/gui.py 2020-04-14 16:02:36.000000000 +0200 @@ -210,11 +210,12 @@ randr_bindings = RandRBindings() if randr_bindings.has_randr(): wmm, hmm = randr_bindings.get_screen_size_mm() - w, h = randr_bindings.get_screen_size() - dpix = iround(w * 25.4 / wmm) - dpiy = iround(h * 25.4 / hmm) - screenlog("xdpi=%s, ydpi=%s - size-mm=%ix%i, size=%ix%i", dpix, dpiy, wmm, hmm, w, h) - return dpix, dpiy + if wmm>0 and hmm>0: + w, h = randr_bindings.get_screen_size() + dpix = iround(w * 25.4 / wmm) + dpiy = iround(h * 25.4 / hmm) + screenlog("xdpi=%s, ydpi=%s - size-mm=%ix%i, size=%ix%i", dpix, dpiy, wmm, hmm, w, h) + return dpix, dpiy return -1, -1 def get_xdpi(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/platform/xposix/paths.py new/xpra-3.0.9/xpra/platform/xposix/paths.py --- old/xpra-3.0.8/xpra/platform/xposix/paths.py 2019-09-24 15:54:00.000000000 +0200 +++ new/xpra-3.0.9/xpra/platform/xposix/paths.py 2020-04-03 12:05:47.000000000 +0200 @@ -184,5 +184,5 @@ #try to use the same "xpra" executable that launched this server, #whilst also preserving the python interpreter version: if sys.argv and sys.argv[0].lower().endswith("/xpra"): - return ["python%i" % sys.version_info[0], sys.argv[0]] + return ["python%i.%i" % (sys.version_info.major, sys.version_info.minor), sys.argv[0]] return ["xpra"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/scripts/bug_report.py new/xpra-3.0.9/xpra/scripts/bug_report.py --- old/xpra-3.0.8/xpra/scripts/bug_report.py 2019-09-24 15:54:00.000000000 +0200 +++ new/xpra-3.0.9/xpra/scripts/bug_report.py 2020-04-14 16:02:36.000000000 +0200 @@ -8,11 +8,16 @@ def main(argv=()): + from xpra.os_util import POSIX, OSX from xpra.platform import program_context with program_context("Xpra-Bug-Report", "Xpra Bug Report"): from xpra.log import enable_color enable_color() + if POSIX and not OSX: + from xpra.x11.gtk_x11.gdk_display_source import init_gdk_display_source + init_gdk_display_source() + from xpra.log import enable_debug_for #logging init: if "-v" in argv: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/scripts/main.py new/xpra-3.0.9/xpra/scripts/main.py --- old/xpra-3.0.8/xpra/scripts/main.py 2020-03-31 13:39:15.000000000 +0200 +++ new/xpra-3.0.9/xpra/scripts/main.py 2020-04-14 16:02:36.000000000 +0200 @@ -1601,13 +1601,7 @@ app.hello_extra = {"connect" : False} app.start_new_session = sns else: - if PYTHON3 and POSIX and os.environ.get("GDK_BACKEND") is None and not OSX: - os.environ["GDK_BACKEND"] = "x11" - if opts.opengl=="probe": - opts.opengl = run_opengl_probe() try: - from xpra.platform.gui import init as gui_init - gui_init() app = make_client(error_cb, opts) except RuntimeError as e: #exceptions at this point are still initialization exceptions @@ -1794,6 +1788,13 @@ return "probe-failed:%s" % msg def make_client(error_cb, opts): + if POSIX and os.environ.get("GDK_BACKEND") is None and not OSX: + os.environ["GDK_BACKEND"] = "x11" + if opts.opengl=="probe": + opts.opengl = run_opengl_probe() + from xpra.platform.gui import init as gui_init + gui_init() + from xpra.scripts.config import FALSE_OPTIONS, OFF_OPTIONS def b(v): return str(v).lower() not in FALSE_OPTIONS @@ -2078,7 +2079,7 @@ sys.stderr.flush() return { "success" : False, - "message" : str(e), + "message" : str(e).replace("\n", " "), } finally: if saved_level is not None: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/scripts/server.py new/xpra-3.0.9/xpra/scripts/server.py --- old/xpra-3.0.8/xpra/scripts/server.py 2020-03-30 18:52:50.000000000 +0200 +++ new/xpra-3.0.9/xpra/scripts/server.py 2020-04-03 12:05:47.000000000 +0200 @@ -457,7 +457,9 @@ find_log_dir, create_input_devices, ) - script = xpra_runner_shell_script(xpra_file, cwd, opts.socket_dir) + script = None + if POSIX and getuid()!=0: + script = xpra_runner_shell_script(xpra_file, cwd, opts.socket_dir) uid = int(opts.uid) gid = int(opts.gid) @@ -552,7 +554,7 @@ #with the value supplied by the user: protected_env["XDG_RUNTIME_DIR"] = xrd - if POSIX and not ROOT: + if script: # Write out a shell-script so that we can start our proxy in a clean # environment: write_runner_shell_scripts(script) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/server/mixins/encoding_server.py new/xpra-3.0.9/xpra/server/mixins/encoding_server.py --- old/xpra-3.0.8/xpra/server/mixins/encoding_server.py 2019-09-24 15:54:01.000000000 +0200 +++ new/xpra-3.0.9/xpra/server/mixins/encoding_server.py 2020-04-08 08:45:01.000000000 +0200 @@ -170,7 +170,7 @@ def _process_encoding(self, proto, packet): - encoding = packet[1] + encoding = packet[1].decode("latin1") ss = self.get_server_source(proto) if ss is None: return diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/server/server_util.py new/xpra-3.0.9/xpra/server/server_util.py --- old/xpra-3.0.8/xpra/server/server_util.py 2020-03-31 13:39:15.000000000 +0200 +++ new/xpra-3.0.9/xpra/server/server_util.py 2020-04-01 07:35:26.000000000 +0200 @@ -83,18 +83,18 @@ script.append(b"_XPRA_PYTHON=%s\n" % (sh_quotemeta(sys.executable.encode()),)) script.append(b"_XPRA_SCRIPT=%s\n" % (sh_quotemeta(xpra_file.encode()),)) script.append(b""" - if which "$_XPRA_PYTHON" > /dev/null && [ -e "$_XPRA_SCRIPT" ]; then - # Happypath: - exec "$_XPRA_PYTHON" "$_XPRA_SCRIPT" "$@" - else - cat >&2 <<END - Could not find one or both of '$_XPRA_PYTHON' and '$_XPRA_SCRIPT' - Perhaps your environment has changed since the xpra server was started? - I'll just try executing 'xpra' with current PATH, and hope... - END - exec xpra "$@" - fi - """) +if which "$_XPRA_PYTHON" > /dev/null && [ -e "$_XPRA_SCRIPT" ]; then + # Happypath: + exec "$_XPRA_PYTHON" "$_XPRA_SCRIPT" "$@" +else + cat >&2 <<END + Could not find one or both of '$_XPRA_PYTHON' and '$_XPRA_SCRIPT' + Perhaps your environment has changed since the xpra server was started? + I'll just try executing 'xpra' with current PATH, and hope... +END + exec xpra "$@" +fi +""") return b"".join(script) else: @@ -169,18 +169,18 @@ script.append("_XPRA_PYTHON=%s\n" % (sh_quotemeta(sys.executable),)) script.append("_XPRA_SCRIPT=%s\n" % (sh_quotemeta(xpra_file),)) script.append(""" - if which "$_XPRA_PYTHON" > /dev/null && [ -e "$_XPRA_SCRIPT" ]; then - # Happypath: - exec "$_XPRA_PYTHON" "$_XPRA_SCRIPT" "$@" - else - cat >&2 <<END - Could not find one or both of '$_XPRA_PYTHON' and '$_XPRA_SCRIPT' - Perhaps your environment has changed since the xpra server was started? - I'll just try executing 'xpra' with current PATH, and hope... - END - exec xpra "$@" - fi - """) +if which "$_XPRA_PYTHON" > /dev/null && [ -e "$_XPRA_SCRIPT" ]; then + # Happypath: + exec "$_XPRA_PYTHON" "$_XPRA_SCRIPT" "$@" +else + cat >&2 <<END + Could not find one or both of '$_XPRA_PYTHON' and '$_XPRA_SCRIPT' + Perhaps your environment has changed since the xpra server was started? + I'll just try executing 'xpra' with current PATH, and hope... +END + exec xpra "$@" +fi +""") return "".join(script).encode() def write_runner_shell_scripts(contents, overwrite=True): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/server/shadow/gtk_root_window_model.py new/xpra-3.0.9/xpra/server/shadow/gtk_root_window_model.py --- old/xpra-3.0.8/xpra/server/shadow/gtk_root_window_model.py 2019-09-24 15:54:01.000000000 +0200 +++ new/xpra-3.0.9/xpra/server/shadow/gtk_root_window_model.py 2020-04-14 16:02:36.000000000 +0200 @@ -42,6 +42,8 @@ pixbuf = get_pixbuf_from_window(window, 0, 0, w, h) data = pixbuf_save_to_memory(pixbuf, "png") rowstride = w*3 + if not pixbuf: + return None return w, h, "png", rowstride, data diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/server/source/encodings_mixin.py new/xpra-3.0.9/xpra/server/source/encodings_mixin.py --- old/xpra-3.0.8/xpra/server/source/encodings_mixin.py 2020-03-08 03:21:09.000000000 +0100 +++ new/xpra-3.0.9/xpra/server/source/encodings_mixin.py 2020-04-14 16:02:36.000000000 +0200 @@ -256,7 +256,12 @@ self.vrefresh = c.intget("vrefresh", -1) - default_min_delay = max(DamageBatchConfig.MIN_DELAY, 1000//(self.vrefresh or 60)) + #assume 50Hz: + ms_per_frame = 1000//50 + if 30<=self.vrefresh<=500: + #looks like a valid vrefresh value, use it: + ms_per_frame = 1000//self.vrefresh + default_min_delay = max(DamageBatchConfig.MIN_DELAY, ms_per_frame) dbc = self.default_batch_config dbc.always = bool(batch_value("always", DamageBatchConfig.ALWAYS)) dbc.min_delay = batch_value("min_delay", default_min_delay, 0, 1000) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/server/source/fileprint_mixin.py new/xpra-3.0.9/xpra/server/source/fileprint_mixin.py --- old/xpra-3.0.8/xpra/server/source/fileprint_mixin.py 2020-03-30 18:52:51.000000000 +0200 +++ new/xpra-3.0.9/xpra/server/source/fileprint_mixin.py 2020-04-08 08:45:01.000000000 +0200 @@ -17,6 +17,12 @@ ADD_LOCAL_PRINTERS = envbool("XPRA_ADD_LOCAL_PRINTERS", False) PRINTER_LOCATION_STRING = os.environ.get("XPRA_PRINTER_LOCATION_STRING", "via xpra") +def printer_name(name): + try: + return name.decode("utf8") + except Exception: + return bytestostr(name) + class FilePrintMixin(FileTransferHandler, StubSourceMixin): @@ -137,10 +143,7 @@ #ie: on FOO (via xpra) location = "on %s (%s)" % (self.hostname, PRINTER_LOCATION_STRING) try: - try: - printer = name.decode("utf8") - except UnicodeDecodeError: - printer = name.decode("latin1") + printer = printer_name(name) def printer_added(): #once the printer has been added, register it in the list #(so it will be removed on exit) @@ -161,16 +164,13 @@ self.remove_printer(k) def remove_printer(self, name): + printer = printer_name(name) try: self.printers_added.remove(name) except KeyError: log("not removing printer '%s' - since we didn't add it", name) else: try: - try: - printer = name.decode("utf8") - except UnicodeDecodeError: - printer = name.decode("latin1") from xpra.platform.pycups_printing import remove_printer remove_printer(printer) log.info("removed remote printer '%s'", printer) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/server/window/window_source.py new/xpra-3.0.9/xpra/server/window/window_source.py --- old/xpra-3.0.8/xpra/server/window/window_source.py 2020-02-07 12:19:10.000000000 +0100 +++ new/xpra-3.0.9/xpra/server/window/window_source.py 2020-04-14 16:02:36.000000000 +0200 @@ -94,6 +94,8 @@ LOSSLESS_ENCODINGS = get_env_encodings("LOSSLESS", ("rgb", "png", "png/P", "png/L")) REFRESH_ENCODINGS = get_env_encodings("REFRESH", ("webp", "png", "rgb24", "rgb32")) +MAX_WINDOW_SIZE = 2**15-2**13 + class DelayedRegions(object): def __init__(self, damage_time, regions, encoding, options): @@ -916,7 +918,7 @@ if depth>24 and "rgb32" in co and self.client_bit_depth>24: #the only encoding that can do higher bit depth at present return "rgb32" - if depth in (24, 32) and "webp" in co and w>=2 and h>=2: + if depth in (24, 32) and "webp" in co and 16383>=w>=2 and 16383>=h>=2: return "webp" if "png" in co and ((quality>=80 and speed<80) or depth<=16): return "png" @@ -1290,6 +1292,11 @@ self.window_dimensions = ww, wh log("window dimensions changed: %ix%i", ww, wh) self.encode_queue_max_size = max(2, min(30, MAX_SYNC_BUFFER_SIZE//(ww*wh*4))) + if ww>MAX_WINDOW_SIZE or wh>MAX_WINDOW_SIZE: + if first_time("window-oversize-%i" % self.wid): + damagelog.warn("Warning: invalid window dimensions %ix%i for window %i", ww, wh, self.wid) + damagelog.warn(" window updates will be dropped until this is corrected") + return if self.full_frames_only: x, y, w, h = 0, 0, ww, wh self.do_damage(ww, wh, x, y, w, h, options) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/sound/wrapper.py new/xpra-3.0.9/xpra/sound/wrapper.py --- old/xpra-3.0.8/xpra/sound/wrapper.py 2019-09-24 15:54:01.000000000 +0200 +++ new/xpra-3.0.9/xpra/sound/wrapper.py 2020-04-08 08:45:01.000000000 +0200 @@ -48,6 +48,8 @@ if WIN32: #disable bencoder to skip warnings with the py3k Sound subapp env["XPRA_USE_BENCODER"] = "0" + #we don't want the output to go to a log file + env["XPRA_REDIRECT_OUTPUT"] = "0" elif POSIX and not OSX: try: from xpra.sound.pulseaudio.pulseaudio_util import add_audio_tagging_env diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/src_info.py new/xpra-3.0.9/xpra/src_info.py --- old/xpra-3.0.8/xpra/src_info.py 2020-03-31 13:40:32.000000000 +0200 +++ new/xpra-3.0.9/xpra/src_info.py 2020-04-14 17:42:59.000000000 +0200 @@ -1,2 +1,2 @@ LOCAL_MODIFICATIONS=0 -REVISION=25881 +REVISION=26127 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/x11/gtk_x11/wm.py new/xpra-3.0.9/xpra/x11/gtk_x11/wm.py --- old/xpra-3.0.8/xpra/x11/gtk_x11/wm.py 2019-09-24 15:54:02.000000000 +0200 +++ new/xpra-3.0.9/xpra/x11/gtk_x11/wm.py 2020-04-14 16:02:36.000000000 +0200 @@ -21,6 +21,7 @@ from xpra.x11.gtk_x11.selection import ManagerSelection from xpra.x11.gtk_x11.world_window import WorldWindow from xpra.x11.models.window import WindowModel, configure_bits +from xpra.x11.gtk_x11.world_window import WorldWindow from xpra.x11.gtk_x11.gdk_bindings import ( add_event_receiver, #@UnresolvedImport add_fallback_receiver, remove_fallback_receiver, #@UnresolvedImport @@ -232,7 +233,9 @@ self.size_constraints = DEFAULT_SIZE_CONSTRAINTS # Load up our full-screen widget - self._world_window = None + self._world_window = WorldWindow(self._display.get_default_screen()) + self.notify("toplevel") + self._world_window.show_all() if not is_gtk3(): self._world_window = WorldWindow(self._display.get_default_screen()) self.notify("toplevel") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/x11/gtk_x11/world_window.py new/xpra-3.0.9/xpra/x11/gtk_x11/world_window.py --- old/xpra-3.0.8/xpra/x11/gtk_x11/world_window.py 2019-09-24 15:54:02.000000000 +0200 +++ new/xpra-3.0.9/xpra/x11/gtk_x11/world_window.py 2020-04-14 16:02:36.000000000 +0200 @@ -1,6 +1,6 @@ # This file is part of Xpra. # Copyright (C) 2008, 2009 Nathaniel Smith <n...@pobox.com> -# Copyright (C) 2012-2018 Antoine Martin <anto...@xpra.org> +# Copyright (C) 2012-2020 Antoine Martin <anto...@xpra.org> # Xpra is released under the terms of the GNU GPL v2, or, at your option, any # later version. See the file COPYING for details. @@ -124,12 +124,13 @@ def __repr__(self): xid = 0 - if self.window: - xid = get_xwindow(self.window) + w = self.get_window() + if w: + xid = w.get_xid() return "WorldWindow(%#x)" % xid def _resize(self, *_args): - s = screen_get_default() + s = self.get_screen() x = s.get_width() y = s.get_height() log("sizing world to %sx%s", x, y) @@ -166,11 +167,17 @@ # *will* get the focus, and thus a real FocusIn event. send_wm_take_focus(self.get_window(), CurrentTime) + def add(self, widget): + w = widget.get_window() + log("add(%s) realized=%s, widget window=%s", widget, self.get_realized(), w) + #the DesktopManager does not have a window.. + if w: + super().add(widget) + def do_focus_in_event(self, event): htf = self.get_property("has-toplevel-focus") focuslog("world window got focus: %s, has-toplevel-focus=%s", event, htf) if not htf: - #super(WorldWindow, self).do_focus_in_event(*args) gtk.Window.do_focus_in_event(self, event) self.reset_x_focus() @@ -188,8 +195,9 @@ # sending a WM_TAKE_FOCUS to our own window, which will go to the X # server and then come back to our own process, which will then issue # an XSetInputFocus on itself. - now = x11_get_server_time(self.window) - send_wm_take_focus(self.window, now) + w = self.get_window() + now = x11_get_server_time(w) + send_wm_take_focus(w, now) def reset_x_focus(self): focuslog("reset_x_focus: widget with focus: %s", self.get_focus()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/x11/server_keyboard_config.py new/xpra-3.0.9/xpra/x11/server_keyboard_config.py --- old/xpra-3.0.8/xpra/x11/server_keyboard_config.py 2020-03-24 06:22:26.000000000 +0100 +++ new/xpra-3.0.9/xpra/x11/server_keyboard_config.py 2020-04-03 12:05:47.000000000 +0200 @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # This file is part of Xpra. # Copyright (C) 2011 Serviware (Arthur Huillet, <ahuil...@serviware.com>) -# Copyright (C) 2010-2019 Antoine Martin <anto...@xpra.org> +# Copyright (C) 2010-2020 Antoine Martin <anto...@xpra.org> # Copyright (C) 2008 Nathaniel Smith <n...@pobox.com> # Xpra is released under the terms of the GNU GPL v2, or, at your option, any # later version. See the file COPYING for details. @@ -503,8 +503,16 @@ #first, try to honour shift state: shift = ("shift" in modifiers) ^ ("lock" in modifiers) mode = 0 + numlock = 0 + numlock_modifier = None + for mod, keynames in self.keynames_for_mod.items(): + if "Num_Lock" in keynames: + numlock_modifier = mod + break for mod in modifiers: names = self.keynames_for_mod.get(mod, []) + if "Num_Lock" in names: + numlock = 1 for name in names: if name in ("ISO_Level3_Shift", "Mode_switch"): mode = 1 @@ -547,7 +555,11 @@ else: kmlog("adding '%s' to modifiers", mod) modifiers.append(mod) - if (level & 1) ^ shift: + #keypad overrules shift state (see #2702): + if keyname.startswith("KP_"): + if numlock_modifier and not numlock: + toggle_modifier(numlock_modifier) + elif (level & 1) ^ shift: #shift state does not match toggle_modifier("shift") if int(bool(level & 2)) ^ mode: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/xpra-3.0.8/xpra/x11/xkbhelper.py new/xpra-3.0.9/xpra/x11/xkbhelper.py --- old/xpra-3.0.8/xpra/x11/xkbhelper.py 2020-03-08 03:21:10.000000000 +0100 +++ new/xpra-3.0.9/xpra/x11/xkbhelper.py 2020-04-03 12:05:47.000000000 +0200 @@ -1,5 +1,5 @@ # This file is part of Xpra. -# Copyright (C) 2011-2019 Antoine Martin <anto...@xpra.org> +# Copyright (C) 2011-2020 Antoine Martin <anto...@xpra.org> # Xpra is released under the terms of the GNU GPL v2, or, at your option, any # later version. See the file COPYING for details. @@ -181,35 +181,38 @@ keycodes = tuple(x11_keycodes_for_keysym.get(keysym, set())) if keysym in DEBUG_KEYSYMS: log.info("set_keycode_translation: find_keycode%s x11 keycodes=%s", (kc, keysym, i), keycodes) - def rlog(v, msg): + def rlog(keycode, msg): if keysym in DEBUG_KEYSYMS: - log.info("set_keycode_translation: find_keycode%s=%s (%s)", (kc, keysym, i), v, msg) - return v + log.info("set_keycode_translation: find_keycode%s=%s (%s)", (kc, keysym, i), keycode, msg) + return keycode if not keycodes: return None - #no other option, use it: - if len(keycodes)==1: - return keycodes[0] for keycode in keycodes: defs = x11_keycodes.get(keycode) if keysym in DEBUG_KEYSYMS: log.info("x11 keycode %i: %s", keycode, defs) assert defs, "bug: keycode %i not found in %s" % (keycode, x11_keycodes) if len(defs)>i and defs[i]==keysym: - return rlog(keycode, "exact index match") + rlog(keycode, "exact index match") + return keycode, True #if possible, use the same one: if kc in keycodes: - return rlog(kc, "using same keycode as client") - return rlog(keycodes[0], "using first match") + rlog(kc, "using same keycode as client") + return kc, False + keycode = keycodes[0] + rlog(keycode, "using first match") + return keycode, False #generate the translation map: trans = {} for keycode, defs in keycodes.items(): for keysym,i in tuple(defs): #ie: ('1', 0) or ('A', 1), etc - x11_keycode = find_keycode(keycode, keysym, i) - if x11_keycode: + m = find_keycode(keycode, keysym, i) + if m: + x11_keycode, index_matched = m trans[(keycode, keysym)] = x11_keycode - trans[(keysym, i)] = x11_keycode trans[keysym] = x11_keycode + if index_matched: + trans[(keysym, i)] = x11_keycode if not xkbmap_x11_keycodes: #now add all the keycodes we may not have mapped yet #(present in x11_keycodes but not keycodes)