This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch 3.6.x in repository nx-libs. from 989398afe debian/*: Adopt packaging changes from official Debian package. adds a4fad8f58 Fix crash due to uninitialized VModMap fields. adds 5b0bf752a xkb: Initialize pad bytes sent in replies of geometry requests. adds 44c59e12d Fix uninitialized bytes adds 8d6a4a9b7 Merge branch 'uli42-pr/fix_uninit' into 3.6.x adds 020ef045e fb: Fix memcpy abuse adds 034228d75 fb: fix fast-path blt detection adds 22fea29cf Merge branch 'uli42-pr/fb_fastpath' into 3.6.x adds 79e4c20a0 manpage: add -sync adds 0b454d2d3 manpage: add -full adds 3b508010d manpage: add -class adds 51664049f manpage: add -depth adds 338e20510 manpage: add -geometry adds b8138d97d manpage: add/extend -dpi/-autodpi adds b405b962f manpage: add -name adds c8947d8aa manpage: reformat some lines adds 70cb1926c Merge branch 'uli42-pr/xnest_manpages' into 3.6.x adds d610e9c3c Keyboard.c: move keyboard file creation to extra function adds 269a352ff Keyboard.c: refactor keycode conversion adds d0d6c1bdb Keyboard.c: rename variables to better reflect their meaning adds 3c4a8da12 Keyboard.c: use 'variant' all over the place adds fb31220f2 Keyboard.c: reformat nxagentKeycodeConversionSetup adds 3b62184a1 Keyboard.c: improve creation of keyboard config file adds 21a0ce367 nxagent: fix references to default rules in manpage adds 4dfe84eaf Keyboard.c: remove non-fitting comment adds 26b033b84 Reconnect.c: restore old keyboard value if no new one is given adds ab3e14850 Merge branch 'uli42-pr/keyboard_cleanup' into 3.6.x adds 1de6ca599 nxagent: add keyboard=clone configuration option adds 161515d24 nxagent: add additional keyboard config option rmlvo adds 1d6c241d3 nxagent: store remote keyboard in global variables adds d5c9733b2 nxagent: simplify keycode conversion setup adds a70ec920d Keyboard.c: add static keyword where appropriate adds a8c65ab62 Merge branch 'uli42-pr/improve_keyboard2' into 3.6.x adds 522106e20 nxagent: bypass X2go's keyboard configuration hack adds 669af5300 Merge branch 'uli42-pr/x2go_bypass' into 3.6.x adds d98255968 nxagent.1 man page: Grammar fix. adds a61b1a72d XlibInt.c: fix wrong debug message adds 633f4617b XlibInt: check for XlibError before accessing other dpy fields adds 4214a719a Merge branch 'uli42-pr/fix_xlibcrash' into 3.6.x adds 4a7faa8bd Window.c: move WM_STATE handling to separate function adds d175fd4c6 Set default screen size to the whole screen in rootless mode adds 6c0098a3e Extensions.c: fix first resolution being ignored adds c4c39bc94 Extensions.c: Cleanup nxagentRandRInitSizes() adds 8dea30751 Screen.c: move identical line out of both parts of an if clause adds 43d3b655d Screen.c: improve readability of size calculations adds 3c92b5db9 Screen.c: fix size calculation in rootless mode adds d16a5fbb1 Screen.c: fix handling of fullscreen startup adds ca8236e7f Merge branch 'uli42-pr/window_fixes' into 3.6.x adds 5c99eb7d5 Make getUnixPath() return the right value when called without an argument. adds 889de46f7 Fix parsing ports set to unix sockets adds 26e483d49 Merge branch 'theqvd-unix_socket_forwarding' into 3.6.x adds 427ac344c release 3.5.99.18 adds f729ac996 rrdispatch.c: remove obsolete ifdef adds 34e4291de Screen.c: simplify and fix handling of rootless mode adds 5bbab001a Screen.c: code optimization for rootless mode adds 16cd2bbe1 nxagent: rework Bool handling adds b61934be2 Merge branch 'uli42-pr/misc' into 3.6.x adds 586742b71 Revert "nxagent: rework Bool handling" adds 24d7d0faa Merge branch 'uli42-pr/revert' into 3.6.x adds f1b27c4fd keystrokes.cfg: Add missing Shift=1 for viewport_move_up/down/right adds a3dc87d6b Merge branch 'uli42-pr/fix_keystrokes' into 3.6.x adds bfc05af73 nxproxy: list known session types in help output adds fc2907759 Keyboard.c: fix comment. adds 66315e4f3 Merge branch 'uli42-pr/session_types' into 3.6.x adds 3572b251e Regression fix for bfc05af7. Properly end lines in help/usage text. adds de421e4fe Revert "Fix parsing ports set to unix sockets" adds 36a7f0413 nx-X11/lib/configure.ac: Assure that the USE_DYNAMIC_XCURSOR macro is defined at build-time. adds 0eb71d78a Merge branch 'gh-sunweaver/pr/xlib-loadable-modules' into 3.6.x adds 71a3b8447 nx-X11/lib/configure.ac: fix version number adds f2e48fb73 nx-X11/lib/configure.ac: add forgotten status line adds a70e36c81 ConnDis.c: remove obsolete MNX_TCPCONN adds c81a45785 Use calloc to zero fill buffers being allocated for replies & events adds c6b6a8fcb Use C99 designated initializers in various extension Replies adds e7a50079e xfixes: use calloc for some structs adds d156ce5ab Merge branch 'uli42-pr/xfixes_memset' into 3.6.x adds 471342933 Fix: clang does not know about gnu_printf adds 0e481f8aa nxcomp: fix unused variable adds 0934b1e67 nxcomp: fix unused variables adds e1f2a24f6 xlib: remove superflous parens adds a8ed28234 Xlib: remove register keywords adds 74fe99dab xcompshad: remove unused variables adds a53c65547 Logger.h: fix missing compiler attribute adds 059028ce7 Logger.h: remove pragma, correct attributes adds 7c8214f31 GenericReply.h: remove unused variable adds 176f9b471 Merge branch 'uli42-pr/fix_clang_warnings' into 3.6.x adds ebd1ea036 .travis.yml: move from Ubuntu Trusty to Xenial. adds f2a1e877d .travis.yml: Update clang-6.0 to clang-7 adds 440ce3f54 .travis.yml: add some soft requirements adds 4538d2133 Merge branch 'mjtrangoni-move-to-xenial' into 3.6.x adds 486cc6f50 add nxdialog for displaying dialogs adds 2aa575f0d nxdialog: pylint improvements adds 3a097e6e0 nxdialog: use gtk3 instead of gtk2 adds 57700cd6b nxdialog: convert from optparse to argparse adds acffe15b5 nxdialog: make code compatible to python2 _and_ python3 adds 07052a25c nxdialog: allow to provide --parent 0 for testing adds d0e40f8b2 nxdialog: add example call adds df79c3b35 Merge branch 'uli42-pr/add_nxdialog' into 3.6.x adds 57ca69fe0 nxdialog: Turn into autotools project, add man page. adds 6812657f0 Makefile: Integrate new subproject "nxdialog". adds ae565e1da Merge branch 'sunweaver-pr/nxdialog-autotools' into 3.6.x adds 00f8d49a3 debian/*: Debianize package inclusion of nxdialog (ships with nxagent bin:pkg for now). adds ca8d889da debian/libnx-x11-6.symbols: Update symbols. adds ff1b3e9e8 nxdialog: Allow user to specify hexadecimal X11 window IDs. adds 400b627e4 nx-libs.spec: Dropping nxdialog files from installation for now when building RPMs. Postponing nxdialog integration with RPM packaging for now. adds da9a1bc0b debian/patches: Add 2004_enforce-lpthread.patch. On Debian, enforce -lpthread when building nxcomp. This is a nasty work around for a missing symbols issue that needs to get addressed otherwise in later release. adds 59305c8b9 release 3.5.99.19 adds cf3ac71a3 nxdialog: fix example adds 3af59f806 nxdialog/: create (almost) empty m4 directory. adds 1b6da5992 nxcomp/src/Makefile.am: PTHREAD_LDFLAGS does not exist, replace with PTHREAD_LIBS. adds 2efaa423b m4/: update external macros from autoconf-archive. adds 95f8cf7ea m4/ax_pthread.m4: implement workaround for libtool bug #13550. adds d1fe6a601 nxproxy/{m4,configure.ac,src/Makefile.am}: drop pthread overlinking. adds dd0d49c4e debian/patches/{,series}: remove 2004_enforce-lpthread.patch. adds cb5c042a1 Merge branch 'Ionic-bugfix/libXcomp-pthread-underlinking' into 3.6.x adds 34011ccad Makefile: Add clean/distclean target calls for nxdialog subdir to master Makefile's clean/distclean targets. adds 1ff05c8e2 nxdialog/Makefile.am: We forgot to clean up nxdialog/bin/Makefile.in. adds 80ecfad95 nxcomp/src/Makefile.am: Correct usage of PTHREAD_CFLAGS and PTHREAD_LIBS. PTHREAD_CFLAGS is also supposed to be used when linking. See comments in m4/ax_pthread.m4. adds f0aac0897 Merge branch 'sunweaver-pr/pthread-flags' into arctica-3.6.x adds 2a10438f7 nxdialog/bin/nxdialog: Fix error dialog-type-not-supplied error message. adds e2b73ab90 release 3.5.99.20 adds 3dc2c9aac roll-tarballs.sh: Remove nxdialog/* in nx-libs-lite tarballs. adds c9cac948f roll-tarballs.sh: Fix script removal from nx-libs-lite tarballs. new ee82317b5 travis.yml: Update clang 7.0 => 8.0 new 4ce890758 Merge branch 'mjtrangoni-update-clang-8' into 3.6.x new 3c9ee1ff7 nxagent: Determine nxagentProgName only once new d94e9ba24 Merge branch 'uli42-pr/fix_flavour_change' into 3.6.x new dff2e0a01 Font.c: factor out font checks new bcb5c7962 Drop Speedo font support new 8029141e7 Font.c: build the font paths at runtime new dfb5602a6 Font.c: Let dix check if a font path exists new 898f04e42 Font.c: Loop over font paths new 78a16245a auto-determine system font path and add to list of font paths new 0086b8c24 Font.c: Avoid duplicate font paths new 453edbd21 Font.c: use __func__ in TEST prints new f6177d2ad Merge branch 'uli42-pr/short_font_code' into 3.6.x new ff5740e03 spelling fixes new dece08252 Reconnect.c: initialize stateFile path new b32a984f8 Die XTESTEXT1, die! new bee0f13ce nxagent: Remove own GetTimeInMillis() implementation new 0a211b6b6 Keyboard.c: improve TEST and DEBUG output new 34e9c6b0b Keyboard.c: clean/unify formatting new 249be6680 NXwindow.c: add missing change new f0ba303d4 NXdamage.c: add missing upstream fixes new 0312a8cfe Rename libdamage to (correct) libdamageext new 3d254765c NXdispatch.c: add missing change new f6845fbd9 NXdispatch.c: add missing fixes new 0db8b0353 NXdispatch.c: indent code to match environment new a31d28014 README.keystrokes: refine description new 79a2b7b24 Remove useless "ignore" keystroke for Ctrl-Alt-Backspace new 1b9d735b0 README.keystrokes: mention nxdialog new fac36b24f nxagent: make nxagentX2go a Boolean new 226493690 Merge branch 'uli42-pr/small_fixes' into 3.6.x new 6a938063b Remove Debian build references to `xtestext1.h` new 6981e9bb0 Merge branch 'andschwa-xtestext1h' into 3.6.x new 4df77fe73 xkbUtils.c: Catch division by zero new 20353e96a libNX_X11: add additional checks for dpy and xkb new 789d3a37e Merge branch 'uli42-pr/fix_xkb_crash' into 3.6.x new 0eab060d1 dix: remove unused requestLogIndex new 126cbe1ff Merge branch 'uli42-pr/remove_requestlog' into 3.6.x new fd8427002 Fix NXevents.c: Reactivate errornously commented function new 49adb1e5c render/glyph.c: add missing usage_hint new a736122f5 os: fix BigReq ignoring when another request is pending new 92f41213e Merge branch 'uli42-pr/fix_broken_cursor_handling' into 3.6.x new 61255ac1a Window.c: fix: report correct window on icon window creation new d98eeec02 Screen.c: report both created windows (and with the right name) new 8365ce463 Screen.c: whitespace/formatting fixes new 0e496e5d1 Screen.c: use consistent spacing on pointer references new d9b1272fb Screen.c: more TEST output new 4b19c4975 Clipboard.c: fix wrong variable being printed new 9739c7009 Clipboard.c: Scope improvements new 9cb29cce2 Clipboard.c: more debugging output new d38fb8137 Events.c: add debug output new 2da476a67 Window.c: comment on the purpose of some functions new a25232734 Merge branch 'uli42-pr/various_small_things' into 3.6.x new 39ff69c72 NXmiexpose.c: use upstream miHandleExposures() new 9e051eab0 NXmiexpose.c: use upstream version of miPaintWindows() new af1c4b9b7 NXmiexpose.c: mark NX changes new 6ce9fb5f2 Window.c/NXmiexpose.c: remove hack for certain WM theme new 073c6c17e NXmiexpose.c: drop file altogether new 58cd35745 Merge branch 'uli42-pr/drop_nxmiexpose' into 3.6.x new 3fd7e5f93 Add nxagentExternalClipboardEventTrap new 2972f6af1 Add nxagentSetSelectionCallback new 09ba97b2d NXdispatch.c: Use Callback instead of a modified function new 848dee5c4 NXdispatch.c: use upstream version of ProcSetSelectionOwner new c0754a357 Merge branch 'uli42-pr/use_selection_callback' into 3.6.x new a765857aa Remove the Must_have_memory hack. new d8f5e647c NXwindow.c: fix compiler warning new a3e0376f9 Window.c: remove leftover (commented) code new 9f5ddede9 Window.c: Drop defines CWParent and CWStackingOrder new 28e42b3bd mi: Hush an almost certainly bogus warning new b961e190b miwindow.c: add hint to Red Hat Bugzilla + fix new 3900ba3f8 NXshm.c: remove left-overs from patch new 1a8de6352 dix/window.c: fix compiler warning new 1bfafc127 Window.c: add missing comment about nxagentConfiguredWindowList new 2b25eb3d2 Pixmap.c: fix comment phrasing/spelling new 6d00a387f Rootless.c: improve TEST/WARN/DEBUG outout new 308824ba9 xkb: initialize tsyms new 0f8dbbab2 Screen.c: correctly free stuff in nxagentCloseScreen new 3b06ad51d Screen.c: Fix: make sure RRCloseScreen is being called new 340de78e2 Keyboard.c: nullify freed pointers new ca741177e CloseDevice: call XkbRemoveResourceClient before freeing key class struct new 4dd1f3cbd Fix memleaks: Free devPrivates of devices on shutdown new 756442226 Screen.c: fix another memory leak new 5cb497146 mi/miinitext.c: fix memleaks: remove (double) glx initialization new 17d5e62ba Events.c: use designated initializer in nxagentDeactivatePointerGrab new 7e12c9ba5 Extension.c: code simplifications new b5eb7c76e Screen.c: more debug output new bffdacc48 glxext.c: fix another memory leak new cb508b263 various scope improvements new 8205db425 Font.c: code simplifications new 234be0245 glyph.c: fix a read beyond end of heap buffer new 6da106610 Keyboard.c: fix three memory leaks new 6f954bb7d Quarks.c: add missing ) new f55402572 dix/dispatch: fix a small memory leak new 9f9b790f8 fb: fix memory leak in fbOverlayFinishScreenInit new 78eff73e4 render: Propagate allocation failure from createSourcePicture() new e63d9de45 NXrender: fix another memleak new 213e63eed Screen.c: fix two memleaks new bb08043a6 Screen.c: fix two more memleaks of visuals new 528e1e4ef NXpicture.c: code simplification new 3c0469971 os/access.c: add missing } new fd7e1f989 Keyboard.c: rearrange code to make cppcheck happy new b4d3dc5bf NXdixfonts.c: fix index out of bounds new d48824195 compext/Png.c: late image_index allocation new e440e722d compext/Png.c: simplify srcBuf allocation new 956caeb8a compext/Png.c: Nullify after free new c8520ac0a mi/miexpose.c: add missing free() new 56dcc8a4b xkb: remove oldState from XkbHandleActions. new 4962c5a8d XKB: Remove a bunch of mad ifdefs new 2070891cb xkbEvents.c: Fix "warning: unused variable `s'". new 054e906f6 xkb: Use snprintf to measure string lengths instead of manual strlen math new 813acdd2d xkb: Silence some compiler warnings new 31c3d27ea xkmread.c: fix compiler warning new 5be6d271b xkb: fix what looks to be a copy-paste error with first vs firstMM new 2bb498a4c Keyboard.c: fix another cppcheck finding new 364035c00 Keyboard.c: use existing define instead of hardcoced value new b91b3d807 record/set.c: silence cpp finding new c8a5e33fc Suppress false positives in static analysis new abf374136 Merge branch 'uli42-pr/various' into 3.6.x new 3aabc92cf rework xkb device private handling new 4a440feaf Merge branch 'uli42-pr/fix_xkb_privates' into 3.6.x new fba18967f TravisCI: move from gcc 8.x to gcc 9.x new 1ffe92a6f TravisCI: Print compiler version currently used new 5858ebc6d Merge branch 'mjtrangoni-add-gcc-9' into 3.6.x new ca54fabed Window.c: add some comments about fullscreen handling new c190fd187 Window.c: rearrange code regarding window decorations sizes new d32706888 Screen.c: add nxagentIsParentOf helper new 6657b8cc8 nxagentMaximizeToFullScreen: only reparent if necessary new ea571387b Screen.c: simplify nxagentMinimizeFromFullscreen new d487d5879 Consistently use None instead of 0 for nxagentIconWindow everywhere new 032ed3511 Screen.c: use XlibWindow so silence the compiler new 1ebf78519 Merge branch 'uli42-pr/fix_fullscreen' into 3.6.x new 6bdf9c2fa Drop Ipaq support new 738686685 drop onscreen keyboard support new c2ca013fb Merge branch 'uli42-pr/drop_ipaq' into 3.6.x new 360cb5dd9 release 3.5.99.21 new c260ae425 Events.c: refactor nxagentHandleKeypress new b3d41485d Events.c: add more comments and TEST output new ceeb53f0c Keystroke.c: fix wrong return code new 7f4b50deb Merge branch 'uli42-pr/no_keystroke_passthrough' into 3.6.x new 62573abf0 nxagent: simplify nxagentWaitEvents() new f24767b3c Merge branch 'uli42-pr/improve_wait_events' into 3.6.x new d7d205c0d nxagent: fix main window being garbled without inner windows new c610d706b NXwindow.c: simplify window background code new a539aaa6a dix: add whiteroot flag new 470e0bd4d Splash.c: do not wait in nxagent mode new 3c92d8897 Splash.c: drop return code of nxagentShowSplashWindow new 612cbcc43 Splash.c: code cleanup new be508a447 Splash.c: nxagentRemoveSplashWindow: drop unused parameter new 8fcaafab4 nxagent: drop nxagentRootTileWindow new afebb8211 Splash.c: remove global variables for colors new 074821a84 Splash.c: make Splash logo work with white background (-wr) mode, too new 798a053b4 Splash.c: move some variables to Splash.c new 24f392c4a nxagent: rename nxagentWMStart to nxagentReadyAtom new 2228513a6 nxagent: drop NXAGENT_SPLASH new b04b58bad nxagent: add NXAGENT_ONSTART where missing new ab8015237 nxagent: move nxagentWMPassed to Splash.c new c34d1b201 NXdispatch.c: drop currentDispatch variable new 3563959c0 NXdispatch.c: move nxagentWMtimeout into the function new 8b15d574b Merge branch 'uli42-pr/fix_background' into 3.6.x new 1330167fa Utils.h: add SAFE_free macro new b8411180e Display.c: safe some lines by calling SAFE_XFree and SAFE_free new ebc2ea79f Events.c: safe some lines by calling SAFE_XFree new d8012d2a8 Screen.c: safe some lines by calling SAFE_XFree new a4700c9d0 Font.c: use SAFE_XFree and SAFE_free new 4a826d30f Rootless.c: use SAFE_free and SAFE_XFree new d0a6c98cb Window.c: use SAFE_free and SAFE_XFree new 156533439 Cursor.c: use SAFE_XFree new fd4fa4e96 Keyboard.c: use SAFE_XFree and SAFE_free new 34bd0942b Reconnect.c: use SAFE_free new 8b74ff1c1 Pixmap.c: use SAFE_free new 458538010 Render.c: use SAFE_free new dde4e7636 Image.c: use SAFE_free new 122fbd3e1 Error.c: use SAFE_free new 633d04097 Args.c: use SAFE_free new 43e300ecd Colormap.c: use SAFE_free new a9819436d Drawable.c: use SAFE_free new 6378d5ade GC.c: use SAFE_free new 8080ad26a GCOps.c: use SAFE_free new 7d25771da Keystroke.c: use SAFE_free new 4421f787d Atoms.c: use SAFE_XFree and SAFE_free macros new 504b1400e Clipboard.c: use SAFE_free new e7451477e Events.c: refactor nxagentHandleKeypress new bcbf25510 Events.c: add more comments and TEST output new 1d32e5368 Keystroke.c: fix wrong return code new 17495dd6a nxagent: simplify nxagentWaitEvents() new d3869aa53 nxagent: fix main window being garbled without inner windows new 817c3c6fc NXwindow.c: simplify window background code new 8eeaa40b1 dix: add whiteroot flag new 9cd602b27 Splash.c: do not wait in nxagent mode new 208e58fb7 Splash.c: drop return code of nxagentShowSplashWindow new 48c43c837 Splash.c: code cleanup new bfb4e9ac9 Splash.c: nxagentRemoveSplashWindow: drop unused parameter new e12983a67 nxagent: drop nxagentRootTileWindow new 41bfed975 Splash.c: remove global variables for colors new 5bb5adc8a Splash.c: make Splash logo work with white background (-wr) mode, too new bd002ffc5 Splash.c: move some variables to Splash.c new 784846317 nxagent: rename nxagentWMStart to nxagentReadyAtom new 0f5e873dc nxagent: drop NXAGENT_SPLASH new db4c220b2 nxagent: add NXAGENT_ONSTART where missing new 60a3c9b0a nxagent: move nxagentWMPassed to Splash.c new 4202d5094 NXdispatch.c: drop currentDispatch variable new f39b81d31 NXdispatch.c: move nxagentWMtimeout into the function new 6f80a06fb Merge branch 'uli42-pr/safe_free' into 3.6.x new a7abd45a8 Screen.c: initialize RandR only on startup... new daa50fd80 Merge branch 'uli42-pr/fix_double_free' into 3.6.x new 58183b7ce nxagent: Add autograb mode. new 8bf3429bc nxagent: Make autograb an nxagentOption. new 4eaedd002 Args.c: Add command line option -autograb. new ebfd8742c Args.c: make autograb available via options file, too. new 6dcdc578f Events.c: improve debugging output for FocusIn/Out new a4d7a04c4 Events.c: do not ungrab keyboard on LeaveNotify when in autograb mode new 03aa5d743 Events.c: Autograb only for windowed modes new 14d8e0a2a Dialog.c: Add NXTransDialog() call for autograb toggling. new 063813d35 Make AutoGrab work in more situations new 6181aa911 Events.c: introduce separate debug level for autograb debugging only new 6bca289af Merge branch 'uli42-gh-sunweaver/pr/autograb-without-inputlock' into 3.6.x new 1b967c701 debian/control: Split-out nxdialog bin:pkg. new e428e39de debian/{nxagent,nxdialog}.install: Move nxdialog files from nxagent.install to nxdialog.install. new 7d07442d7 debian/copyright: Update copyright attributions. new 57d3a42c2 release 3.5.99.22 The 219 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: .travis.yml | 43 +- ChangeLog | 1403 ++++++++++++++++- Makefile | 15 + VERSION | 2 +- debian/changelog | 35 + debian/control | 24 +- debian/copyright | 59 +- debian/copyright.in | 9 - debian/libnx-x11-6.symbols | 6 +- debian/nx-x11proto-xext-dev.install | 1 - debian/nxdialog.install | 2 + debian/patches/2003_nxdialog-use-python3.patch | 11 + debian/patches/series | 1 + doc/nxagent/README.keystrokes | 39 +- etc/keystrokes.cfg | 14 +- m4/ax_cxx_compile_stdcxx.m4 | 45 +- m4/ax_pthread.m4 | 42 +- nx-X11/config/cf/Imake.tmpl | 5 + nx-X11/config/cf/gnu.cf | 2 +- nx-X11/config/cf/host.def | 6 +- nx-X11/config/cf/linux.cf | 32 +- nx-X11/extras/Mesa_6.4.2/progs/images/bw.rgb | Bin 206452 -> 206452 bytes nx-X11/include/extensions/Imakefile | 2 +- nx-X11/include/extensions/xtestext1.h | 325 ---- nx-X11/lib/configure.ac | 36 +- nx-X11/lib/include/X11/Xlibint.h | 18 +- nx-X11/lib/src/ConnDis.c | 2 +- nx-X11/lib/src/Quarks.c | 2 +- nx-X11/lib/src/XlibInt.c | 12 +- nx-X11/lib/src/xkb/XKBBind.c | 16 +- nx-X11/programs/Xserver/GL/glx/glxcmds.c | 4 +- nx-X11/programs/Xserver/GL/glx/glxext.c | 4 +- nx-X11/programs/Xserver/Imakefile | 5 +- nx-X11/programs/Xserver/Xext/Imakefile | 6 +- nx-X11/programs/Xserver/Xext/sync.c | 2 +- nx-X11/programs/Xserver/Xext/xtest1dd.c | 1612 -------------------- nx-X11/programs/Xserver/Xext/xtest1dd.h | 126 -- nx-X11/programs/Xserver/Xext/xtest1di.c | 915 ----------- nx-X11/programs/Xserver/Xi/chgkbd.c | 2 - nx-X11/programs/Xserver/damageext/Imakefile | 4 +- nx-X11/programs/Xserver/damageext/damageext.c | 10 +- nx-X11/programs/Xserver/dbe/dbe.c | 34 +- nx-X11/programs/Xserver/dix/devices.c | 18 +- nx-X11/programs/Xserver/dix/dispatch.c | 16 +- nx-X11/programs/Xserver/dix/events.c | 29 +- nx-X11/programs/Xserver/dix/window.c | 2 - nx-X11/programs/Xserver/fb/fbblt.c | 56 +- nx-X11/programs/Xserver/fb/fboverlay.c | 8 +- nx-X11/programs/Xserver/hw/nxagent/Args.c | 71 +- nx-X11/programs/Xserver/hw/nxagent/Args.h | 1 - nx-X11/programs/Xserver/hw/nxagent/Atoms.c | 16 +- nx-X11/programs/Xserver/hw/nxagent/Client.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 99 +- nx-X11/programs/Xserver/hw/nxagent/Colormap.c | 21 +- nx-X11/programs/Xserver/hw/nxagent/Cursor.c | 7 +- nx-X11/programs/Xserver/hw/nxagent/Dialog.c | 50 + nx-X11/programs/Xserver/hw/nxagent/Dialog.h | 30 + nx-X11/programs/Xserver/hw/nxagent/Display.c | 85 +- nx-X11/programs/Xserver/hw/nxagent/Drawable.c | 11 +- nx-X11/programs/Xserver/hw/nxagent/Error.c | 13 +- nx-X11/programs/Xserver/hw/nxagent/Events.c | 447 +++--- nx-X11/programs/Xserver/hw/nxagent/Events.h | 6 +- nx-X11/programs/Xserver/hw/nxagent/Extensions.c | 92 +- nx-X11/programs/Xserver/hw/nxagent/Font.c | 355 ++--- nx-X11/programs/Xserver/hw/nxagent/GC.c | 18 +- nx-X11/programs/Xserver/hw/nxagent/GCOps.c | 7 +- nx-X11/programs/Xserver/hw/nxagent/Handlers.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Image.c | 27 +- nx-X11/programs/Xserver/hw/nxagent/Imakefile | 6 +- nx-X11/programs/Xserver/hw/nxagent/Init.c | 33 +- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 482 +++--- nx-X11/programs/Xserver/hw/nxagent/Keyboard.h | 3 +- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 28 +- nx-X11/programs/Xserver/hw/nxagent/Keystroke.h | 2 + nx-X11/programs/Xserver/hw/nxagent/Millis.c | 13 - nx-X11/programs/Xserver/hw/nxagent/Millis.h | 2 - nx-X11/programs/Xserver/hw/nxagent/NXdamage.c | 20 +- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 181 +-- nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/NXevents.c | 145 +- nx-X11/programs/Xserver/hw/nxagent/NXglyph.c | 69 +- nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c | 747 --------- nx-X11/programs/Xserver/hw/nxagent/NXpicture.c | 22 +- nx-X11/programs/Xserver/hw/nxagent/NXrender.c | 21 +- nx-X11/programs/Xserver/hw/nxagent/NXshm.c | 6 +- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 85 +- nx-X11/programs/Xserver/hw/nxagent/Options.c | 2 + nx-X11/programs/Xserver/hw/nxagent/Options.h | 9 +- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 35 +- nx-X11/programs/Xserver/hw/nxagent/Pointer.c | 3 +- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 43 +- nx-X11/programs/Xserver/hw/nxagent/Render.c | 5 +- nx-X11/programs/Xserver/hw/nxagent/Rootless.c | 125 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 475 +++--- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 135 +- nx-X11/programs/Xserver/hw/nxagent/Splash.h | 13 +- nx-X11/programs/Xserver/hw/nxagent/Split.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/TestExt.c | 91 -- nx-X11/programs/Xserver/hw/nxagent/Trap.c | 8 + nx-X11/programs/Xserver/hw/nxagent/Trap.h | 8 + nx-X11/programs/Xserver/hw/nxagent/Utils.h | 1 + nx-X11/programs/Xserver/hw/nxagent/Window.c | 433 +++--- nx-X11/programs/Xserver/hw/nxagent/Windows.h | 3 - nx-X11/programs/Xserver/hw/nxagent/compext/Png.c | 82 +- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 153 +- nx-X11/programs/Xserver/include/dixstruct.h | 8 - nx-X11/programs/Xserver/include/globals.h | 1 - nx-X11/programs/Xserver/mi/Imakefile | 13 +- nx-X11/programs/Xserver/mi/micursor.c | 12 +- nx-X11/programs/Xserver/mi/miexpose.c | 15 +- nx-X11/programs/Xserver/mi/migc.c | 6 +- nx-X11/programs/Xserver/mi/miinitext.c | 11 +- nx-X11/programs/Xserver/mi/miwindow.c | 1 + nx-X11/programs/Xserver/os/WaitFor.c | 20 +- nx-X11/programs/Xserver/os/access.c | 1 + nx-X11/programs/Xserver/os/io.c | 2 - nx-X11/programs/Xserver/os/utils.c | 5 +- nx-X11/programs/Xserver/randr/rrdispatch.c | 4 - nx-X11/programs/Xserver/record/record.c | 35 +- nx-X11/programs/Xserver/record/set.c | 3 +- nx-X11/programs/Xserver/render/glyph.c | 5 +- nx-X11/programs/Xserver/render/picture.c | 2 + nx-X11/programs/Xserver/render/render.c | 18 +- nx-X11/programs/Xserver/xfixes/cursor.c | 24 +- nx-X11/programs/Xserver/xfixes/region.c | 4 +- nx-X11/programs/Xserver/xfixes/xfixes.c | 11 +- nx-X11/programs/Xserver/xkb/XKBGAlloc.c | 19 +- nx-X11/programs/Xserver/xkb/XKBMAlloc.c | 4 +- nx-X11/programs/Xserver/xkb/XKBMisc.c | 5 +- nx-X11/programs/Xserver/xkb/ddxBeep.c | 4 - nx-X11/programs/Xserver/xkb/ddxCtrls.c | 23 - nx-X11/programs/Xserver/xkb/ddxList.c | 13 +- nx-X11/programs/Xserver/xkb/ddxLoad.c | 103 +- nx-X11/programs/Xserver/xkb/maprules.c | 89 +- nx-X11/programs/Xserver/xkb/xkb.c | 22 +- nx-X11/programs/Xserver/xkb/xkbAccessX.c | 8 +- nx-X11/programs/Xserver/xkb/xkbActions.c | 20 +- nx-X11/programs/Xserver/xkb/xkbEvents.c | 37 +- nx-X11/programs/Xserver/xkb/xkbInit.c | 17 +- nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c | 4 +- nx-X11/programs/Xserver/xkb/xkbUtils.c | 16 +- nx-X11/programs/Xserver/xkb/xkmread.c | 20 +- nx-libs.spec | 9 +- nxcomp/src/ChannelEndPoint.cpp | 6 +- nxcomp/src/GenericReply.h | 1 - nxcomp/src/Loop.cpp | 4 + nxcomp/src/Makefile.am | 6 +- nxcomp/src/Misc.cpp | 7 +- nxcomp/src/Timestamp.cpp | 1 - nxcomp/src/TranslateCoords.h | 8 +- nxcompshad/src/Logger.h | 15 +- nxcompshad/src/X11.h | 4 - {nxproxy => nxdialog}/Makefile.am | 5 +- nxdialog/README.md | 23 + {nxcomp => nxdialog}/VERSION | 0 nxdialog/bin/Makefile.am | 3 + nxdialog/bin/nxdialog | 395 +++++ nxdialog/configure.ac | 22 + .../composite/.gitignore => nxdialog/m4/.keep | 0 {nxproxy => nxdialog}/man/Makefile.am | 2 +- nxdialog/man/nxdialog.1 | 72 + nxproxy/configure.ac | 11 - nxproxy/m4/ax_pthread.m4 | 1 - nxproxy/man/nxproxy.1 | 2 +- nxproxy/src/Makefile.am | 3 - roll-tarballs.sh | 5 +- run-static-analysis.sh | 4 +- static-analysis-suppressions | 26 + 168 files changed, 4810 insertions(+), 6347 deletions(-) create mode 100644 debian/nxdialog.install create mode 100644 debian/patches/2003_nxdialog-use-python3.patch delete mode 100644 nx-X11/include/extensions/xtestext1.h delete mode 100644 nx-X11/programs/Xserver/Xext/xtest1dd.c delete mode 100644 nx-X11/programs/Xserver/Xext/xtest1dd.h delete mode 100644 nx-X11/programs/Xserver/Xext/xtest1di.c delete mode 100644 nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c delete mode 100644 nx-X11/programs/Xserver/hw/nxagent/TestExt.c copy {nxproxy => nxdialog}/Makefile.am (88%) create mode 100644 nxdialog/README.md copy {nxcomp => nxdialog}/VERSION (100%) create mode 100644 nxdialog/bin/Makefile.am create mode 100755 nxdialog/bin/nxdialog create mode 100644 nxdialog/configure.ac copy nx-X11/programs/Xserver/composite/.gitignore => nxdialog/m4/.keep (100%) copy {nxproxy => nxdialog}/man/Makefile.am (66%) create mode 100644 nxdialog/man/nxdialog.1 delete mode 120000 nxproxy/m4/ax_pthread.m4 create mode 100644 static-analysis-suppressions -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit ee82317b5867cda52e7ba89a8af6958293ab949c Author: Mario Trangoni <mjtrangoni@gmail.com> Date: Mon Apr 22 17:26:33 2019 +0200 travis.yml: Update clang 7.0 => 8.0 Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com> --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 108e9bc91..ef3f9fcc8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,10 +89,10 @@ matrix: addons: apt: sources: - - llvm-toolchain-xenial-7 + - llvm-toolchain-xenial-8 - ubuntu-toolchain-r-test packages: - - clang-7 + - clang-8 # imake - xutils-dev # X11 libaries @@ -109,7 +109,7 @@ matrix: - x11-xkb-utils env: - - MATRIX_EVAL="CC=clang-7 && CXX=clang++-7" + - MATRIX_EVAL="CC=clang-8 && CXX=clang++-8" - STATIC_ANALYSIS="no" before_install: -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 3c9ee1ff7bc78d91b28eb52f8d15b4f3bf514be1 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 8 23:21:30 2019 +0200 nxagent: Determine nxagentProgName only once also add TEST prints, init nxagentProgName with NULL and add const where it was missing. Fixes ArcticaProject/nx-libs#803 --- nx-X11/programs/Xserver/hw/nxagent/Args.c | 28 +++++++++++++++++++++------- nx-X11/programs/Xserver/hw/nxagent/Init.c | 7 ++++++- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 949892f25..607dab9bf 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -126,7 +126,7 @@ extern int _XGetBitsPerPixel(Display *dpy, int depth); extern char dispatchExceptionAtReset; -char *nxagentProgName; +const char *nxagentProgName = NULL; char nxagentDisplayName[NXAGENTDISPLAYNAMELENGTH]; Bool nxagentSynchronize = False; @@ -186,17 +186,31 @@ char *nxagentKeystrokeFile = NULL; int ddxProcessArgument(int argc, char *argv[], int i) { /* - * Ensure that the options are set to their defaults. + * The flavour can never change, so only set it once. + * + * FIXME: ddxProcessArgument() is called once for every command line + * argument, with argv[0] being the argument and not the program + * name! We should move this check somewhere else. */ + if (nxagentProgName == NULL) + { + char *basec = strdup(argv[0]); + nxagentProgName = strdup(basename(basec)); + free(basec); - char *basec = strdup(argv[0]); - nxagentProgName = strdup(basename(basec)); - free(basec); + /* + * Check if we are running as X2Go Agent + */ + checkX2goAgent(); + } + + #ifdef TEST + fprintf(stderr, "%s: argv[0] [%s] nxagentProgName [%s]\n", __func__, argv[0], nxagentProgName); + #endif /* - * Check if we running as X2Go Agent + * Ensure that the options are set to their defaults. */ - checkX2goAgent(); static Bool resetOptions = True; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index d95c4b70f..d02af3f8d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -194,7 +194,12 @@ int nxagentX2go; void checkX2goAgent(void) { - extern char *nxagentProgName; + extern const char *nxagentProgName; + + #ifdef TEST + fprintf(stderr, "%s: nxagentProgName [%s]\n", __func__, nxagentProgName); + #endif + if( strcasecmp(nxagentProgName,"x2goagent") == 0) { fprintf(stderr, "\nrunning as X2Go Agent\n"); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 4ce890758035078bb1ca133cc4584ca02db8ad6d Merge: c9cac948f ee82317b5 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Apr 23 08:42:43 2019 +0200 Merge branch 'mjtrangoni-update-clang-8' into 3.6.x Attributes GH PR #794: https://github.com/ArcticaProject/nx-libs/pull/794 .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit f6177d2adb9540134bf7e760fd7df4599e98a713 Merge: d94e9ba24 453edbd21 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri May 10 16:37:20 2019 +0200 Merge branch 'uli42-pr/short_font_code' into 3.6.x Attributes GH PR #795: https://github.com/ArcticaProject/nx-libs/pull/795 Makefile | 5 + nx-X11/config/cf/Imake.tmpl | 5 + nx-X11/config/cf/host.def | 6 +- nx-X11/programs/Xserver/hw/nxagent/Font.c | 216 +++++++++++---------------- nx-X11/programs/Xserver/hw/nxagent/Imakefile | 1 + 5 files changed, 105 insertions(+), 128 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit bcb5c7962ae18d36205e4fa0b578ca9e95559859 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Apr 23 18:34:04 2019 +0200 Drop Speedo font support Has been obsoleted in 2005, see https://en.wikipedia.org/wiki/Bitstream_Speedo_Fonts --- nx-X11/config/cf/host.def | 6 +++--- nx-X11/programs/Xserver/hw/nxagent/Font.c | 12 ++++-------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def index 1360331be..2df1cd672 100644 --- a/nx-X11/config/cf/host.def +++ b/nx-X11/config/cf/host.def @@ -156,15 +156,15 @@ * this by default as NX intaller carries only misc and TTF in the * basic set of fonts installed under Windows. * -#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/ +#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Type1/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/ */ #if defined(LinuxArchitecture) || defined(SunArchitecture) || defined(FreeBSDArchitecture) -#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/,$(FONTDIR)/TTF/ +#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Type1/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/,$(FONTDIR)/TTF/ #endif /* #if defined(LinuxArchitecture) || defined(SunArchitecture) */ #if defined(cygwinArchitecture) -#define DefaultFontPath /mnt/NX/fonts/base/,/mnt/NX/fonts/misc/,/mnt/NX/fonts/Speedo/,/mnt/NX/fonts/Type1/,/mnt/NX/fonts/75dpi/,/mnt/NX/fonts/100dpi/,/mnt/NX/fonts/TTF/ +#define DefaultFontPath /mnt/NX/fonts/base/,/mnt/NX/fonts/misc/,/mnt/NX/fonts/Type1/,/mnt/NX/fonts/75dpi/,/mnt/NX/fonts/100dpi/,/mnt/NX/fonts/TTF/ #endif /* #if defined(cygwinArchitecture) */ /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index f967f82f0..23fcfe8d5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -77,23 +77,19 @@ is" without express or implied warranty. #define NXAGENT_ALTERNATE_FONT_DIR_3 "/usr/X11R6/lib/X11/fonts" #define NXAGENT_DEFAULT_FONT_PATH \ -"/usr/share/nx/fonts/misc/,/usr/share/nx/fonts/Speedo/,\ -/usr/share/nx/fonts/Type1/,/usr/share/nx/fonts/75dpi/,\ +"/usr/share/nx/fonts/Type1/,/usr/share/nx/fonts/75dpi/,\ /usr/share/nx/fonts/100dpi/,/usr/share/nx/fonts/TTF/" #define NXAGENT_ALTERNATE_FONT_PATH \ -"/usr/share/X11/fonts/misc/,/usr/share/X11/fonts/Speedo/,\ -/usr/share/X11/fonts/Type1/,/usr/share/X11/fonts/75dpi/,\ +"/usr/share/X11/fonts/Type1/,/usr/share/X11/fonts/75dpi/,\ /usr/share/X11/fonts/100dpi/,/usr/share/X11/fonts/TTF/" #define NXAGENT_ALTERNATE_FONT_PATH_2 \ -"/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Speedo/,\ -/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,\ +"/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,\ /usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/TTF/" #define NXAGENT_ALTERNATE_FONT_PATH_3 \ -"/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/Speedo/,\ -/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/75dpi/,\ +"/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/75dpi/,\ /usr/X11R6/lib/X11/fonts/100dpi/,/usr/X11R6/lib/X11/fonts/TTF/" #undef NXAGENT_FONTCACHE_DEBUG -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit dff2e0a01fd9f2c2aa46a4a68ea2db6ece5878f7 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Apr 3 22:33:33 2019 +0200 Font.c: factor out font checks --- nx-X11/programs/Xserver/hw/nxagent/Font.c | 132 +++++++++--------------------- 1 file changed, 37 insertions(+), 95 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 57909d7fc..f967f82f0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -1443,128 +1443,68 @@ static Bool nxagentGetFontServerPath(char * fontServerPath, int size) return True; } -void nxagentVerifyDefaultFontPath(void) +void nxagentVerifySingleFontPath(char **dest, const char *fontDir, const char *fontPath) { struct stat dirStat; - static char *fontPath; - - #ifdef TEST - fprintf(stderr, "nxagentVerifyDefaultFontPath: Going to search for one or more valid font paths.\n"); - #endif - - /* - * Set the default font path as the first choice. - */ - - if ((fontPath = strdup(defaultFontPath)) == NULL) - { - #ifdef WARNING - fprintf(stderr, "nxagentVerifyDefaultFontPath: WARNING! Unable to allocate memory for a new font path. " - "Using the default font path [%s].\n", validateString(defaultFontPath)); - #endif + char * newdest = NULL; + if (!dest || !*dest) return; - } - if (stat(NXAGENT_DEFAULT_FONT_DIR, &dirStat) == 0 && + if (stat(fontDir, &dirStat) == 0 && S_ISDIR(dirStat.st_mode) != 0) { - /* - * Let's use the old "/usr/share/nx/fonts" style. - */ - #ifdef TEST - fprintf(stderr, "nxagentVerifyDefaultFontPath: Assuming fonts in directory [%s].\n", - validateString(NXAGENT_DEFAULT_FONT_DIR)); + fprintf(stderr, "%s: Assuming fonts in directory [%s].\n", __func__, + validateString(fontDir)); #endif - if (*fontPath != '\0') + if (**dest != '\0') { - fontPath = realloc(fontPath, strlen(fontPath) + strlen(NXAGENT_DEFAULT_FONT_PATH) + 2); - strcat(fontPath, ","); + newdest = realloc(*dest, strlen(*dest) + strlen(fontPath) + 2); + if (newdest == NULL) + return; + strcat(newdest, ","); } else { - fontPath = realloc(fontPath, strlen(fontPath) + strlen(NXAGENT_DEFAULT_FONT_PATH) + 1); + newdest = realloc(*dest, strlen(*dest) + strlen(fontPath) + 1); + if (newdest == NULL) + return; } - strcat(fontPath, NXAGENT_DEFAULT_FONT_PATH); + strcat(newdest, fontPath); + *dest = newdest; } +} - if (stat(NXAGENT_ALTERNATE_FONT_DIR, &dirStat) == 0 && - S_ISDIR(dirStat.st_mode) != 0) - { - /* - * Let's use the new "/usr/share/X11/fonts" path. - */ - - #ifdef TEST - fprintf(stderr, "nxagentVerifyDefaultFontPath: Assuming fonts in directory [%s].\n", - validateString(NXAGENT_ALTERNATE_FONT_DIR)); - #endif +void nxagentVerifyDefaultFontPath(void) +{ + static char *fontPath; - if (*fontPath != '\0') - { - fontPath = realloc(fontPath, strlen(fontPath) + strlen(NXAGENT_ALTERNATE_FONT_PATH) + 2); - strcat(fontPath, ","); - } - else - { - fontPath = realloc(fontPath, strlen(fontPath) + strlen(NXAGENT_ALTERNATE_FONT_PATH) + 1); - } + #ifdef TEST + fprintf(stderr, "nxagentVerifyDefaultFontPath: Going to search for one or more valid font paths.\n"); + #endif - strcat(fontPath, NXAGENT_ALTERNATE_FONT_PATH); - } + /* + * Set the default font path as the first choice. + */ - if (stat(NXAGENT_ALTERNATE_FONT_DIR_2, &dirStat) == 0 && - S_ISDIR(dirStat.st_mode) != 0) + if ((fontPath = strdup(defaultFontPath)) == NULL) { - /* - * Let's use the "/usr/share/fonts/X11" path. - */ - - #ifdef TEST - fprintf(stderr, "nxagentVerifyDefaultFontPath: Assuming fonts in directory [%s].\n", - validateString(NXAGENT_ALTERNATE_FONT_DIR_2)); + #ifdef WARNING + fprintf(stderr, "nxagentVerifyDefaultFontPath: WARNING! Unable to allocate memory for a new font path. " + "Using the default font path [%s].\n", validateString(defaultFontPath)); #endif - if (*fontPath != '\0') - { - fontPath = realloc(fontPath, strlen(fontPath) + strlen(NXAGENT_ALTERNATE_FONT_PATH_2) + 2); - strcat(fontPath, ","); - } - else - { - fontPath = realloc(fontPath, strlen(fontPath) + strlen(NXAGENT_ALTERNATE_FONT_PATH_2) + 1); - } - - strcat(fontPath, NXAGENT_ALTERNATE_FONT_PATH_2); + return; } - if (stat(NXAGENT_ALTERNATE_FONT_DIR_3, &dirStat) == 0 && - S_ISDIR(dirStat.st_mode) != 0) - { - /* - * Let's use the "/usr/X11R6/lib/X11/fonts" path. - */ - - #ifdef TEST - fprintf(stderr, "nxagentVerifyDefaultFontPath: Assuming fonts in directory [%s].\n", - validateString(NXAGENT_ALTERNATE_FONT_DIR_3)); - #endif + nxagentVerifySingleFontPath(&fontPath, NXAGENT_DEFAULT_FONT_DIR, NXAGENT_DEFAULT_FONT_PATH); + nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR, NXAGENT_ALTERNATE_FONT_PATH); + nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR_2, NXAGENT_ALTERNATE_FONT_PATH_2); + nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR_3, NXAGENT_ALTERNATE_FONT_PATH_3); - if (*fontPath != '\0') - { - fontPath = realloc(fontPath, strlen(fontPath) + strlen(NXAGENT_ALTERNATE_FONT_PATH_3) + 2); - strcat(fontPath, ","); - } - else - { - fontPath = realloc(fontPath, strlen(fontPath) + strlen(NXAGENT_ALTERNATE_FONT_PATH_3) + 1); - } - - strcat(fontPath, NXAGENT_ALTERNATE_FONT_PATH_3); - } if (*fontPath == '\0') { #ifdef WARNING @@ -1576,6 +1516,8 @@ void nxagentVerifyDefaultFontPath(void) } else { + /* do _not_ free defaultFontPath here - it's either set at compile time or + part of argv */ defaultFontPath = fontPath; #ifdef TEST -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit d94e9ba24b6b02c44d0c8086631d9cddd01c952a Merge: 4ce890758 3c9ee1ff7 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri May 10 16:10:46 2019 +0200 Merge branch 'uli42-pr/fix_flavour_change' into 3.6.x Attributes GH PR #804: https://github.com/ArcticaProject/nx-libs/pull/804 nx-X11/programs/Xserver/hw/nxagent/Args.c | 28 +++++++++++++++++++++------- nx-X11/programs/Xserver/hw/nxagent/Init.c | 7 ++++++- 2 files changed, 27 insertions(+), 8 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 8029141e772568872e668cfb1df9b5a7968d2236 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Apr 23 19:19:04 2019 +0200 Font.c: build the font paths at runtime Drop the font path defines and build the path strings at runtime instead. --- nx-X11/programs/Xserver/hw/nxagent/Font.c | 67 ++++++++++++++++--------------- 1 file changed, 34 insertions(+), 33 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 23fcfe8d5..8c1cb7269 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -76,21 +76,13 @@ is" without express or implied warranty. #define NXAGENT_ALTERNATE_FONT_DIR_2 "/usr/share/fonts/X11" #define NXAGENT_ALTERNATE_FONT_DIR_3 "/usr/X11R6/lib/X11/fonts" -#define NXAGENT_DEFAULT_FONT_PATH \ -"/usr/share/nx/fonts/Type1/,/usr/share/nx/fonts/75dpi/,\ -/usr/share/nx/fonts/100dpi/,/usr/share/nx/fonts/TTF/" - -#define NXAGENT_ALTERNATE_FONT_PATH \ -"/usr/share/X11/fonts/Type1/,/usr/share/X11/fonts/75dpi/,\ -/usr/share/X11/fonts/100dpi/,/usr/share/X11/fonts/TTF/" - -#define NXAGENT_ALTERNATE_FONT_PATH_2 \ -"/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,\ -/usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/TTF/" - -#define NXAGENT_ALTERNATE_FONT_PATH_3 \ -"/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/75dpi/,\ -/usr/X11R6/lib/X11/fonts/100dpi/,/usr/X11R6/lib/X11/fonts/TTF/" +const char * nxagentFontSubdirs[] = { + "Type1", + "75dpi", + "100dpi", + "TTF", + NULL +}; #undef NXAGENT_FONTCACHE_DEBUG #undef NXAGENT_RECONNECT_FONT_DEBUG @@ -1439,10 +1431,9 @@ static Bool nxagentGetFontServerPath(char * fontServerPath, int size) return True; } -void nxagentVerifySingleFontPath(char **dest, const char *fontDir, const char *fontPath) +void nxagentVerifySingleFontPath(char **dest, const char *fontDir) { struct stat dirStat; - char * newdest = NULL; if (!dest || !*dest) return; @@ -1455,22 +1446,32 @@ void nxagentVerifySingleFontPath(char **dest, const char *fontDir, const char *f validateString(fontDir)); #endif - if (**dest != '\0') + for (int i = 0; ; i++) { - newdest = realloc(*dest, strlen(*dest) + strlen(fontPath) + 2); - if (newdest == NULL) + char *tmppath = NULL; + int rc; + + const char *subdir = nxagentFontSubdirs[i]; + + if (subdir == NULL) return; - strcat(newdest, ","); - } - else - { - newdest = realloc(*dest, strlen(*dest) + strlen(fontPath) + 1); - if (newdest == NULL) + + if (**dest != '\0') + { + rc = asprintf(&tmppath, "%s,%s/%s", *dest, fontDir, subdir); + } + else + { + rc = asprintf(&tmppath, "%s/%s", fontDir, subdir); + } + + if (rc == -1) return; - } - strcat(newdest, fontPath); - *dest = newdest; + free(*dest); + *dest = tmppath; + tmppath = NULL; + } } } @@ -1496,10 +1497,10 @@ void nxagentVerifyDefaultFontPath(void) return; } - nxagentVerifySingleFontPath(&fontPath, NXAGENT_DEFAULT_FONT_DIR, NXAGENT_DEFAULT_FONT_PATH); - nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR, NXAGENT_ALTERNATE_FONT_PATH); - nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR_2, NXAGENT_ALTERNATE_FONT_PATH_2); - nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR_3, NXAGENT_ALTERNATE_FONT_PATH_3); + nxagentVerifySingleFontPath(&fontPath, NXAGENT_DEFAULT_FONT_DIR); + nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR); + nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR_2); + nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR_3); if (*fontPath == '\0') { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 898f04e4293ce9cf7fcab810e8b27404cf0b6fde Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Apr 23 19:34:57 2019 +0200 Font.c: Loop over font paths drop defines and use an array instead. This way adding further paths can be done much easier. --- nx-X11/programs/Xserver/hw/nxagent/Font.c | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 6fb6c8f35..d5c9f8982 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -71,10 +71,13 @@ is" without express or implied warranty. #undef TEST #undef DEBUG -#define NXAGENT_DEFAULT_FONT_DIR "/usr/share/nx/fonts" -#define NXAGENT_ALTERNATE_FONT_DIR "/usr/share/X11/fonts" -#define NXAGENT_ALTERNATE_FONT_DIR_2 "/usr/share/fonts/X11" -#define NXAGENT_ALTERNATE_FONT_DIR_3 "/usr/X11R6/lib/X11/fonts" +const char * nxagentFontDirs[] = { + "/usr/share/nx/fonts", + "/usr/share/X11/fonts", + "/usr/share/fonts/X11", + "/usr/X11R6/lib/X11/fonts", + NULL +}; const char * nxagentFontSubdirs[] = { "Type1", @@ -1491,10 +1494,15 @@ void nxagentVerifyDefaultFontPath(void) return; } - nxagentVerifySingleFontPath(&fontPath, NXAGENT_DEFAULT_FONT_DIR); - nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR); - nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR_2); - nxagentVerifySingleFontPath(&fontPath, NXAGENT_ALTERNATE_FONT_DIR_3); + for (int i = 0; ; i++) + { + char *dir = nxagentFontDirs[i]; + + if (dir == NULL) + break; + else + nxagentVerifySingleFontPath(&fontPath, dir); + } if (*fontPath == '\0') { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit dfb5602a662507373321a1b1497311027dafdc93 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Apr 23 19:21:41 2019 +0200 Font.c: Let dix check if a font path exists Dix will only add font paths that are existing on the system. There's no need to check that ourselves. --- nx-X11/programs/Xserver/hw/nxagent/Font.c | 54 ++++++++++++++----------------- 1 file changed, 24 insertions(+), 30 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 8c1cb7269..6fb6c8f35 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -1433,45 +1433,39 @@ static Bool nxagentGetFontServerPath(char * fontServerPath, int size) void nxagentVerifySingleFontPath(char **dest, const char *fontDir) { - struct stat dirStat; - if (!dest || !*dest) return; - if (stat(fontDir, &dirStat) == 0 && - S_ISDIR(dirStat.st_mode) != 0) - { - #ifdef TEST - fprintf(stderr, "%s: Assuming fonts in directory [%s].\n", __func__, - validateString(fontDir)); - #endif + #ifdef TEST + fprintf(stderr, "%s: Assuming fonts in directory [%s].\n", __func__, + validateString(fontDir)); + #endif - for (int i = 0; ; i++) - { - char *tmppath = NULL; - int rc; + for (int i = 0; ; i++) + { + char *tmppath = NULL; + int rc; - const char *subdir = nxagentFontSubdirs[i]; + const char *subdir = nxagentFontSubdirs[i]; - if (subdir == NULL) - return; + if (subdir == NULL) + return; - if (**dest != '\0') - { - rc = asprintf(&tmppath, "%s,%s/%s", *dest, fontDir, subdir); - } - else - { - rc = asprintf(&tmppath, "%s/%s", fontDir, subdir); - } + if (**dest != '\0') + { + rc = asprintf(&tmppath, "%s,%s/%s", *dest, fontDir, subdir); + } + else + { + rc = asprintf(&tmppath, "%s/%s", fontDir, subdir); + } - if (rc == -1) - return; + if (rc == -1) + return; - free(*dest); - *dest = tmppath; - tmppath = NULL; - } + free(*dest); + *dest = tmppath; + tmppath = NULL; } } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 0086b8c2469fbf19a337f38f5431bd77da045332 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Apr 23 20:08:57 2019 +0200 Font.c: Avoid duplicate font paths --- nx-X11/programs/Xserver/hw/nxagent/Font.c | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 89128d4c1..11496938c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -1497,12 +1497,36 @@ void nxagentVerifyDefaultFontPath(void) for (int i = 0; ; i++) { - char *dir = nxagentFontDirs[i]; + int j; + const char *dir = nxagentFontDirs[i]; if (dir == NULL) + { break; + } else - nxagentVerifySingleFontPath(&fontPath, dir); + { + for (j = 0; j <= i; j++) + { + //if (strcmp(nxagentFontDirs[j], dir) == 0) + if (nxagentFontDirs[j] == dir) + { + break; + } + } + + if (j == i) + { + nxagentVerifySingleFontPath(&fontPath, dir); + } +#ifdef TEST + else + { + fprintf(stderr, "%s: Skipping duplicate font dir [%s].\n", __func__, + validateString(dir)); + } +#endif + } } if (*fontPath == '\0') -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 453edbd21032ed51bba08e7368ed3ee5c45430d3 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Apr 23 20:09:25 2019 +0200 Font.c: use __func__ in TEST prints --- nx-X11/programs/Xserver/hw/nxagent/Font.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 11496938c..8de50fdc3 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -703,7 +703,7 @@ Bool nxagentUnrealizeFont(ScreenPtr pScreen, FontPtr pFont) int nxagentDestroyNewFontResourceType(void * p, XID id) { #ifdef TEST - fprintf(stderr, "nxagentDestroyNewFontResourceType: Destroying mirror id [%ld] for font at [%p].\n", + fprintf(stderr, "%s: Destroying mirror id [%ld] for font at [%p].\n", __func__, nxagentFontPriv((FontPtr) p) -> mirrorID, (void *) p); #endif @@ -1410,14 +1410,14 @@ static Bool nxagentGetFontServerPath(char * fontServerPath, int size) snprintf(fontServerPath, min(size, len + 1), "%s", path + 1); #ifdef TEST - fprintf(stderr, "nxagentGetFontServerPath: Got path [%s].\n", + fprintf(stderr, "%s: Got path [%s].\n", __func__, fontServerPath); #endif } else { #ifdef TEST - fprintf(stderr, "nxagentGetFontServerPath: WARNING! Font server tunneling not enabled.\n"); + fprintf(stderr, "%s: WARNING! Font server tunneling not enabled.\n", __func__); #endif return False; @@ -1426,7 +1426,7 @@ static Bool nxagentGetFontServerPath(char * fontServerPath, int size) else { #ifdef TEST - fprintf(stderr, "nxagentGetFontServerPath: WARNING! Failed to get path for font server tunneling.\n"); + fprintf(stderr, "%s: WARNING! Failed to get path for font server tunneling.\n", __func__); #endif return False; @@ -1478,7 +1478,7 @@ void nxagentVerifyDefaultFontPath(void) static char *fontPath; #ifdef TEST - fprintf(stderr, "nxagentVerifyDefaultFontPath: Going to search for one or more valid font paths.\n"); + fprintf(stderr, "%s: Going to search for one or more valid font paths.\n", __func__); #endif /* @@ -1488,8 +1488,9 @@ void nxagentVerifyDefaultFontPath(void) if ((fontPath = strdup(defaultFontPath)) == NULL) { #ifdef WARNING - fprintf(stderr, "nxagentVerifyDefaultFontPath: WARNING! Unable to allocate memory for a new font path. " - "Using the default font path [%s].\n", validateString(defaultFontPath)); + fprintf(stderr, "%s: WARNING! Unable to allocate memory for a new font path. " + "Using the default font path [%s].\n", __func__, + validateString(defaultFontPath)); #endif return; @@ -1529,13 +1530,12 @@ void nxagentVerifyDefaultFontPath(void) } } - if (*fontPath == '\0') + if (*fontPath == '\0') { #ifdef WARNING - fprintf(stderr, "nxagentVerifyDefaultFontPath: WARNING! Can't find a valid font directory.\n"); - - fprintf(stderr, "nxagentVerifyDefaultFontPath: WARNING! Using font path [%s].\n", - validateString(defaultFontPath)); + fprintf(stderr, "%s: WARNING! Can't find a valid font directory.\n", __func__); + fprintf(stderr, "%s: WARNING! Using font path [%s].\n", __func__, + validateString(defaultFontPath)); #endif } else @@ -1543,10 +1543,10 @@ void nxagentVerifyDefaultFontPath(void) /* do _not_ free defaultFontPath here - it's either set at compile time or part of argv */ defaultFontPath = fontPath; - + #ifdef TEST - fprintf(stderr, "nxagentVerifyDefaultFontPath: Using font path [%s].\n", - validateString(defaultFontPath)); + fprintf(stderr, "%s: Using font path [%s].\n", __func__, + validateString(defaultFontPath)); #endif } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 78a16245a4bbf13acf53768064d81cbaa28c0d8b Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Apr 23 18:22:45 2019 +0200 auto-determine system font path and add to list of font paths This will help on non-supported platforms as it will add a path the current code might not be aware of. --- Makefile | 5 +++++ nx-X11/config/cf/Imake.tmpl | 5 +++++ nx-X11/programs/Xserver/hw/nxagent/Font.c | 1 + nx-X11/programs/Xserver/hw/nxagent/Imakefile | 1 + 4 files changed, 12 insertions(+) diff --git a/Makefile b/Makefile index 898e52474..42f9f25b4 100644 --- a/Makefile +++ b/Makefile @@ -30,6 +30,9 @@ CONFIGURE ?= ./configure --prefix="$(PREFIX)" ifneq ($(shell pkg-config --exists xkbcomp && echo yes), yes) $(warning xkbcomp devel package missing, using imake default values) endif +ifneq ($(shell pkg-config --exists fontutil && echo yes), yes) + $(warning fontutil devel package missing, using imake default values) +endif IMAKE_DEFINES ?= @@ -112,6 +115,8 @@ imakeconfig: (pkg-config --exists xkbcomp && echo "#define SystemXkbConfigDir `pkg-config xkbcomp --variable=xkbconfigdir`"; :) >>nx-X11/config/cf/nxconfig.def (pkg-config --exists xkbcomp && echo "#define SystemXkbBinDir `pkg-config xkbcomp --variable=prefix`/bin"; :) >>nx-X11/config/cf/nxconfig.def + (pkg-config --exists fontutil && echo "#define SystemFontRootDir `pkg-config fontutil --variable=fontrootdir`"; :) >>nx-X11/config/cf/nxconfig.def + # let's create the nx-X11 Makefiles now, once everything has been defined $(MAKE) -j1 -C nx-X11 Makefiles IMAKE_DEFINES="$(IMAKE_DEFINES)" diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl index ddd587ec6..25d985d75 100644 --- a/nx-X11/config/cf/Imake.tmpl +++ b/nx-X11/config/cf/Imake.tmpl @@ -791,6 +791,10 @@ TCLIBDIR = TclLibDir #define SystemXkbBinDir /usr/bin #endif +#ifndef SystemFontDir +#define SystemFontDir /usr/share/fonts/X11 +#endif + #ifndef ShLibDir #define ShLibDir UsrLibDir #endif @@ -1668,6 +1672,7 @@ TCLIBDIR = TclLibDir SYSTEMUSRINCDIR = SystemUsrIncDir /* system's "/usr/include" */ SYSTEMXKBCONFDIR = SystemXkbConfigDir /* system's "/usr/share/xkb" */ SYSTEMXKBBINDIR = SystemXkbBinDir /* system's "/usr/bin" */ + SYSTEMFONTDIR = SystemFontDir /* system's "/usr/share/fonts/X11" */ SHLIBDIR = ShLibDir /* shared libraries */ LINTLIBDIR = LintlibDir /* lint libraries */ MANPATH = ManPath /* top of manual page tree */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index d5c9f8982..89128d4c1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -72,6 +72,7 @@ is" without express or implied warranty. #undef DEBUG const char * nxagentFontDirs[] = { + SYSTEMFONTDIR, "/usr/share/nx/fonts", "/usr/share/X11/fonts", "/usr/share/fonts/X11", diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index 6e68b80fc..ddbf08fab 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -255,6 +255,7 @@ DEFINES = \ -DRANDR_15_INTERFACE=1 \ -DPANORAMIX \ -UDEBUG_TREE \ + -DSYSTEMFONTDIR=\"$(SYSTEMFONTDIR)\" \ $(NULL) all:: $(OBJS) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit b32a984f8f34d34fcc4114028712367c47c545d7 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Nov 7 21:29:19 2018 +0100 Die XTESTEXT1, die! commit a73e0f8cdfec1c9199ffe696146ba7d677c4c10d Author: Daniel Stone <daniel@fooishbar.org> Date: Thu Jun 1 18:47:47 2006 +0000 Die XTESTEXT1, die! Citing an email from the xorg-modular mailing list: On Tuesday 21 February 2006 23:04, Enrico Weigelt wrote: > Hi folks, > > I'm wondering what's the difference between XTEST and XTESTEXT1 > (the second one can be configured w/ my current patch ...) > Are they both the same ( -> XTest extension ) ? > Can I put both symbols together ? They're not the same extension. XTest is the one you want, if you want either. The other hasn't been built by default in ages and I should probably go ahead and nuke it from the tree. - ajax --- nx-X11/include/extensions/Imakefile | 2 +- nx-X11/include/extensions/xtestext1.h | 325 ------ nx-X11/programs/Xserver/Xext/Imakefile | 6 +- nx-X11/programs/Xserver/Xext/xtest1dd.c | 1612 -------------------------- nx-X11/programs/Xserver/Xext/xtest1dd.h | 126 -- nx-X11/programs/Xserver/Xext/xtest1di.c | 915 --------------- nx-X11/programs/Xserver/hw/nxagent/Imakefile | 2 - nx-X11/programs/Xserver/hw/nxagent/TestExt.c | 91 -- nx-X11/programs/Xserver/mi/miinitext.c | 6 - nx-X11/programs/Xserver/os/WaitFor.c | 20 +- 10 files changed, 5 insertions(+), 3100 deletions(-) diff --git a/nx-X11/include/extensions/Imakefile b/nx-X11/include/extensions/Imakefile index cdd2446fb..29f3b97fa 100644 --- a/nx-X11/include/extensions/Imakefile +++ b/nx-X11/include/extensions/Imakefile @@ -54,7 +54,7 @@ HEADERS = \ xcmiscstr.h \ bigreqstr.h \ XI.h XIproto.h \ - xtestconst.h xtestext1.h xteststr.h \ + xtestconst.h xteststr.h \ XKB.h XKBgeom.h XKBproto.h XKBstr.h XKBsrv.h \ Xdbeproto.h \ $(EXTRAHEADERS) \ diff --git a/nx-X11/include/extensions/xtestext1.h b/nx-X11/include/extensions/xtestext1.h deleted file mode 100644 index 5b67d7856..000000000 --- a/nx-X11/include/extensions/xtestext1.h +++ /dev/null @@ -1,325 +0,0 @@ -/* - * xtestext1.h - * - * X11 Input Synthesis Extension include file - */ - -/* - - -Copyright 1986, 1987, 1988, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - -Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting -documentation, and that the name of Hewlett-Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -Hewlett-Packard makes no representations about the -suitability of this software for any purpose. It is provided -"as is" without express or implied warranty. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ - -/* - * the typedefs for CARD8, CARD16, and CARD32 are defined in Xmd.h - */ - -/* - * used in the XTestPressButton and XTestPressKey functions - */ -#define XTestPRESS 1 << 0 -#define XTestRELEASE 1 << 1 -#define XTestSTROKE 1 << 2 - -/* - * When doing a key or button stroke, the number of milliseconds - * to delay between the press and the release of a key or button - * in the XTestPressButton and XTestPressKey functions. - */ - -#define XTestSTROKE_DELAY_TIME 10 - -/* - * used in the XTestGetInput function - */ -#define XTestEXCLUSIVE 1 << 0 -#define XTestPACKED_ACTIONS 1 << 1 -#define XTestPACKED_MOTION 1 << 2 - -/* - * used in the XTestFakeInput function - */ -#define XTestFAKE_ACK_NOT_NEEDED 0 -#define XTestFAKE_ACK_REQUEST 1 - -/* - * used in the XTest extension initialization routine - */ -#define XTestEXTENSION_NAME "XTestExtension1" -#define XTestEVENT_COUNT 2 - -/* - * XTest request type values - * - * used in the XTest extension protocol requests - */ -#define X_TestFakeInput 1 -#define X_TestGetInput 2 -#define X_TestStopInput 3 -#define X_TestReset 4 -#define X_TestQueryInputSize 5 - -/* - * This defines the maximum size of a list of input actions - * to be sent to the server. It should always be a multiple of - * 4 so that the entire xTestFakeInputReq structure size is a - * multiple of 4. - */ -#define XTestMAX_ACTION_LIST_SIZE 64 - -typedef struct { - CARD8 reqType; /* always XTestReqCode */ - CARD8 XTestReqType; /* always X_TestFakeInput */ - CARD16 length B16; /* 2 + XTestMAX_ACTION_LIST_SIZE/4 */ - CARD32 ack B32; - CARD8 action_list[XTestMAX_ACTION_LIST_SIZE]; -} xTestFakeInputReq; -#define sz_xTestFakeInputReq (XTestMAX_ACTION_LIST_SIZE + 8) - -typedef struct { - CARD8 reqType; /* always XTestReqCode */ - CARD8 XTestReqType; /* always X_TestGetInput */ - CARD16 length B16; /* 2 */ - CARD32 mode B32; -} xTestGetInputReq; -#define sz_xTestGetInputReq 8 - -typedef struct { - CARD8 reqType; /* always XTestReqCode */ - CARD8 XTestReqType; /* always X_TestStopInput */ - CARD16 length B32; /* 1 */ -} xTestStopInputReq; -#define sz_xTestStopInputReq 4 - -typedef struct { - CARD8 reqType; /* always XTestReqCode */ - CARD8 XTestReqType; /* always X_TestReset */ - CARD16 length B16; /* 1 */ -} xTestResetReq; -#define sz_xTestResetReq 4 - -typedef struct { - CARD8 reqType; /* always XTestReqCode */ - CARD8 XTestReqType; /* always X_TestQueryInputSize */ - CARD16 length B16; /* 1 */ -} xTestQueryInputSizeReq; -#define sz_xTestQueryInputSizeReq 4 - -/* - * This is the definition of the reply for the xTestQueryInputSize - * request. It should remain the same minimum size as other replies - * (32 bytes). - */ -typedef struct { - CARD8 type; /* always X_Reply */ - CARD8 pad1; - CARD16 sequenceNumber B16; - CARD32 length B32; /* always 0 */ - CARD32 size_return B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xTestQueryInputSizeReply; - -/* - * This is the definition for the input action wire event structure. - * This event is sent to the client when the server has one or - * more user input actions to report to the client. It must - * remain the same size as all other wire events (32 bytes). - */ -#define XTestACTIONS_SIZE 28 - -typedef struct { - CARD8 type; /* always XTestInputActionType */ - CARD8 pad00; - CARD16 sequenceNumber B16; - CARD8 actions[XTestACTIONS_SIZE]; -} xTestInputActionEvent; - -/* - * This is the definition for the xTestFakeAck wire event structure. - * This event is sent to the client when the server has completely - * processed its input action buffer, and is ready for more. - * It must remain the same size as all other wire events (32 bytes). - */ -typedef struct { - CARD8 type; /* always XTestFakeAckType */ - CARD8 pad00; - CARD16 sequenceNumber B16; - CARD32 pad02 B32; - CARD32 pad03 B32; - CARD32 pad04 B32; - CARD32 pad05 B32; - CARD32 pad06 B32; - CARD32 pad07 B32; - CARD32 pad08 B32; -} xTestFakeAckEvent; - -/* - * The server side of this extension does not (and should not) have - * definitions for Display and Window. The ifndef allows the server - * side of the extension to ignore the following typedefs. - */ -#ifndef XTestSERVER_SIDE -/* - * This is the definition for the input action host format event structure. - * This is the form that a client using this extension will see when - * it receives an input action event. - */ -typedef struct { - int type; /* always XTestInputActionType */ - Display *display; - Window window; - CARD8 actions[XTestACTIONS_SIZE]; -} XTestInputActionEvent; - -/* - * This is the definition for the xTestFakeAck host format event structure. - * This is the form that a client using this extension will see when - * it receives an XTestFakeAck event. - */ -typedef struct { - int type; /* always XTestFakeAckType */ - Display *display; - Window window; -} XTestFakeAckEvent; -#endif - -/* - * This is the definition for the format of the header byte - * in the input action structures. - */ -#define XTestACTION_TYPE_MASK 0x03 /* bits 0 and 1 */ -#define XTestKEY_STATE_MASK 0x04 /* bit 2 (key action) */ -#define XTestX_SIGN_BIT_MASK 0x04 /* bit 2 (motion action) */ -#define XTestY_SIGN_BIT_MASK 0x08 /* bit 3 (motion action) */ -#define XTestDEVICE_ID_MASK 0xf0 /* bits 4 through 7 */ - -#define XTestMAX_DEVICE_ID 0x0f -#define XTestPackDeviceID(x) (((x) & XTestMAX_DEVICE_ID) << 4) -#define XTestUnpackDeviceID(x) (((x) & XTestDEVICE_ID_MASK) >> 4) - -/* - * These are the possible action types. - */ -#define XTestDELAY_ACTION 0 -#define XTestKEY_ACTION 1 -#define XTestMOTION_ACTION 2 -#define XTestJUMP_ACTION 3 - -/* - * These are the definitions for key/button motion input actions. - */ -#define XTestKEY_UP 0x04 -#define XTestKEY_DOWN 0x00 - -typedef struct { - CARD8 header; /* which device, key up/down */ - CARD8 keycode; /* which key/button to move */ - CARD16 delay_time B16; /* how long to delay (in ms) */ -} XTestKeyInfo; - -/* - * This is the definition for pointer jump input actions. - */ -typedef struct { - CARD8 header; /* which pointer */ - CARD8 pad1; /* unused padding byte */ - CARD16 jumpx B16; /* x coord to jump to */ - CARD16 jumpy B16; /* y coord to jump to */ - CARD16 delay_time B16; /* how long to delay (in ms) */ -} XTestJumpInfo; - -/* - * These are the definitions for pointer relative motion input - * actions. - * - * The sign bits for the x and y relative motions are contained - * in the header byte. The x and y relative motions are packed - * into one byte to make things fit in 32 bits. If the relative - * motion range is larger than +/-15, use the pointer jump action. - */ -#define XTestMOTION_MAX 15 -#define XTestMOTION_MIN -15 - -#define XTestX_NEGATIVE 0x04 -#define XTestY_NEGATIVE 0x08 - -#define XTestX_MOTION_MASK 0x0f -#define XTestY_MOTION_MASK 0xf0 - -#define XTestPackXMotionValue(x) ((x) & XTestX_MOTION_MASK) -#define XTestPackYMotionValue(x) (((x) << 4) & XTestY_MOTION_MASK) - -#define XTestUnpackXMotionValue(x) ((x) & XTestX_MOTION_MASK) -#define XTestUnpackYMotionValue(x) (((x) & XTestY_MOTION_MASK) >> 4) - -typedef struct { - CARD8 header; /* which pointer */ - CARD8 motion_data; /* x,y relative motion */ - CARD16 delay_time B16; /* how long to delay (in ms) */ -} XTestMotionInfo; - -/* - * These are the definitions for a long delay input action. It is - * used when more than XTestSHORT_DELAY_TIME milliseconds of delay - * (approximately one minute) is needed. - * - * The device ID for a delay is always set to XTestDELAY_DEVICE_ID. - * This guarantees that a header byte with a value of 0 is not - * a valid header, so it can be used as a flag to indicate that - * there are no more input actions in an XTestInputAction event. - */ - -#define XTestSHORT_DELAY_TIME 0xffff -#define XTestDELAY_DEVICE_ID 0x0f - -typedef struct { - CARD8 header; /* always XTestDELAY_DEVICE_ID */ - CARD8 pad1; /* unused padding byte */ - CARD16 pad2 B16; /* unused padding word */ - CARD32 delay_time B32; /* how long to delay (in ms) */ -} XTestDelayInfo; diff --git a/nx-X11/programs/Xserver/Xext/Imakefile b/nx-X11/programs/Xserver/Xext/Imakefile index becc7b66e..8262f667d 100644 --- a/nx-X11/programs/Xserver/Xext/Imakefile +++ b/nx-X11/programs/Xserver/Xext/Imakefile @@ -73,21 +73,21 @@ XF86BIGFOBJS = xf86bigfont.o #endif SRCS = shape.c $(SHMSRCS) xcmisc.c\ - xtest.c xtest1di.c xtest1dd.c sleepuntil.c \ + xtest.c sleepuntil.c \ bigreq.c sync.c $(SCRNSAVSRC) \ $(XF86BIGFSRCS) $(SECURITYSRCS) \ $(PNRXSRCS) $(DPMSSRCS) \ $(XVSRCS) $(XRESSRCS) $(DMXSRCS) OBJS = shape.o $(SHMOBJS) xcmisc.o \ - xtest.o xtest1di.o xtest1dd.o sleepuntil.o \ + xtest.o sleepuntil.o \ bigreq.o sync.o $(SCRNSAVOBJ) \ $(XF86BIGFOBJS) $(SECURITYOBJS) \ $(PNRXOBJS) $(DPMSOBJS) \ $(XVOBJS) $(XRESOBJS) $(DMXOBJS) SOBJS = $(SHMOBJS) $(SECURITYOBJS) \ - shape.o xtest.o xtest1di.o xtest1dd.o sleepuntil.o $(PNRXOBJS) \ + shape.o xtest.o sleepuntil.o $(PNRXOBJS) \ $(XF86BIGFOBJS) #if defined(NXAgentServer) && NXAgentServer diff --git a/nx-X11/programs/Xserver/Xext/xtest1dd.c b/nx-X11/programs/Xserver/Xext/xtest1dd.c deleted file mode 100644 index e3a7aa07e..000000000 --- a/nx-X11/programs/Xserver/Xext/xtest1dd.c +++ /dev/null @@ -1,1612 +0,0 @@ -/* - * File: xtest1dd.c - * - * This file contains the device dependent parts of the input - * synthesis extension. - */ - -/* - - -Copyright 1986, 1987, 1988, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - -Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting -documentation, and that the name of Hewlett-Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -Hewlett-Packard makes no representations about the -suitability of this software for any purpose. It is provided -"as is" without express or implied warranty. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ - -/*************************************************************** - * include files - ***************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif - -#include <stdio.h> -#include <nx-X11/Xos.h> -#include <nx-X11/X.h> -#include <nx-X11/Xmd.h> -#include <nx-X11/Xproto.h> -#include "misc.h" -#include "dixstruct.h" -#define XTestSERVER_SIDE -#include <nx-X11/extensions/xtestext1.h> - -#include "xtest1dd.h" - -/*************************************************************** - * defines - ***************************************************************/ - -/* - * the size of the fake input action array - */ -#define ACTION_ARRAY_SIZE 100 - -/*************************************************************** - * externals - ***************************************************************/ - -/* - * Holds the xTestInputAction event type code. - * This is defined in xtestext1di.c. - */ -extern int XTestInputActionType; -/* - * Holds the xTestFakeAck event type code. - * This is defined in xtestext1di.c. - */ -extern int XTestFakeAckType; -/* - * used in the WriteReplyToClient macro - */ -extern int exclusive_steal; - -/*************************************************************** - * variables - ***************************************************************/ - -/* - * array to hold fake input actions - */ -struct { - /* - * holds the action type, one of: XTestDELAY_ACTION, - * XTestKEY_ACTION, XTestMOTION_ACTION, XTestJUMP_ACTION - */ - CARD8 type; - /* - * holds the device type, in the range 0 to 15 - */ - CARD8 device; - /* - * for XTestKEY_ACTION type, holds the keycode - */ - CARD8 keycode; - /* - * for XTestKEY_ACTION type, holds the key up/down state - */ - CARD8 keystate; - /* - * for XTestMOTION_ACTION and XTestJUMP_ACTION types, - * holds the x and y coordinates to move the mouse to - */ - int x; - int y; - /* - * holds the time to delay (in milliseconds) before performing - * the action - */ - CARD32 delay_time; -}action_array[ACTION_ARRAY_SIZE]; - -/* - * write index for input action array - */ -static int write_index = 0; -/* - * read index for input action array - */ -static int read_index = 0; -/* - * this is where the input actions are accumulated until they are sent - * to a client (in a wire event) - */ -static xTestInputActionEvent input_action_packet; -/* - * holds the index (in bytes) into the input actions buffer in the - * current input action event - */ -static int packet_index; -/* - * logical x position of the mouse during input action gathering - */ -short xtest_mousex; -/* - * logical y position of the mouse during input action gathering - */ -short xtest_mousey; -/* - * logical x position of the mouse while we are reading fake input actions - * from the client and putting them into the fake input action array - */ -static short pmousex; -/* - * logical y position of the mouse while we are reading fake input actions - * from the client and putting them into the fake input action array - */ -static short pmousey; -/* - * The playback_on flag is set to 1 while there are input actions in the - * input action array. It is set to 0 when the server has received all of - * the user actions. - */ -int playback_on = 0; -/* - * identity of the client using XTestGetInput to get user input actions - */ -ClientPtr current_xtest_client; -/* - * if 1 send multiple input actions per XTestInputAction event; - * if 0 send one input action per XTestInputAction event - */ -static char packed_mode; -/* - * identity of the client using the XTestFakeInput function to send some - * fake input actions to the server - */ -ClientPtr playback_client = NULL; -/* - * Set to 1 when the XTestFAKE_ACK_REQUEST flag is set in a XTestFakeInput - * request. Set back to 0 when all of the input actions have been sent - * to the server. - */ -static int acknowledge = 0; -/* - * The server's idea of the current time is saved in these variables when - * a XTestFakeInput request is received. It is restored when all fake input - * actions are sent to the server or when the playback client disconnects. - */ -static int saved_sec; -static int saved_usec; -/* - * Set to 1 when there is a valid time in saved_sec and saved_usec. - */ -static int time_saved = 0; -/* - * holds the extension's notion of what the current time is while it is - * sending input actions to a client - */ -static struct timeval current_time; -/* - * holds the time when the extension should place the next fake input action - * into the server's normal events queue - */ -static struct timeval play_time; -/* - * set to 1 when play_time is first set, cleared to 0 when the - * client using the extension disconnects, or when XTestReset is called - */ -static char play_clock = 0; -/* - * holds the amount of time left until the next input action from the - * input action array can be sent to the server - */ -static struct timeval rtime; -/* - * Set to 1 after the extension is done waiting for the correct time delay - * for an input action to be sent to the server. Remains a 1 until the time - * delay for the next input action is computed. Then set to 0 if the - * extension has to wait for the correct time delay. - */ -static int go_for_next = 1; -/* - * needed to restore waitime if playback is to be aborted - */ -static struct timeval *restorewait; -/* - * tmon special command key - * - * To use the test monitor program (called tmon) efficiently, it is - * desirable to have the extension be able to recognize a special "trigger" - * key. If the extension did not do this, tmon would have to have the - * extension send all keyboard user input actions exclusively to tmon, - * only to have tmon send them right back if they were not the command key. - * - * If the extension can recognize the command key, then tmon can let the - * extension handle keyboard user input actions normally until the command - * key is pressed (and released), and only then have the extension start - * sending keyboard user input actions exclusively to tmon. - * - * Any key on the keyboard can be used for this command key. It is most - * convenient if it is a low-frequency key. If you want to generate a - * normal occurrance of this key to a client, just hit it twice. Tmon - * will recognize the first occurrance of the key, take control of the input - * actions, and wait for certain keys. If it sees another occurrance of the - * command key, it will send one occurrance of the command key to the - * extension, and go back to waiting. - * - * set and also referenced in device layer - * XXX there should be a way to set this through the protocol - */ -KeyCode xtest_command_key = 0; - -/*************************************************************** - * function declarations - ***************************************************************/ - -static void parse_key_fake( - XTestKeyInfo * /* fkey */ - ); -static void parse_motion_fake( - XTestMotionInfo * /* fmotion */ - ); -static void parse_jump_fake( - XTestJumpInfo * /* fjump */ - ); -static void parse_delay_fake( - XTestDelayInfo * /* tevent */ - ); -static void send_ack( - ClientPtr /* client */ - ); -static void start_play_clock( - void - ); -static void compute_action_time( - struct timeval * /* rtime */ - ); -static int find_residual_time( - struct timeval * /* rtime */ - ); - -static CARD16 check_time_event( - void - ); -static CARD32 current_ms( - struct timeval * /* otime */ - ); -static int there_is_room( - int /* actsize */ - ); - -/****************************************************************************** - * - * stop_stealing_input - * - * Stop stealing input actions. - */ -void -stop_stealing_input() -{ -/* - * put any code that you might need to stop stealing input actions here - */ - if (packet_index != 0) - { - /* - * if there is a partially full input action event waiting - * when this function is called, send it to the client - */ - flush_input_actions(); - } -} - -/****************************************************************************** - * - * steal_input - * - * Start stealing input actions and sending them to the passed-in client. - */ -void -steal_input(client, mode) -/* - * which client is to receive the input action events - */ -ClientPtr client; -/* - * what input action packing mode to use. one of 0, XTestPACKED_MOTION, - * or XTestPACKED_ACTIONS; optionally 'or'ed with XTestEXCLUSIVE, - */ -CARD32 mode; -{ - if (packet_index != 0) - { - /* - * if there is a partially full input action event waiting - * when this function is called, send it to the client - */ - flush_input_actions(); - } - else - { - /* - * otherwise, set up a new input action event - */ - input_action_packet.type = XTestInputActionType; - packet_index = 0; - } - /* - * set up the new input action packing mode - */ - packed_mode = mode & ~(XTestEXCLUSIVE); - /* - * keep track of where the mouse is - */ - XTestGetPointerPos(&xtest_mousex, &xtest_mousey); - /* - * keep track of which client is getting input actions - */ - current_xtest_client = client; - /* - * find out what time it is - */ - X_GETTIMEOFDAY(¤t_time); - /* - * jump to the initial position of the mouse, using a device type of 0. - */ - XTestStealJumpData(xtest_mousex, xtest_mousey, 0); -} - -/****************************************************************************** - * - * flush_input_actions - * - * Write the input actions event to the current requesting client - * and re-initialize the input action event. - */ -void -flush_input_actions() -{ - /* - * pointer to the input action event - */ - char *rep; - /* - * loop index - */ - int i; - - if (packet_index == 0) - { - /* - * empty input actions event - */ - return; - } - else if (packet_index < XTestACTIONS_SIZE) - { - /* - * fill to the end of the input actions event with 0's - */ - for (i = packet_index; i <XTestACTIONS_SIZE; i++) - { - input_action_packet.actions[i] = 0; - } - } - rep = (char *) (&input_action_packet); - - /* - * set the serial number of the input action event - */ - input_action_packet.sequenceNumber = current_xtest_client->sequence; - /* - * send the input action event to the client - */ - WriteEventsToClient(current_xtest_client, 1, (xEvent *) rep); - /* - * re-initialize the input action event - */ - input_action_packet.type = XTestInputActionType; - packet_index = 0; -} - -/****************************************************************************** - * - * XTestStealJumpData - * - * Create one or more input actions and put them in the input action - * event. The input actions will be an (maybe) XTestDELAY_ACTION - * and an XTestJUMP_ACTION. - */ -void -XTestStealJumpData(jx, jy, dev_type) -/* - * the x and y coordinates to jump to - */ -int jx; -int jy; -/* - * which device caused the jump - */ -int dev_type; -{ - XTestJumpInfo *jmp_ptr; - /* - * time delta (in ms) from previous event - */ - CARD16 tchar; - - /* - * Get the time delta from the previous event. If needed, - * the check_time_event routine will put an XTestDELAY_ACTION - * type action in the input action event. - */ - tchar = check_time_event(); - if (!there_is_room(sizeof(XTestJumpInfo))) - { - /* - * If there isn't room in the input action event for - * an XTestJUMP_ACTION, then send that event to the - * client and start filling an empty one. - */ - flush_input_actions(); - } - /* - * update the logical mouse position - */ - xtest_mousex = jx; - xtest_mousey = jy; - /* - * point jmp_ptr to the correct place in the input action event - */ - jmp_ptr = (XTestJumpInfo *) - &(input_action_packet.actions[packet_index]); - /* - * compute the input action header - */ - jmp_ptr->header = (XTestPackDeviceID(dev_type) | XTestJUMP_ACTION); - /* - * set the x and y coordinates to jump to in the input action - */ - jmp_ptr->jumpx = jx; - jmp_ptr->jumpy = jy; - /* - * set the delay time in the input action - */ - jmp_ptr->delay_time = tchar; - /* - * increment the packet index by the size of the input action - */ - packet_index = packet_index + sizeof(XTestJumpInfo); - if (packed_mode == 0) - { - /* - * if input actions are not packed, send the input - * action event to the client - */ - flush_input_actions(); - } -} - -/****************************************************************************** - * - * current_ms - * - * Returns the number of milliseconds from the passed-in time to the - * current time, and then updates the passed-in time to the current time. - */ -static CARD32 -current_ms(otime) -struct timeval *otime; -{ - struct timeval tval; - unsigned long the_ms; - unsigned long sec; - unsigned long usec; - - /* - * get the current time - */ - X_GETTIMEOFDAY(&tval); - if (tval.tv_usec < otime->tv_usec) - { - /* - * borrow a second's worth of microseconds if needed - */ - usec = tval.tv_usec - otime->tv_usec + 1000000; - sec = tval.tv_sec - 1 - otime->tv_sec; - } - else - { - usec = tval.tv_usec - otime->tv_usec; - sec = tval.tv_sec - otime->tv_sec; - } - /* - * update the passed-in time to the new time - */ - *otime = tval; - /* - * compute the number of milliseconds contained in - * 'sec' seconds and 'usec' microseconds - */ - the_ms = (sec * 1000000L + usec) / 1000L; - return (the_ms); -} - -/****************************************************************************** - * - * check_time_event - * - * If time delta is > XTestSHORT_DELAY_TIME then insert a time event - * and return 0; else return the delay time. - */ -static CARD16 -check_time_event() -{ - CARD32 tstamp; - CARD16 tchar; - XTestDelayInfo *tptr; - - /* - * get the number of milliseconds between input actions - */ - tstamp = current_ms(¤t_time); - /* - * if the number of milliseconds is too large to fit in a CARD16, - * then add a XTestDELAY_ACTION to the input action event. - */ - if (tstamp > XTestSHORT_DELAY_TIME) - { - /* - * If there isn't room in the input action event for - * an XTestDELAY_ACTION, then send that event to the - * client and start filling an empty one. - */ - if (!there_is_room(sizeof(XTestDelayInfo))) - { - flush_input_actions(); - } - /* - * point tptr to the correct place in the input action event - */ - tptr = (XTestDelayInfo *) - (&(input_action_packet.actions[packet_index])); - /* - * compute the input action header - */ - tptr->header = XTestPackDeviceID(XTestDELAY_DEVICE_ID) | - XTestDELAY_ACTION; - /* - * set the delay time in the input action - */ - tptr->delay_time = tstamp; - /* - * increment the packet index by the size of the input action - */ - packet_index = packet_index + (sizeof(XTestDelayInfo)); - if (packed_mode != XTestPACKED_ACTIONS) - { - /* - * if input actions are not packed, send the input - * action event to the client - */ - flush_input_actions(); - } - /* - * set the returned delay time to 0 - */ - tchar = 0; - } - else - { - /* - * set the returned delay time to the computed delay time - */ - tchar = tstamp; - } - return(tchar); -} - -/****************************************************************************** - * - * there_is_room - * - * Checks if there is room in the input_action_packet for an input action - * of the size actsize bytes. Returns 1 if there is space, 0 otherwise. - * - */ -static int -there_is_room(actsize) -/* - * the number of bytes of space needed - */ -int actsize; -{ - if ((packet_index + actsize) > XTestACTIONS_SIZE) - { - return(0); - } - else - { - return(1); - } -} - -/****************************************************************************** - * - * XTestStealMotionData - * - * Put motion information from the locator into an input action. - * - * called from x_hil.c - */ -void -XTestStealMotionData(dx, dy, dev_type, mx, my) -/* - * the x and y delta motion of the locator - */ -int dx; -int dy; -/* - * which locator did the moving - */ -int dev_type; -/* - * the x and y position of the locator before the delta motion - */ -int mx; -int my; -{ - /* - * pointer to a XTestMOTION_ACTION input action - */ - XTestMotionInfo *fm; - /* - * time delta from previous event - */ - CARD16 tchar; - - /* - * if the current position of the locator is not the same as - * the logical position, then update the logical position - */ - if ((mx != xtest_mousex) || (my != xtest_mousey)) - { - XTestStealJumpData(mx, my, dev_type); - } - /* - * if the delta motion is outside the range that can - * be held in a motion input action, use a jump input action - */ - if ((dx > XTestMOTION_MAX) || (dx < XTestMOTION_MIN) || - (dy > XTestMOTION_MAX) || (dy < XTestMOTION_MIN)) - { - XTestStealJumpData((xtest_mousex + dx), - (xtest_mousey + dy), dev_type); - } - else - { - /* - * compute the new logical position of the mouse - */ - xtest_mousex += dx; - xtest_mousey += dy; - /* - * Get the time delta from the previous event. If needed, - * the check_time_event routine will put an XTestDELAY_ACTION - * type action in the input action event. - */ - tchar = check_time_event(); - /* - * If there isn't room in the input action event for - * an XTestDELAY_ACTION, then send that event to the - * client and start filling an empty one. - */ - if (!there_is_room(sizeof(XTestMotionInfo))) - { - flush_input_actions(); - /* - * point fm to the correct place in the input action event - */ - } - fm = (XTestMotionInfo *) - &(input_action_packet.actions[packet_index]); - /* - * compute the input action header - */ - fm->header = XTestMOTION_ACTION; - if (dx < 0) - { - fm->header |= XTestX_NEGATIVE; - dx = abs(dx); - } - if (dy < 0) - { - fm->header |= XTestY_NEGATIVE; - dy = abs(dy); - } - fm->header |= XTestPackDeviceID(dev_type); - /* - * compute the motion data byte - */ - fm->motion_data = XTestPackYMotionValue(dy); - fm->motion_data |= XTestPackXMotionValue(dx); - /* - * set the delay time in the input action - */ - fm->delay_time = tchar; - /* - * increment the packet index by the size of the input action - */ - packet_index = packet_index + sizeof(XTestMotionInfo); - if (packed_mode == 0) - { - /* - * if input actions are not packed, send the input - * action event to the client - */ - flush_input_actions(); - } - - } -} - -/****************************************************************************** - * - * XTestStealKeyData - * - * Place this key data in the input_action_packet. - * - */ -Bool -XTestStealKeyData(keycode, keystate, dev_type, locx, locy) -/* - * which key/button moved - */ -unsigned keycode; -/* - * whether the key/button was pressed or released - */ -int keystate; -/* - * which device caused the input action - */ -int dev_type; -/* - * the x and y coordinates of the locator when the action happenned - */ -int locx; -int locy; -{ - /* - * pointer to key/button motion input action - */ - XTestKeyInfo *kp; - /* - * time delta from previous event - */ - CARD16 tchar; - char keytrans = 0; - - /* - * update the logical position of the locator if the physical position - * of the locator is not the same as the logical position. - */ - if ((locx != xtest_mousex) || (locy != xtest_mousey)) - { - XTestStealJumpData(locx, locy, dev_type); - } - /* - * Get the time delta from the previous event. If needed, - * the check_time_event routine will put an XTestDELAY_ACTION - * type action in the input action event. - */ - tchar = check_time_event(); - if (!there_is_room(sizeof(XTestKeyInfo))) - { - /* - * If there isn't room in the input action event for - * an XTestDELAY_ACTION, then send that event to the - * client and start filling an empty one. - */ - flush_input_actions(); - } - /* - * point kp to the correct place in the input action event - */ - kp = (XTestKeyInfo *) - (&(input_action_packet.actions[packet_index])); - /* - * compute the input action header - */ - kp->header = XTestPackDeviceID(dev_type); - if ((keystate == KeyRelease) || (keystate == ButtonRelease)) - { - keytrans = XTestKEY_UP; - } - else if ((keystate == KeyPress) || (keystate == ButtonPress)) - { - keytrans = XTestKEY_DOWN; - } - else - { - printf("%s: invalid key/button state %d.\n", - XTestEXTENSION_NAME, - keystate); - } - kp->header = kp->header | keytrans | XTestKEY_ACTION; - /* - * set the keycode in the input action - */ - kp->keycode = keycode; - /* - * set the delay time in the input action - */ - kp->delay_time = tchar; - /* - * increment the packet index by the size of the input action - */ - packet_index = packet_index + sizeof(XTestKeyInfo); - /* - * if the command key has been released or input actions are not - * packed, send the input action event to the client - */ - if(((keycode == xtest_command_key) && (keystate == KeyRelease)) || - (packed_mode != XTestPACKED_ACTIONS)) - { - flush_input_actions(); - } - /* return TRUE if the event should be passed on to DIX */ - if (exclusive_steal) - return ((keystate == KeyRelease) && - (keycode == xtest_command_key)); - else - return ((keystate != KeyRelease) || - (keycode != xtest_command_key)); -} - -/****************************************************************************** - * - * parse_fake_input - * - * Parsing routine for a XTestFakeInput request. It will take a request - * and parse its contents into the input action array. Eventually the - * XTestProcessInputAction routine will be called to take input actions - * from the input action array and send them to the server to be handled. - */ -void -parse_fake_input(client, req) -/* - * which client did the XTestFakeInput request - */ -ClientPtr client; -/* - * a pointer to the xTestFakeInputReq structure sent by the client - */ -char *req; -{ - /* - * if set to 1, done processing input actions from the request - */ - int done = 0; - /* - * type of input action - */ - CARD8 action_type; - /* - * device type - */ - CARD8 dev_type; - /* - * pointer to an xTestFakeInputReq structure - */ - xTestFakeInputReq *request; - /* - * holds the index into the action list in the request - */ - int parse_index; - - /* - * get a correct-type pointer to the client-supplied request data - */ - request = (xTestFakeInputReq *) req; - /* - * save the acknowledge requested state for use in - * XTestProcessInputAction - */ - acknowledge = request->ack; - /* - * set up an index into the action list in the request - */ - parse_index = 0; - if (write_index >= ACTION_ARRAY_SIZE) - { - /* - * if the input action array is full, don't add any more - */ - done = 1; - } - while (!done) - { - /* - * get the type of input action in the list - */ - action_type = (request->action_list[parse_index]) - & XTestACTION_TYPE_MASK; - /* - * get the type of device in the list - */ - dev_type = XTestUnpackDeviceID(request->action_list[parse_index]); - /* - * process the input action appropriately - */ - switch (action_type) - { - case XTestKEY_ACTION: - parse_key_fake((XTestKeyInfo *) - &(request->action_list[parse_index])); - parse_index = parse_index + sizeof(XTestKeyInfo); - break; - case XTestMOTION_ACTION: - parse_motion_fake((XTestMotionInfo *) - &(request->action_list[parse_index])); - parse_index = parse_index + sizeof(XTestMotionInfo); - break; - case XTestJUMP_ACTION: - parse_jump_fake((XTestJumpInfo *) - &(request->action_list[parse_index])); - parse_index = parse_index + sizeof(XTestJumpInfo); - break; - case XTestDELAY_ACTION: - if (dev_type == XTestDELAY_DEVICE_ID) - { - parse_delay_fake((XTestDelayInfo *) - &(request->action_list[parse_index])); - parse_index = parse_index + - sizeof(XTestDelayInfo); - } - else - { - /* - * An invalid input action header byte has - * been detected, so there are no more - * input actions in this request. - * The intended invalid action header byte - * for this case should have a value of 0. - */ - done = 1; - } - break; - } - if (parse_index >= XTestMAX_ACTION_LIST_SIZE) - { - /* - * entire XTestFakeInput request has been processed - */ - done = 1; - } - if (write_index >= ACTION_ARRAY_SIZE) - { - /* - * no room in the input actions array - */ - done = 1; - } - } - if (write_index > read_index) - { - /* - * there are fake input actions in the input action array - * to be given to the server - */ - playback_on = 1; - playback_client = client; - } -} - -/****************************************************************************** - * - * parse_key_fake - * - * Called from parse_fake_input. - * - * Copy the fake key input action from its packed form into the array of - * pending input events. - */ -static void -parse_key_fake(fkey) -XTestKeyInfo *fkey; -{ - action_array[write_index].type = XTestKEY_ACTION; - action_array[write_index].device = XTestUnpackDeviceID(fkey->header); - action_array[write_index].keycode = fkey->keycode; - action_array[write_index].keystate = fkey->header & XTestKEY_STATE_MASK; - action_array[write_index].delay_time = fkey->delay_time; - write_index++; -} - -/****************************************************************************** - * - * parse_motion_fake - * - * Called from parse_fake_input. - * - * Copy the fake motion input action from its packed form into the array of - * pending input events. - */ -static void -parse_motion_fake(fmotion) -XTestMotionInfo *fmotion; -{ - int dx; - int dy; - - dx = (XTestUnpackXMotionValue(fmotion->motion_data)); - dy = (XTestUnpackYMotionValue(fmotion->motion_data)); - if (((fmotion->header) & XTestX_SIGN_BIT_MASK) == XTestX_NEGATIVE) - { - pmousex -= dx; - } - else - { - pmousex += dx; - } - if (((fmotion->header) & XTestY_SIGN_BIT_MASK) == XTestY_NEGATIVE) - { - pmousey -= dy; - } - else - { - pmousey += dy; - } - action_array[write_index].type = XTestJUMP_ACTION; - action_array[write_index].device = XTestUnpackDeviceID(fmotion->header); - action_array[write_index].x = pmousex; - action_array[write_index].y = pmousey; - action_array[write_index].delay_time = fmotion->delay_time; - write_index++; -} - -/****************************************************************************** - * - * parse_jump_fake - * - * Called from parse_fake_input. - * - * Copy the fake jump input action from its packed form into the array of - * pending input events. - */ -static void -parse_jump_fake(fjump) -XTestJumpInfo *fjump; -{ - pmousex = fjump->jumpx; - pmousey = fjump->jumpy; - action_array[write_index].type = XTestJUMP_ACTION; - action_array[write_index].device = XTestUnpackDeviceID(fjump->header); - action_array[write_index].x = pmousex; - action_array[write_index].y = pmousey; - action_array[write_index].delay_time = fjump->delay_time; - write_index++; -} - -/****************************************************************************** - * - * parse_delay_fake - * - * Called from parse_fake_input. - * - * Copy the fake delay input action from its packed form into the array of - * pending input events. - */ -static void -parse_delay_fake(tevent) -XTestDelayInfo *tevent; -{ - action_array[write_index].type = XTestDELAY_ACTION; - action_array[write_index].delay_time = tevent->delay_time; - write_index++; -} - -/****************************************************************************** - * - * XTestComputeWaitTime - * - * Compute the amount of time the server should wait before sending the - * next monitor event in playback mode. - */ -void -XTestComputeWaitTime(waittime) -struct timeval *waittime; -{ - /* - * The playback_on flag is set to 1 in parse_fake_input. It is set to - * 0 in XTestProcessInputAction if the server has replayed all input - * actions. - */ - if (playback_on) - { - if (!play_clock) - { - /* - * if the playback clock has never been set, - * then do it now - */ - start_play_clock(); - } - /* - * We need to save the waittime the first time through. This - * is a value the server uses, and we have to restore it when - * all of the input actions are processed by the server. - */ - if (!time_saved) - { - saved_sec = waittime->tv_sec; - saved_usec = waittime->tv_usec; - time_saved = 1; - } - if (go_for_next) - { - /* - * if we just processed an input action, figure out - * how long to wait for the next input action - */ - compute_action_time(&rtime); - } - else - { - /* - * else just find out how much more time to wait - * on the current input action - */ - (void)find_residual_time(&rtime); - } - waittime->tv_sec = rtime.tv_sec; - waittime->tv_usec = rtime.tv_usec; - } -} - -/****************************************************************************** - * - * XTestProcessInputAction - * - * If there are any input actions in the input action array, - * then take one out and process it. - * - */ -int -XTestProcessInputAction(readable, waittime) -/* - * This is the value that a 'select' function returned just before this - * routine was called. If the select timed out, this value will be 0. - * - * This extension modifies the select call's timeout value to cause the - * select to time out when the next input action is ready to given to - * the server. This routine is called immediately after the select, to - * give it a chance to process an input action. If we have an input action - * to process and the only reason that the select returned was because it - * timed out, then we change the select value to 1 and return 1 instead of 0. - */ -int readable; -/* - * this is the timeout value that the select was called with - */ -struct timeval *waittime; -{ -int mousex, mousey; - /* - * if playback_on is 0, then the input action array is empty - */ - if (playback_on) - { - restorewait = waittime; - /* - * figure out if we need to wait for the next input action - */ - if (find_residual_time(&rtime) > 0) - { - /* - * still have to wait before processing the current - * input action - */ - go_for_next = 0; - } - else - { - /* - * don't have to wait any longer before processing - * the current input action - */ - go_for_next = 1; - } - /* - * if we have an input action to process and the only reason - * that the select returned was because it timed out, then we - * change the select value to 1 and return 1 instead of 0 - */ - if (readable == 0) - { - readable++; - } - /* - * if we don't need to wait, then get an input action from - * the input action array and process it - */ - if (go_for_next) - { - /* - * There are three possible types of input actions in - * the input action array (motion input actions are - * converted to jump input actions before being put - * into the input action array). Delay input actions - * are processed by the compute_action_time function - * which is called from XTestComputeWaitTime. The - * other two types of input actions are processed here. - */ - if (action_array[read_index].type == XTestJUMP_ACTION) - { - XTestJumpPointer( - action_array[read_index].x, - action_array[read_index].y, - action_array[read_index].device); - } - if (action_array[read_index].type == XTestKEY_ACTION) - { - GetSpritePosition(&mousex, &mousey); - XTestGenerateEvent( - action_array[read_index].device, - action_array[read_index].keycode, - action_array[read_index].keystate, - mousex, - mousey); - } - read_index++; - /* - * if all input actions are processed, then restore - * the server state - */ - if (read_index >= write_index) - { - waittime->tv_sec = saved_sec; - waittime->tv_usec = saved_usec; - time_saved = 0; - playback_on = 0; - if (acknowledge) - { - /* - * if the playback client is waiting - * for an xTestFakeAck event, send - * it to him - */ - send_ack(playback_client); - acknowledge = 0; - } - write_index = 0; - read_index = 0; - playback_client = (ClientPtr) NULL; - play_clock = 0; - } - } - } - return(readable); -} - -/****************************************************************************** - * - * send_ack - * - * send an xTestFakeAck event to the client - */ -static void -send_ack(client) -ClientPtr client; -{ - xTestFakeAckEvent rep; - - /* - * set the serial number of the xTestFakeAck event - */ - rep.sequenceNumber = client->sequence; - rep.type = XTestFakeAckType; - WriteEventsToClient(client, 1, (xEvent *) &rep); -} - -/****************************************************************************** - * - * start_play_clock - * - * start the clock for play back. - */ -static void -start_play_clock() -{ - X_GETTIMEOFDAY(&play_time); - /* - * flag that play_time is valid - */ - play_clock = 1; -} - -/****************************************************************************** - * - * compute_action_time - * - * Set the play clock to the time when the next input action should be put - * into the server's input queue. Fill the rtime structure with values - * for the delta until the time for the next input action. - */ -static void -compute_action_time(rtime) -struct timeval *rtime; -{ - /* - * holds the delay time in milliseconds - */ - unsigned long dtime; - /* - * holds the number of microseconds in the sum of the dtime value - * and the play_time value - */ - unsigned long tot_usec; - /* - * holds the number of seconds and microseconds in the - * dtime value - */ - unsigned long sec; - unsigned long usec; - /* - * holds the current time - */ - struct timeval btime; - - /* - * Put the time from the current input action in dtime - */ - dtime = action_array[read_index].delay_time; - /* - * If the current input action is a delay input action, - * add in the time from the following input action. - */ - if ((action_array[read_index].type == XTestDELAY_ACTION) && - ((read_index + 1) < write_index)) - { - read_index++; - dtime = dtime + action_array[read_index].delay_time; - } - /* - * compute the number of seconds and microseconds in the - * dtime value - */ - sec = dtime / 1000; - usec = (dtime % 1000) * 1000; - /* - * get the current time in btime - */ - X_GETTIMEOFDAY(&btime); - /* - * compute the number of microseconds in the sum of the dtime value - * and the current usec value - */ - tot_usec = btime.tv_usec + usec; - /* - * if it is greater than one second's worth, adjust the seconds - */ - if (tot_usec >= 1000000) - { - tot_usec -= 1000000; - sec++; - } - play_time.tv_usec = tot_usec; - play_time.tv_sec = btime.tv_sec + sec; - /* - * put the time until the next input action in rtime - */ - rtime->tv_sec = sec; - rtime->tv_usec = usec; -} - -/****************************************************************************** - * - * find_residual_time - * - * Find the time interval from the current time to the value in play_time. - * This is the time to wait till putting the next input action into the - * server's input queue. If the time is already up, reset play_time to - * the current time. - */ -static int -find_residual_time(the_residual) -struct timeval *the_residual; -{ - /* - * if > 0, there is time to wait. If < 0, then don't wait - */ - int wait = 1; - /* - * holds the current time - */ - struct timeval btime; - /* - * holds the current time in seconds and microseconds - */ - unsigned long bsec; - unsigned long busec; - /* - * holds the playback time in seconds and microseconds - */ - unsigned long psec; - unsigned long pusec; - - /* - * get the current time in btime - */ - X_GETTIMEOFDAY(&btime); - /* - * get the current time in seconds and microseconds - */ - bsec = btime.tv_sec; - busec = btime.tv_usec; - /* - * get the playback time in seconds and microseconds - */ - psec = play_time.tv_sec; - pusec = play_time.tv_usec; - /* - * if the current time is already later than the playback time, - * we don't need to wait - */ - if (bsec > psec) - { - wait = -1; - } - else - { - if (bsec == psec) - { - /* - * if the current and playback times have the same - * second value, then compare the microsecond values - */ - if ( busec >= pusec) - { - /* - * if the current time is already later than - * the playback time, we don't need to wait - */ - wait = -1; - } - else - { - the_residual->tv_usec = pusec - busec; - the_residual->tv_sec = 0; - } - } - else - { - if (busec > pusec) - { - /* - * 'borrow' a second's worth of microseconds - * from the seconds left to wait - */ - the_residual->tv_usec = 1000000 - busec + pusec; - psec--; - the_residual->tv_sec = psec - bsec; - } - else - { - the_residual->tv_sec = psec - bsec; - the_residual->tv_usec = pusec - busec; - } - } - } - if (wait < 0) - { - /* - * if don't need to wait, set the playback time - * to the current time - */ - X_GETTIMEOFDAY(&play_time); - /* - * set the time to wait to 0 - */ - the_residual->tv_sec = 0; - the_residual->tv_usec = 0; - } - return(wait); -} - -/****************************************************************************** - * - * abort_play_back - */ -void -abort_play_back() -{ - /* - * If we were playing back input actions at the time of the abort, - * restore the original wait time for the select in the main wait - * loop of the server - */ - if (playback_on) - { - restorewait->tv_sec = saved_sec; - restorewait->tv_usec = saved_usec; - } - /* - * make the input action array empty - */ - read_index = 0; - write_index = 0; - /* - * we are no longer playing back anything - */ - playback_on = 0; - play_clock = 0; - go_for_next = 1; - /* - * there is no valid wait time saved any more - */ - time_saved = 0; - /* - * there are no valid clients using this extension - */ - playback_client = (ClientPtr) NULL; - current_xtest_client = (ClientPtr) NULL; -} - -/****************************************************************************** - * - * return_input_array_size - * - * Return the number of input actions in the input action array. - */ -void -return_input_array_size(client) -/* - * which client to send the reply to - */ -ClientPtr client; -{ - xTestQueryInputSizeReply rep; - - rep.type = X_Reply; - /* - * set the serial number of the reply - */ - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.size_return = ACTION_ARRAY_SIZE; - WriteReplyToClient(client, - sizeof(xTestQueryInputSizeReply), - (void *) &rep); -} diff --git a/nx-X11/programs/Xserver/Xext/xtest1dd.h b/nx-X11/programs/Xserver/Xext/xtest1dd.h deleted file mode 100644 index 5a3ee1781..000000000 --- a/nx-X11/programs/Xserver/Xext/xtest1dd.h +++ /dev/null @@ -1,126 +0,0 @@ -/************************************************************ - -Copyright 1996 by Thomas E. Dickey <dickey@clark.net> - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of the above listed -copyright holder(s) not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior -permission. - -THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD -TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE -LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif - -#ifndef XTEST1DD_H -#define XTEST1DD_H 1 - -extern short xtest_mousex; -extern short xtest_mousey; -extern int playback_on; -extern ClientPtr current_xtest_client; -extern ClientPtr playback_client; -extern KeyCode xtest_command_key; - -extern void stop_stealing_input( - void -); - -extern void -steal_input( - ClientPtr /* client */, - CARD32 /* mode */ -); - -extern void -flush_input_actions( - void -); - -extern void -XTestStealJumpData( - int /* jx */, - int /* jy */, - int /* dev_type */ -); - -extern void -XTestStealMotionData( - int /* dx */, - int /* dy */, - int /* dev_type */, - int /* mx */, - int /* my */ -); - -extern Bool -XTestStealKeyData( - unsigned /* keycode */, - int /* keystate */, - int /* dev_type */, - int /* locx */, - int /* locy */ -); - -extern void -parse_fake_input( - ClientPtr /* client */, - char * /* req */ -); - -extern void -XTestComputeWaitTime( - struct timeval * /* waittime */ -); - -extern int -XTestProcessInputAction( - int /* readable */, - struct timeval * /* waittime */ -); - -extern void -abort_play_back( - void -); - -extern void -return_input_array_size( - ClientPtr /* client */ -); - -extern void XTestGenerateEvent( - int /* dev_type */, - int /* keycode */, - int /* keystate */, - int /* mousex */, - int /* mousey */ -); - -extern void XTestGetPointerPos( - short * /* fmousex */, - short * /* fmousey */ -); - -extern void XTestJumpPointer( - int /* jx */, - int /* jy */, - int /* dev_type */ -); - -#endif /* XTEST1DD_H */ diff --git a/nx-X11/programs/Xserver/Xext/xtest1di.c b/nx-X11/programs/Xserver/Xext/xtest1di.c deleted file mode 100644 index b1d69ef47..000000000 --- a/nx-X11/programs/Xserver/Xext/xtest1di.c +++ /dev/null @@ -1,915 +0,0 @@ -/* - * File: xtest1di.c - * - * This file contains the device independent parts of the input - * synthesis extension. - */ - -/* - - -Copyright 1986, 1987, 1988, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - -Copyright 1986, 1987, 1988 by Hewlett-Packard Corporation - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting -documentation, and that the name of Hewlett-Packard not be used in -advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -Hewlett-Packard makes no representations about the -suitability of this software for any purpose. It is provided -"as is" without express or implied warranty. - -This software is not subject to any license of the American -Telephone and Telegraph Company or of the Regents of the -University of California. - -*/ - -/***************************************************************************** - * include files - ****************************************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include <dix-config.h> -#endif - -#include <stdio.h> -#include <nx-X11/X.h> -#include <nx-X11/Xproto.h> -#include "misc.h" -#include "os.h" -#include "gcstruct.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include "opaque.h" -#define XTestSERVER_SIDE -#include <nx-X11/extensions/xtestext1.h> - -#include "xtest1dd.h" - -/***************************************************************************** - * defines - ****************************************************************************/ - -/***************************************************************************** - * variables - ****************************************************************************/ - -/* - * Holds the request type code for this extension. The request type code - * for this extension may vary depending on how many extensions are installed - * already, so the initial value given below will be added to the base request - * code that is aquired when this extension is installed. - */ -static int XTestReqCode = 0; -/* - * Holds the two event type codes for this extension. The event type codes - * for this extension may vary depending on how many extensions are installed - * already, so the initial values given below will be added to the base event - * code that is aquired when this extension is installed. - */ -int XTestInputActionType = 0; -int XTestFakeAckType = 1; -/* - * true => monitor stealing input - */ -int on_steal_input = FALSE; -/* - * true => monitor alone getting input - */ -int exclusive_steal = FALSE; -/* - * holds the resource type assigned to this extension - */ -static RESTYPE XTestType; -/* - * holds the resource ID for the client currently using XTestGetInput - */ -static XID current_client_id; - -/***************************************************************************** - * function declarations - ****************************************************************************/ - -static DISPATCH_PROC(ProcXTestDispatch); -static DISPATCH_PROC(SProcXTestDispatch); -static DISPATCH_PROC(ProcTestFakeInput); -static DISPATCH_PROC(SProcTestFakeInput); -static DISPATCH_PROC(ProcTestGetInput); -static DISPATCH_PROC(SProcTestGetInput); -static DISPATCH_PROC(ProcTestStopInput); -static DISPATCH_PROC(SProcTestStopInput); -static DISPATCH_PROC(ProcTestReset); -static DISPATCH_PROC(SProcTestReset); -static DISPATCH_PROC(ProcTestQueryInputSize); -static DISPATCH_PROC(SProcTestQueryInputSize); - -static void XTestResetProc( - ExtensionEntry * /* unused */ - ); -static void SReplyXTestDispatch( - ClientPtr /* client_ptr */, - int /* size */, - char * /* reply_ptr */ - ); -static void SEventXTestDispatch( - xEvent * /* from */, - xEvent * /* to */ - ); - -static int XTestCurrentClientGone( - void * /* value */, - XID /* id */ - ); - -/***************************************************************************** - * - * XTestExtension1Init - * - * Called from InitExtensions in main() or from QueryExtension() if the - * extension is dynamically loaded. - * - * XTestExtension1Init has no events or errors - * (other than the core errors). - */ -void -XTestExtension1Init(void) -{ - /* - * holds the pointer to the extension entry structure - */ - ExtensionEntry *extEntry; - - extEntry = AddExtension(XTestEXTENSION_NAME, - XTestEVENT_COUNT, - 0, - ProcXTestDispatch, - SProcXTestDispatch, - XTestResetProc, - StandardMinorOpcode); - if (extEntry) - { - /* - * remember the request code assigned to this extension - */ - XTestReqCode = extEntry->base; - /* - * make an atom saying that this extension is present - */ - (void) MakeAtom(XTestEXTENSION_NAME, - strlen(XTestEXTENSION_NAME), - TRUE); - /* - * remember the event codes assigned to this extension - */ - XTestInputActionType += extEntry->eventBase; - XTestFakeAckType += extEntry->eventBase; - /* - * install the routine to handle byte-swapping the replies - * for this extension in the ReplySwapVector table - */ - ReplySwapVector[XTestReqCode] = (ReplySwapPtr) SReplyXTestDispatch; - /* - * install the routine to handle byte-swapping the events - * for this extension in the EventSwapVector table - */ - EventSwapVector[XTestInputActionType] = SEventXTestDispatch; - EventSwapVector[XTestFakeAckType] = SEventXTestDispatch; - /* - * get the resource type for this extension - */ - XTestType = CreateNewResourceType(XTestCurrentClientGone); - if (XTestType == 0) - { - FatalError("XTestExtension1Init: CreateNewResourceType failed\n"); - } - } - else - { - FatalError("XTestExtension1Init: AddExtensions failed\n"); - } -} - -/***************************************************************************** - * - * ProcXTestDispatch - * - * - */ -static int -ProcXTestDispatch(client) - register ClientPtr client; -{ - REQUEST(xReq); - if (stuff->data == X_TestFakeInput) - { - return(ProcTestFakeInput(client)); - } - else if (stuff->data == X_TestGetInput) - { - return(ProcTestGetInput(client)); - } - else if (stuff->data == X_TestStopInput) - { - return(ProcTestStopInput(client)); - } - else if (stuff->data == X_TestReset) - { - return(ProcTestReset(client)); - } - else if (stuff->data == X_TestQueryInputSize) - { - return(ProcTestQueryInputSize(client)); - } - else - { - SendErrorToClient(client, - XTestReqCode, - stuff->data, - None, - BadRequest); - return(BadRequest); - } -} - -/***************************************************************************** - * - * SProcXTestDispatch - * - * - */ -static int -SProcXTestDispatch(client) - register ClientPtr client; -{ - REQUEST(xReq); - if (stuff->data == X_TestFakeInput) - { - return(SProcTestFakeInput(client)); - } - else if (stuff->data == X_TestGetInput) - { - return(SProcTestGetInput(client)); - } - else if (stuff->data == X_TestStopInput) - { - return(SProcTestStopInput(client)); - } - else if (stuff->data == X_TestReset) - { - return(SProcTestReset(client)); - } - else if (stuff->data == X_TestQueryInputSize) - { - return(SProcTestQueryInputSize(client)); - } - else - { - SendErrorToClient(client, - XTestReqCode, - stuff->data, - None, - BadRequest); - return(BadRequest); - } -} - -/***************************************************************************** - * - * SProcTestFakeInput - * - * - */ -static int -SProcTestFakeInput(client) - register ClientPtr client; -{ - /* - * index counter - */ - int i; - /* - * pointer to the next input action in the request - */ - CARD8 *input_action_ptr; - /* - * holds the type of the next input action in the request - */ - int input_action_type; - - REQUEST(xTestFakeInputReq); - /* - * byte-swap the fields in the request - */ - swaps(&stuff->length); - swapl(&stuff->ack); - /* - * have to parse and then byte-swap the input action list here - */ - for (i = 0; i < XTestMAX_ACTION_LIST_SIZE;) - { - /* - * point to the next input action in the request - */ - input_action_ptr = &(((xTestFakeInputReq *) stuff)->action_list[i]); - /* - * figure out what type of input action it is - */ - input_action_type = (*input_action_ptr) & XTestACTION_TYPE_MASK; - /* - * byte-swap the input action according to it's type - */ - switch (input_action_type) - { - case XTestKEY_ACTION: - /* - * byte-swap the delay_time field - */ - swaps(&(((XTestKeyInfo *) input_action_ptr)->delay_time)); - /* - * advance to the next input action - */ - i += sizeof(XTestKeyInfo); - break; - case XTestMOTION_ACTION: - /* - * byte-swap the delay_time field - */ - swaps(&(((XTestMotionInfo *) input_action_ptr)->delay_time)); - /* - * advance to the next input action - */ - i += sizeof(XTestMotionInfo); - break; - case XTestJUMP_ACTION: - /* - * byte-swap the jumpx field - */ - swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpx)); - /* - * byte-swap the jumpy field - */ - swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpy)); - /* - * byte-swap the delay_time field - */ - swaps(&(((XTestJumpInfo *) input_action_ptr)->delay_time)); - /* - * advance to the next input action - */ - i += sizeof(XTestJumpInfo); - break; - default: - /* - * if this is a delay input action, then byte-swap it, - * otherwise we have reached the end of the input - * actions in this request - */ - if (XTestUnpackDeviceID(*input_action_ptr) == - XTestDELAY_DEVICE_ID) - { - /* - * byte-swap the delay_time field - */ - swapl(&(((XTestDelayInfo *) input_action_ptr)->delay_time)); - /* - * advance to the next input action - */ - i += sizeof(XTestDelayInfo); - } - else - { - /* - * if the input action header byte is 0 or - * ill-formed, then there are no more input - * actions in this request - */ - i = XTestMAX_ACTION_LIST_SIZE; - } - break; - } - } - return(ProcTestFakeInput(client)); -} - -/***************************************************************************** - * - * SProcTestGetInput - * - * - */ -static int -SProcTestGetInput(client) - register ClientPtr client; -{ - REQUEST(xTestGetInputReq); - /* - * byte-swap the fields in the request - */ - swaps(&stuff->length); - swapl(&stuff->mode); - return(ProcTestGetInput(client)); -} - -/***************************************************************************** - * - * SProcTestStopInput - * - * - */ -static int -SProcTestStopInput(client) - register ClientPtr client; -{ - REQUEST(xTestStopInputReq); - /* - * byte-swap the length field in the request - */ - swaps(&stuff->length); - return(ProcTestStopInput(client)); -} - -/***************************************************************************** - * - * SProcTestReset - * - * - */ -static int -SProcTestReset(client) - register ClientPtr client; -{ - REQUEST(xTestResetReq); - /* - * byte-swap the length field in the request - */ - swaps(&stuff->length); - return(ProcTestReset(client)); -} - -/***************************************************************************** - * - * SProcTestQueryInputSize - * - * - */ -static int -SProcTestQueryInputSize(client) - register ClientPtr client; -{ - REQUEST(xTestQueryInputSizeReq); - /* - * byte-swap the length field in the request - */ - swaps(&stuff->length); - return(ProcTestQueryInputSize(client)); -} - -/***************************************************************************** - * - * ProcTestFakeInput - * - * - */ -static int -ProcTestFakeInput(client) - register ClientPtr client; -{ - REQUEST(xTestFakeInputReq); - REQUEST_SIZE_MATCH(xTestFakeInputReq); - - if (playback_client == NULL) - { - playback_client = client; - current_client_id = FakeClientID(client->index); - AddResource(current_client_id, - XTestType, - 0); - MakeClientGrabImpervious(client); - } - if (playback_client == client) - { - /* - * This extension does not need to clean up any - * server state when a client using this function - * "goes away". The server will just process any - * input actions that have already been sent to it, - * and will then reset its association with a client. - */ - parse_fake_input(client, (char *)stuff); - return(Success); - } - else - { - /* - * this is a request by another client to send fake - * input while the server is still being used - */ - SendErrorToClient(client, - XTestReqCode, - X_TestFakeInput, - None, - BadAccess); - return(BadAccess); - } -} - -/***************************************************************************** - * - * ProcTestGetInput - * - * - */ -static int -ProcTestGetInput(client) - register ClientPtr client; -{ - REQUEST(xTestGetInputReq); - REQUEST_SIZE_MATCH(xTestGetInputReq); - if (on_steal_input) - { - /* - * this is a request by another client to get fake input - * while the server is still sending input to the first client - */ - SendErrorToClient(client, - XTestReqCode, - X_TestGetInput, - None, - BadAccess); - return(BadAccess); - } - else - { - /* - * Set up a resource associated with the client using this - * function so that this extension gets called when the - * client "goes away". This allows this extension to - * clean up the server state. - */ - current_client_id = FakeClientID(client->index); - AddResource(current_client_id, - XTestType, - 0); - /* - * indicate that a client is stealing input - */ - on_steal_input = TRUE; - if ((stuff->mode & XTestEXCLUSIVE) == 0) - { - exclusive_steal = FALSE; - } - else - { - exclusive_steal = TRUE; - } - steal_input(client, stuff->mode); - return(Success); - } -} - -/***************************************************************************** - * - * ProcTestStopInput - * - * - */ -static int -ProcTestStopInput(client) - register ClientPtr client; -{ - REQUEST_SIZE_MATCH(xTestStopInputReq); - if (on_steal_input && (current_xtest_client == client)) - { - on_steal_input = FALSE; - exclusive_steal = FALSE; - stop_stealing_input(); - /* - * remove the resource associated with this client - */ - FreeResource(current_client_id, RT_NONE); - return(Success); - } - else - { - /* - * this is a request to stop fake input when fake input has - * never been started or from a client that hasn't started - * fake input - */ - SendErrorToClient(client, - XTestReqCode, - X_TestStopInput, - None, - BadAccess); - return(BadAccess); - } -} - -/***************************************************************************** - * - * ProcTestReset - * - * - */ -static int -ProcTestReset(client) - register ClientPtr client; -{ - REQUEST_SIZE_MATCH(xTestResetReq); - on_steal_input = FALSE; - exclusive_steal = FALSE; - /* - * defined in xtest1dd.c - */ - stop_stealing_input(); - /* - * defined in xtest1dd.c - */ - abort_play_back(); - return(Success); -} - -/***************************************************************************** - * - * ProcTestQueryInputSize - * - * - */ -static int -ProcTestQueryInputSize(client) - register ClientPtr client; -{ - REQUEST_SIZE_MATCH(xTestQueryInputSizeReq); - /* - * defined in xtest1dd.c - */ - return_input_array_size(client); - return(Success); -} - -/***************************************************************************** - * - * XTestResetProc - * - * This function is called by the server when the server has no clients - * connected to it. It must put eveything back the way it was before - * this extension was installed. - */ -/*ARGSUSED*/ -static void -XTestResetProc(unused) - ExtensionEntry * unused; -{ - /* - * remove the routine to handle byte-swapping the replies - * for this extension in the ReplySwapVector table - */ - ReplySwapVector[XTestReqCode] = ReplyNotSwappd; - /* - * remove the routine to handle byte-swapping the events - * for this extension in the EventSwapVector table - */ - EventSwapVector[XTestInputActionType] = NotImplemented; - EventSwapVector[XTestFakeAckType] = NotImplemented; - /* - * reset the variables initialized just once at load time - */ - XTestReqCode = 0; - XTestInputActionType = 0; - XTestFakeAckType = 1; - on_steal_input = FALSE; - exclusive_steal = FALSE; - playback_client = 0; /* Don't really need this but it looks nice */ -} - -/***************************************************************************** - * - * PXTestCurrentClientGone - * - * This routine is called when a client that has asked for input actions - * to be sent to it "goes away". This routine must clean up the - * server state. - */ -/*ARGSUSED*/ -static int -XTestCurrentClientGone(value, id) - void * value; - XID id; -{ - /* - * defined in xtest1dd.c - */ - on_steal_input = FALSE; - exclusive_steal = FALSE; - /* - * defined in xtestdd.c - */ - playback_client = 0; - abort_play_back(); - return TRUE; -} - -/***************************************************************************** - * - * SReplyXTestDispatch - * - * Swap any replies defined in this extension. - */ -static void -SReplyXTestDispatch(client_ptr, size, reply_ptr) - ClientPtr client_ptr; - int size; - char *reply_ptr; -{ - /* - * pointer to xTestQueryInputSizeReply - */ - xTestQueryInputSizeReply *rep_ptr; - - /* - * there is only one reply in this extension, so byte-swap it - */ - rep_ptr = (xTestQueryInputSizeReply *) reply_ptr; - swaps(&(rep_ptr->sequenceNumber)); - swapl(&(rep_ptr->length)); - swapl(&(rep_ptr->size_return)); - /* - * now write the swapped reply to the client - */ - WriteToClient(client_ptr, size, reply_ptr); -} - -/***************************************************************************** - * - * SEventXTestDispatch - * - * Swap any events defined in this extension. - */ -static void -SEventXTestDispatch(from, to) - xEvent *from; - xEvent *to; -{ - /* - * index counter - */ - int i; - /* - * pointer to the next input action in the event - */ - CARD8 *input_action_ptr; - /* - * holds the type of the next input action in the event - */ - int input_action_type; - - - /* - * copy the type information from the "from" event to the "to" event - */ - ((xTestInputActionEvent *) to)->type = - ((xTestInputActionEvent *) from)->type; - /* - * copy the sequence number information from the "from" event to the - * "to" event - */ - ((xTestInputActionEvent *) to)->sequenceNumber = - ((xTestInputActionEvent *) from)->sequenceNumber; - /* - * byte-swap the sequence number in the "to" event - */ - swaps(&(((xTestInputActionEvent *) to)->sequenceNumber)); - /* - * If the event is an xTestInputActionEvent, then it needs more - * processing. Otherwise, it is an xTestFakeAckEvent, which - * has no other information in it. - */ - if ((((xTestInputActionEvent *) to)->type & 0x7f) == - XTestInputActionType) - { - /* - * copy the input actions from the "from" event - * to the "to" event - */ - for (i = 0; i < XTestACTIONS_SIZE; i++) - { - ((xTestInputActionEvent *) to)->actions[i] = - ((xTestInputActionEvent *) from)->actions[i]; - } - /* - * byte-swap the input actions in the "to" event - */ - for (i = 0; i < XTestACTIONS_SIZE; i++) - { - /* - * point to the next input action in the event - */ - input_action_ptr = &(((xTestInputActionEvent *) to)->actions[i]); - /* - * figure out what type of input action it is - */ - input_action_type = (*input_action_ptr) & - XTestACTION_TYPE_MASK; - /* - * byte-swap the input action according to it's type - */ - switch (input_action_type) - { - case XTestKEY_ACTION: - /* - * byte-swap the delay_time field - */ - swaps(&(((XTestKeyInfo *) input_action_ptr)->delay_time)); - /* - * advance to the next input action - */ - i += sizeof(XTestKeyInfo); - break; - case XTestMOTION_ACTION: - /* - * byte-swap the delay_time field - */ - swaps(&(((XTestMotionInfo *) input_action_ptr)->delay_time)); - /* - * advance to the next input action - */ - i += sizeof(XTestMotionInfo); - break; - case XTestJUMP_ACTION: - /* - * byte-swap the jumpx field - */ - swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpx)); - /* - * byte-swap the jumpy field - */ - swaps(&(((XTestJumpInfo *) input_action_ptr)->jumpy)); - /* - * byte-swap the delay_time field - */ - swaps(&(((XTestJumpInfo *) input_action_ptr)->delay_time)); - /* - * advance to the next input action - */ - i += sizeof(XTestJumpInfo); - break; - default: - /* - * if this is a delay input action, then - * byte-swap it, otherwise we have reached the - * end of the input actions in this event - */ - if (XTestUnpackDeviceID(*input_action_ptr) == - XTestDELAY_DEVICE_ID) - { - /* - * byte-swap the delay_time field - */ - swapl(&(((XTestDelayInfo *) input_action_ptr)->delay_time)); - /* - * advance to the next input action - */ - i += sizeof(XTestDelayInfo); - } - else - { - /* - * if the input action header byte is 0 - * or ill-formed, then there are no - * more input actions in this event - */ - i = XTestACTIONS_SIZE; - } - break; - } - } - } -} diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index ddbf08fab..c14b59a2c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -42,7 +42,6 @@ SRCS = \ Keystroke.c \ Pointer.c \ Screen.c \ - TestExt.c \ Visual.c \ Drawable.c \ Window.c \ @@ -104,7 +103,6 @@ OBJS = \ Keystroke.o \ Pointer.o \ Screen.o \ - TestExt.o \ Visual.o \ Drawable.o \ Window.o \ diff --git a/nx-X11/programs/Xserver/hw/nxagent/TestExt.c b/nx-X11/programs/Xserver/hw/nxagent/TestExt.c deleted file mode 100644 index 51a2ecb3d..000000000 --- a/nx-X11/programs/Xserver/hw/nxagent/TestExt.c +++ /dev/null @@ -1,91 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com) */ -/* Copyright (c) 2008-2014 Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> */ -/* Copyright (c) 2011-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>*/ -/* Copyright (c) 2014-2016 Mihai Moldovan <ionic@ionic.de> */ -/* Copyright (c) 2014-2016 Ulrich Sibiller <uli42@gmx.de> */ -/* Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com) */ -/* */ -/* NXAGENT, NX protocol compression and NX extensions to this software */ -/* are copyright of the aforementioned persons and companies. */ -/* */ -/* Redistribution and use of the present software is allowed according */ -/* to terms specified in the file LICENSE which comes in the source */ -/* distribution. */ -/* */ -/* All rights reserved. */ -/* */ -/* NOTE: This software has received contributions from various other */ -/* contributors, only the core maintainers and supporters are listed as */ -/* copyright holders. Please contact us, if you feel you should be listed */ -/* as copyright holder, as well. */ -/* */ -/**************************************************************************/ - -/* - -Copyright 1993 by Davor Matic - -Permission to use, copy, modify, distribute, and sell this software -and its documentation for any purpose is hereby granted without fee, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation. Davor Matic makes no representations about -the suitability of this software for any purpose. It is provided "as -is" without express or implied warranty. - -*/ - -#include <nx-X11/X.h> -#include <nx-X11/Xproto.h> -#include <nx-X11/Xlib.h> -#undef Bool -#include "screenint.h" -#include "input.h" -#include "misc.h" -#include "scrnintstr.h" -#include "servermd.h" -#include "mipointer.h" -#define XTestSERVER_SIDE -#include "xtestext1.h" - -extern CARD32 nxagentLastEventTime; - -void XTestGetPointerPos(short *fmousex, short *fmousey); - -void XTestJumpPointer(int jx, int jy, int dev_type); - -void XTestGenerateEvent(int dev_type, int keycode, int keystate, - int mousex, int mousey); - -void XTestGetPointerPos(short *fmousex, short *fmousey) -{ - int x,y; - - miPointerPosition(&x, &y); - *fmousex = x; - *fmousey = y; -} - -void XTestJumpPointer(int jx, int jy, int dev_type) -{ - miPointerAbsoluteCursor(jx, jy, GetTimeInMillis()); -} - -void XTestGenerateEvent(int dev_type, int keycode, int keystate, - int mousex, int mousey) -{ -/* - xEvent tevent; - - tevent.u.u.type = (dev_type == XE_POINTER) ? - (keystate == XTestKEY_UP) ? ButtonRelease : ButtonPress : - (keystate == XTestKEY_UP) ? KeyRelease : KeyPress; - tevent.u.u.detail = keycode; - tevent.u.keyButtonPointer.rootX = mousex; - tevent.u.keyButtonPointer.rootY = mousey; - tevent.u.keyButtonPointer.time = nxagentLastEventTime = GetTimeInMillis(); - mieqEnqueue(&tevent); -*/ -} diff --git a/nx-X11/programs/Xserver/mi/miinitext.c b/nx-X11/programs/Xserver/mi/miinitext.c index b39f8f4da..9e0f82643 100644 --- a/nx-X11/programs/Xserver/mi/miinitext.c +++ b/nx-X11/programs/Xserver/mi/miinitext.c @@ -171,9 +171,6 @@ typedef void (*InitExtension)(void); #endif /* FIXME: this whole block of externs should be from the appropriate headers */ -#ifdef XTESTEXT1 -extern void XTestExtension1Init(void); -#endif #ifdef SHAPE extern void ShapeExtensionInit(void); #endif @@ -382,9 +379,6 @@ InitExtensions(argc, argv) if (!noPanoramiXExtension) PanoramiXExtensionInit(); # endif #endif -#ifdef XTESTEXT1 - if (!noTestExtensions) XTestExtension1Init(); -#endif #ifdef SHAPE if (!noShapeExtension) ShapeExtensionInit(); #endif diff --git a/nx-X11/programs/Xserver/os/WaitFor.c b/nx-X11/programs/Xserver/os/WaitFor.c index 55fb997ea..9db3faef1 100644 --- a/nx-X11/programs/Xserver/os/WaitFor.c +++ b/nx-X11/programs/Xserver/os/WaitFor.c @@ -143,13 +143,6 @@ mffs(fd_mask mask) #include <nx-X11/extensions/dpms.h> #endif -#ifdef XTESTEXT1 -/* - * defined in xtestext1dd.c - */ -extern int playback_on; -#endif /* XTESTEXT1 */ - struct _OsTimerRec { OsTimerPtr next; CARD32 expires; @@ -244,13 +237,6 @@ WaitForSomething(int *pClientsReady) BlockHandler((void *)&wt, (void *)&LastSelectMask); if (NewOutputPending) FlushAllOutput(); -#ifdef XTESTEXT1 - /* XXX how does this interact with new write block handling? */ - if (playback_on) { - wt = &waittime; - XTestComputeWaitTime (&waittime); - } -#endif /* XTESTEXT1 */ #if defined(NX_TRANS_SOCKET) && defined(NX_TRANS_WAKEUP) @@ -375,11 +361,7 @@ WaitForSomething(int *pClientsReady) #endif selecterr = GetErrno(); WakeupHandler(i, (void *)&LastSelectMask); -#ifdef XTESTEXT1 - if (playback_on) { - i = XTestProcessInputAction (i, &waittime); - } -#endif /* XTESTEXT1 */ + SmartScheduleStartTimer (); if (i <= 0) /* An error or timeout occurred */ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit dece08252b6696b74091ebcde3dc557e2e60171b Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Apr 29 22:02:47 2019 +0200 Reconnect.c: initialize stateFile path We check that via strlen() while never properly initializing it. --- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index a921df6ca..b78c01e30 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -134,7 +134,7 @@ static enum RECONNECTION_STEP failedStep; /* * Path of state File */ -char stateFile[PATH_MAX]; +char stateFile[PATH_MAX] = {0}; void setStatePath(char* path) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit ff5740e039c05e04952496fe67385187daa53222 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Apr 29 22:02:24 2019 +0200 spelling fixes --- nx-X11/programs/Xserver/hw/nxagent/Options.h | 2 +- nx-X11/programs/Xserver/xkb/ddxLoad.c | 2 +- nxdialog/bin/nxdialog | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.h b/nx-X11/programs/Xserver/hw/nxagent/Options.h index 8e898bd77..b5394ee01 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Options.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Options.h @@ -365,7 +365,7 @@ typedef struct _AgentOptions int DeferLevel; /* - * Maxuimum elapsed time before a new full + * Maximum elapsed time before a new full * synchronization. */ diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c index d63512846..b770ba026 100644 --- a/nx-X11/programs/Xserver/xkb/ddxLoad.c +++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c @@ -389,7 +389,7 @@ char tmpname[PATH_MAX]; #ifdef __sun if (Pclose(out) != 0) { - ErrorF("Warning: Spurious failure reported in Pclose() runnning 'xkbcomp'.\n"); + ErrorF("Warning: Spurious failure reported in Pclose() running 'xkbcomp'.\n"); } if (1) #else diff --git a/nxdialog/bin/nxdialog b/nxdialog/bin/nxdialog index 7cd6467f4..f735dc45f 100755 --- a/nxdialog/bin/nxdialog +++ b/nxdialog/bin/nxdialog @@ -180,7 +180,7 @@ def show_yes_no_suspend_box(title, text): @param title: Message box title @type text: str @param text: Message box text - @return: Choosen action + @return: Chosen action """ dlg = Gtk.MessageDialog(type=Gtk.MessageType.QUESTION, @@ -207,7 +207,7 @@ def show_yes_no_box(title, text): @param title: Message box title @type text: str @param text: Message box text - @return: Choosen action + @return: Chosen action """ dlg = Gtk.MessageDialog(type=Gtk.MessageType.QUESTION, @@ -227,12 +227,12 @@ def show_yes_no_box(title, text): def handle_session_action(agentpid, action): - """ Execute session action choosen by user. + """ Execute session action chosen by user. @type agentpid: int @param agentpid: Nxagent process id as passed by command line @type action: int or None - @param action: Choosen action + @param action: Chosen action """ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit bee0f13ce4ebc475b1727c5715e8222c0e472a78 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Apr 29 15:37:10 2019 +0200 nxagent: Remove own GetTimeInMillis() implementation along with the DDXTIME define that has been dropped in Xorg upstream, too. commit 985c34bf06af70a7296db8307899a17347a25558 Author: Adam Jackson <ajax@theobromine.nwnk.net> Date: Thu Jul 20 17:33:13 2006 -0400 Remove the DDXTIME conditional, for being unused. --- nx-X11/config/cf/gnu.cf | 2 +- nx-X11/config/cf/linux.cf | 32 ++++++++++++++--------------- nx-X11/programs/Xserver/hw/nxagent/Millis.c | 13 ------------ nx-X11/programs/Xserver/hw/nxagent/Millis.h | 2 -- 4 files changed, 17 insertions(+), 32 deletions(-) diff --git a/nx-X11/config/cf/gnu.cf b/nx-X11/config/cf/gnu.cf index d57580125..a1d564569 100644 --- a/nx-X11/config/cf/gnu.cf +++ b/nx-X11/config/cf/gnu.cf @@ -127,7 +127,7 @@ XCOMM Not implemented and will always fail. XCOMM i386Architecture #define OptimizedCDebugFlags DefaultGcc2i386Opt #define GNUMachineDefines -D__i386__ -#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +#define ServerOSDefines XFree86ServerOSDefines #define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #define HasPlugin YES #define VendorHasX11R6_3libXext YES diff --git a/nx-X11/config/cf/linux.cf b/nx-X11/config/cf/linux.cf index fe8d97ec3..c3e9eaafd 100644 --- a/nx-X11/config/cf/linux.cf +++ b/nx-X11/config/cf/linux.cf @@ -683,7 +683,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags DefaultGcc2AxpOpt # endif # define LinuxMachineDefines -D__alpha__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 -DJENSEN_SUPPORT # ifdef UseCompaqMathLibrary # define MathLibrary -lcpml -lm @@ -693,7 +693,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) #ifdef HPArchitecture # define OptimizedCDebugFlags -O2 GccAliasingArgs # define LinuxMachineDefines -D__hppa__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* HPArchitecture */ @@ -702,7 +702,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags -O3 # endif # define LinuxMachineDefines -D__arm__ -D__arm32__ -U__arm -Uarm -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* Arm32Achitecture */ @@ -711,7 +711,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags -O3 # endif # define LinuxMachineDefines -D__aarch64__ -U__arm -Uarm -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 #endif /* Arm64Achitecture */ @@ -720,7 +720,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags DefaultGcc2i386Opt # endif # define LinuxMachineDefines -D__i386__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* i386Architecture */ @@ -729,7 +729,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags -O2 GccAliasingArgs # endif # define LinuxMachineDefines -D__ia64__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 #endif /* ia64Architecture */ @@ -738,7 +738,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags -O2 GccAliasingArgs # endif # define LinuxMachineDefines -D__mc68000__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* Mc68020Architecture */ @@ -747,7 +747,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags DefaultGcc2MipsOpt # endif # define LinuxMachineDefines -D__mips__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif @@ -756,7 +756,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags DefaultGcc2MipsOpt # endif # define LinuxMachineDefines -D__MIPSEL__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # ifdef Mips64elArchitecture # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 # else @@ -770,7 +770,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags DefaultGcc2Ppc64Opt # endif # define LinuxMachineDefines -D__powerpc64__ -D__powerpc__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET +# define ServerOSDefines XFree86ServerOSDefines -DPART_NET # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 #endif /* Ppc64Architecture */ @@ -779,7 +779,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags DefaultGcc2PpcOpt # endif # define LinuxMachineDefines -D__powerpc__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* PpcArchitecture */ @@ -788,7 +788,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags -O2 -fomit-frame-pointer GccAliasingArgs # endif # define LinuxMachineDefines -D__s390__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* s390Architecture */ @@ -796,7 +796,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) /*#define DefaultCCOptions -fsigned-char */ #define OptimizedCDebugFlags -O3 -fomit-frame-pointer #define LinuxMachineDefines -D__s390x__ -#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +#define ServerOSDefines XFree86ServerOSDefines #define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 #endif /* s390xArchitecture */ @@ -805,7 +805,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags -O2 GccAliasingArgs # endif # define LinuxMachineDefines -D__sparc__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define AsVISOption -Av9a # ifdef Sparc64Architecture # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 @@ -835,7 +835,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags -O2 SuperHArchOptFlags SuperHEndianFlags GccAliasingArgs # endif # define LinuxMachineDefines -D__sh__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif @@ -844,7 +844,7 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion) # define OptimizedCDebugFlags DefaultGcc2AMD64Opt # endif # define LinuxMachineDefines -D__amd64__ -# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME +# define ServerOSDefines XFree86ServerOSDefines # define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 #endif /* AMD64Architecture */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Millis.c b/nx-X11/programs/Xserver/hw/nxagent/Millis.c index ba801b62a..d3eb09a66 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Millis.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Millis.c @@ -29,19 +29,6 @@ #include "Xos.h" #include "Millis.h" -#ifdef DDXTIME - -CARD32 GetTimeInMillis() -{ - struct timeval ts; - - X_GETTIMEOFDAY(&ts); - - return(ts.tv_sec * 1000) + (ts.tv_usec / 1000); -} - -#endif - const char *GetTimeAsString() { char *value; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Millis.h b/nx-X11/programs/Xserver/hw/nxagent/Millis.h index 1e76ccbfb..3ba88ae63 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Millis.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Millis.h @@ -28,8 +28,6 @@ #include "Xmd.h" -CARD32 GetTimeInMillis(void); - const char *GetTimeInMillisAsString(void); const char *GetTimeAsString(void); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 0a211b6b614a64953b9325e23a12822792ee5d61 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Nov 2 20:56:55 2018 +0100 Keyboard.c: improve TEST and DEBUG output --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 05adab494..5fc322dde 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -842,7 +842,7 @@ XkbError: { #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: Using default keyboard: model [%s] layout [%s].\n", - model, layout); + model?model:"(default)", layout?layout:"(default)"); #endif } @@ -917,7 +917,8 @@ XkbError: #ifdef DEBUG fprintf(stderr, "nxagentKeyboardProc: Going to set rules and init device: " "[rules='%s',model='%s',layout='%s',variant='%s',options='%s'].\n", - rules, model, layout, variant, options); + rules?rules:"(default)", model?model:"(default)", layout?layout:"(default)", + variant?variant:"(default)", options?options:"(default)"); #endif XkbSetRulesDflts(rules, model, layout, variant, options); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 34e9c6b0b69898000afde8c67f8b874ec58b7ece Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Apr 30 21:00:31 2019 +0200 Keyboard.c: clean/unify formatting --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 32 ++++++++++++++++----------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 5fc322dde..045fa19fa 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -647,14 +647,15 @@ N/A if (keymap64 == NULL) { XFreeModifiermap(modifier_keymap); - return -1; } len = (max_keycode - min_keycode + 1) * mapWidth; keymap = (KeySym *)malloc(len * sizeof(KeySym)); for(i = 0; i < len; ++i) + { keymap[i] = keymap64[i]; + } XFree(keymap64); } @@ -668,7 +669,6 @@ N/A if (keymap == NULL) { XFreeModifiermap(modifier_keymap); - return -1; } @@ -682,18 +682,24 @@ N/A memset(modmap, 0, sizeof(modmap)); for (j = 0; j < 8; j++) - for(i = 0; i < modifier_keymap->max_keypermod; i++) { + { + for(i = 0; i < modifier_keymap->max_keypermod; i++) + { CARD8 keycode; if ((keycode = modifier_keymap-> modifiermap[j * modifier_keymap->max_keypermod + i])) + { modmap[keycode] |= 1<<j; + } if (keycode > 0) { nxagentCheckModifierMasks(keycode, j); } } + } + XFreeModifiermap(modifier_keymap); modifier_keymap = NULL; @@ -747,9 +753,6 @@ XkbError: #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: Using XKB extension.\n"); - #endif - - #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL"); #endif @@ -779,10 +782,9 @@ XkbError: { for (i = 0; nxagentKeyboard[i] != '/' && nxagentKeyboard[i] != 0; i++); - if(nxagentKeyboard[i] == 0 || nxagentKeyboard[i + 1] == 0 || i == 0) + if (nxagentKeyboard[i] == 0 || nxagentKeyboard[i + 1] == 0 || i == 0) { ErrorF("Warning: Wrong keyboard type: %s.\n", nxagentKeyboard); - goto XkbError; } @@ -873,7 +875,9 @@ XkbError: * instead of a file. */ if (nxagentX2go == 1) + { nxagentWriteKeyboardDir(); + } } else { @@ -891,7 +895,9 @@ XkbError: * we can drop this here. */ if (nxagentX2go == 1) + { nxagentWriteKeyboardFile(nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions); + } } } #ifdef DEBUG @@ -905,12 +911,12 @@ XkbError: if (xkb && xkb->geom) { - XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb); + XkbGetControls(nxagentDisplay, XkbAllControlsMask, xkb); } #ifdef TEST else { - fprintf(stderr, "nxagentKeyboardProc: No current keyboard.\n"); + fprintf(stderr, "nxagentKeyboardProc: No current keyboard.\n"); } #endif @@ -932,7 +938,7 @@ XkbError: if (xkb && xkb->geom) { - XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls); + XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls); } if (nxagentOption(Shadow) == 1 && pDev && pDev->key) @@ -943,8 +949,8 @@ XkbError: if (xkb) { - XkbFreeKeyboard(xkb, XkbAllComponentsMask, True); - xkb = NULL; + XkbFreeKeyboard(xkb, XkbAllComponentsMask, True); + xkb = NULL; } free(model); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 249be6680ea1077eeaeffb6eda28ff906ee952d7 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 1 14:38:31 2019 +0200 NXwindow.c: add missing change was forgotten during backport (see commit 7401a6691a9a3cd77431466b941eaf169c9b2b2c) --- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index 64bbf67c4..2fe37f79c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -1021,8 +1021,6 @@ SaveScreens(int on, int mode) if (on == SCREEN_SAVER_FORCER) { - UpdateCurrentTimeIf(); - lastDeviceEventTime = currentTime; if (mode == ScreenSaverReset) what = SCREEN_SAVER_OFF; else -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 0312a8cfed0fa8211cb4cbc92a83bfb0233ac3ef Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 1 20:11:14 2019 +0200 Rename libdamage to (correct) libdamageext upstream xorg is also using that name --- nx-X11/programs/Xserver/Imakefile | 2 +- nx-X11/programs/Xserver/damageext/Imakefile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 64c4e2e7f..95628651b 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -115,7 +115,7 @@ INSTPGMFLAGS = #endif #if BuildDamage DAMAGEDIR = damageext - DAMAGELIB = $(DAMAGEDIR)/libdamage.a + DAMAGELIB = $(DAMAGEDIR)/libdamageext.a #endif #if BuildComposite CWDIR = miext/cw diff --git a/nx-X11/programs/Xserver/damageext/Imakefile b/nx-X11/programs/Xserver/damageext/Imakefile index d8cc1bfa4..b80853f6a 100644 --- a/nx-X11/programs/Xserver/damageext/Imakefile +++ b/nx-X11/programs/Xserver/damageext/Imakefile @@ -20,9 +20,9 @@ $(NX_DEFINES) \ $(NULL) -NormalLibraryTarget(damage,$(OBJS)) +NormalLibraryTarget(damageext,$(OBJS)) NormalLibraryObjectRule() -LintLibraryTarget(damage,$(SRCS)) +LintLibraryTarget(damageext,$(SRCS)) NormalLintTarget($(SRCS)) DependTarget() -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit f0ba303d48439e0ebb572d56db972995388ac865 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 1 15:04:26 2019 +0200 NXdamage.c: add missing upstream fixes Some of those fixes have been part of xorg's INITIAL damage.c from 2004. They where missing in NX nevertheless. The other fixes come from this commit: commit fec868bf0f67a8f62fc69d55e2ff72b6cacea6f8 Author: Roland Mainz <roland.mainz@nrubsig.org> Date: Tue Nov 23 17:10:55 2004 +0000 //freedesktop.org/bugzilla/show_bug.cgi?id=1204): Fix X11 test suite (caused by DAMAGE layer) failure with Xvfb when rendering text using |XDrawText*()| (XDrawText() tests 1, 3, 4, 27, 28, 29, 30, 34, 37, 39, 41, 43 and XDrawText16() tests 1, 3, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 34, 37, 39, 41, 43). Patch by Hong Bo Peng <penghb@cn.ibm.com> and Stefan Dirsch <sndirsch@suse.de>. --- nx-X11/programs/Xserver/hw/nxagent/NXdamage.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdamage.c b/nx-X11/programs/Xserver/hw/nxagent/NXdamage.c index ad02e13a8..ef50edbee 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdamage.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdamage.c @@ -154,10 +154,10 @@ damagePolyText8(DrawablePtr pDrawable, DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (checkGCDamage (pDrawable, pGC)) - damageText (pDrawable, pGC, x, y, (unsigned long) count, chars, + x = damageText (pDrawable, pGC, x, y, (unsigned long) count, chars, Linear8Bit, TT_POLY8); - - x = (*pGC->ops->PolyText8)(pDrawable, pGC, x, y, count, chars); + else + x = (*pGC->ops->PolyText8)(pDrawable, pGC, x, y, count, chars); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); return x; @@ -174,11 +174,11 @@ damagePolyText16(DrawablePtr pDrawable, DAMAGE_GC_OP_PROLOGUE(pGC, pDrawable); if (checkGCDamage (pDrawable, pGC)) - damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars, + x = damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars, FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit, TT_POLY16); - - x = (*pGC->ops->PolyText16)(pDrawable, pGC, x, y, count, chars); + else + x = (*pGC->ops->PolyText16)(pDrawable, pGC, x, y, count, chars); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); return x; @@ -197,8 +197,8 @@ damageImageText8(DrawablePtr pDrawable, if (checkGCDamage (pDrawable, pGC)) damageText (pDrawable, pGC, x, y, (unsigned long) count, chars, Linear8Bit, TT_IMAGE8); - - (*pGC->ops->ImageText8)(pDrawable, pGC, x, y, count, chars); + else + (*pGC->ops->ImageText8)(pDrawable, pGC, x, y, count, chars); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } @@ -217,8 +217,8 @@ damageImageText16(DrawablePtr pDrawable, damageText (pDrawable, pGC, x, y, (unsigned long) count, (char *) chars, FONTLASTROW(pGC->font) == 0 ? Linear16Bit : TwoD16Bit, TT_IMAGE16); - - (*pGC->ops->ImageText16)(pDrawable, pGC, x, y, count, chars); + else + (*pGC->ops->ImageText16)(pDrawable, pGC, x, y, count, chars); DAMAGE_GC_OP_EPILOGUE(pGC, pDrawable); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 0db8b0353f1aaff3c62bcbed333050d3eaf34c7a Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat May 4 01:04:06 2019 +0200 NXdispatch.c: indent code to match environment --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 26 ++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 7e5edddb0..465e791da 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -278,9 +278,9 @@ Dispatch(void) if (!clientReady) return; - #ifdef WATCH + #ifdef WATCH - fprintf(stderr, "Dispatch: Watchpoint 12.\n"); + fprintf(stderr, "Dispatch: Watchpoint 12.\n"); /* Reply Total Cached Bits In Bits Out Bits/Reply Ratio @@ -294,22 +294,22 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio #98 1 256 bits (0 KB) -> 34 bits (0 KB) -> 256/1 -> 34/1 = 7.529:1 */ - sleep(30); + sleep(30); - #endif + #endif - #ifdef TEST - fprintf(stderr, "Dispatch: Value of dispatchException is [%x].\n", - dispatchException); + #ifdef TEST + fprintf(stderr, "Dispatch: Value of dispatchException is [%x].\n", + dispatchException); - fprintf(stderr, "Dispatch: Value of dispatchExceptionAtReset is [%x].\n", - dispatchExceptionAtReset); - #endif + fprintf(stderr, "Dispatch: Value of dispatchExceptionAtReset is [%x].\n", + dispatchExceptionAtReset); + #endif - if (!(dispatchException & DE_TERMINATE)) - dispatchException = 0; + if (!(dispatchException & DE_TERMINATE)) + dispatchException = 0; - while (!dispatchException) + while (!dispatchException) { if (*icheck[0] != *icheck[1]) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit a31d2801405834bd52bed6a73b030d124151203b Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 8 21:57:01 2019 +0200 README.keystrokes: refine description --- doc/nxagent/README.keystrokes | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/doc/nxagent/README.keystrokes b/doc/nxagent/README.keystrokes index 3d55f5096..241619b31 100644 --- a/doc/nxagent/README.keystrokes +++ b/doc/nxagent/README.keystrokes @@ -58,12 +58,13 @@ usually you will need Mod1 and Control. Boolean in this context means '0', 'false' and an unspecified attribute are false, anything else is considered true. -Everything in this file is case-sensitive. Unknown lines are ignored. -Keybindings are evaluated from top to bottom, so if a keybinding -matches, other keybindings further down will be ignored. The contents -of the file replaces the default keybindings, and only one file is -read, no merging between different configuration files is done. This -also means that an empty or invalid configuration file deactivates all +Everything in this file is case-sensitive. Unknown lines are ignored +(accompanied by a warning in the session log). Keybindings are +evaluated from top to bottom, so if a keybinding matches, other +keybindings further down will be ignored. The contents of the file +replaces the default keybindings, and only one file is read, no +merging between different configuration files is done. This also means +that an empty or invalid configuration file deactivates all keybindings. If an attribute occurs more than once in a line the last one wins. @@ -72,7 +73,10 @@ List of possible 'action' attributes: ------------------------------------- close_session - This terminates the session. + This terminates the session. If a proper helper is available + (NX_CLIENT environment variable point to e.g. nxdialog path) this + will ask the user if he want to suspend or terminate the session, + otherwise it will terminate without askting. fullscreen Switches the client window into or out of fullscreen mode, using @@ -102,7 +106,9 @@ defer ignore Ignores the following keystroke, nothing will happen when this - keystroke is pressed. + keystroke is pressed. The keystroke will NOT be passed to the + clients. If you want the clients to see the keystroke you need to + eliminate the line from the config file instead of using 'ignore'. reread_keystrokes Forces nxagent to re-read the keystroke configuration. Useful to -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 3d254765c33c6e206a790bb927690b5026552c3d Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat May 4 00:30:21 2019 +0200 NXdispatch.c: add missing change This change was missing in 239fe3d0802b12ce8947741693244ff8154fa559 --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 22d5f191e..fab670517 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -1309,6 +1309,9 @@ CloseDownClient(register ClientPtr client) CallCallbacks((&ClientStateCallback), (void *)&clientinfo); } FreeClientResources(client); + /* Disable client ID tracking. This must be done after + * ClientStateCallback. */ + ReleaseClientIds(client); if (client->index < nextFreeClientID) nextFreeClientID = client->index; clients[client->index] = NullClient; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit f6845fbd926dd7478e864207a430490687c3d071 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat May 4 00:40:49 2019 +0200 NXdispatch.c: add missing fixes transfer to derived file was incomplete in 6acbfab33133a92dbd7f128284d26f94bfeb1af2 --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index fab670517..7e5edddb0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -626,7 +626,7 @@ ProcReparentWindow(register ClientPtr client) int ProcQueryTree(register ClientPtr client) { - xQueryTreeReply reply; + xQueryTreeReply reply = {0}; int numChildren = 0; register WindowPtr pChild, pWin, pHead; Window *childIDs = (Window *)NULL; @@ -637,7 +637,6 @@ ProcQueryTree(register ClientPtr client) DixReadAccess); if (!pWin) return(BadWindow); - memset(&reply, 0, sizeof(xQueryTreeReply)); reply.type = X_Reply; reply.root = pWin->drawable.pScreen->root->drawable.id; reply.sequenceNumber = client->sequence; @@ -720,8 +719,6 @@ ProcSetSelectionOwner(register ClientPtr client) i++; if (i < NumCurrentSelections) { - xEvent event = {0}; - /* If the timestamp in client's request is in the past relative to the time stamp indicating the last time the owner of the selection was set, do not set the selection, just return @@ -732,6 +729,7 @@ ProcSetSelectionOwner(register ClientPtr client) if (CurrentSelections[i].client && (!pWin || (CurrentSelections[i].client != client))) { + xEvent event = {0}; event.u.u.type = SelectionClear; event.u.selectionClear.time = time.milliseconds; event.u.selectionClear.window = CurrentSelections[i].window; @@ -765,7 +763,7 @@ ProcSetSelectionOwner(register ClientPtr client) CurrentSelections[i].client = (pWin ? client : NullClient); if (SelectionCallback) { - SelectionInfoRec info; + SelectionInfoRec info = {0}; info.selection = &CurrentSelections[i]; info.kind= SelectionSetOwner; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit fac36b24f55b02040bd6950d8de0385fdbb33703 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 8 23:23:54 2019 +0200 nxagent: make nxagentX2go a Boolean --- nx-X11/programs/Xserver/hw/nxagent/Init.c | 14 +++++++------- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index d02af3f8d..80ca5fac1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -183,13 +183,13 @@ int nxagentSaveUnder; int nxagentDoFullGeneration = 1; /* - * 1 if agent running as X2goAgent - * 0 if NX Agent + * True if agent is running as X2goAgent + * False if agent is running as NXAgent */ -int nxagentX2go; +Bool nxagentX2go; /* - * Checking if agent is x2go agent + * Check if agent is x2go agent */ void checkX2goAgent(void) @@ -200,13 +200,13 @@ void checkX2goAgent(void) fprintf(stderr, "%s: nxagentProgName [%s]\n", __func__, nxagentProgName); #endif - if( strcasecmp(nxagentProgName,"x2goagent") == 0) + if (strcasecmp(nxagentProgName,"x2goagent") == 0) { fprintf(stderr, "\nrunning as X2Go Agent\n"); - nxagentX2go=1; + nxagentX2go = True; } else - nxagentX2go=0; + nxagentX2go = False; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 045fa19fa..96b33ea7d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -756,7 +756,7 @@ XkbError: fprintf(stderr, "nxagentKeyboardProc: nxagentKeyboard is [%s].\n", nxagentKeyboard ? nxagentKeyboard : "NULL"); #endif - if (nxagentX2go == 1 && nxagentKeyboard && (strcmp(nxagentKeyboard, "null/null") == 0)) + if (nxagentX2go && nxagentKeyboard && (strcmp(nxagentKeyboard, "null/null") == 0)) { #ifdef TEST fprintf(stderr, "%s: changing nxagentKeyboard from [null/null] to [clone].\n", __func__); @@ -874,7 +874,7 @@ XkbError: * method for switching that off is the creation of a dir * instead of a file. */ - if (nxagentX2go == 1) + if (nxagentX2go) { nxagentWriteKeyboardDir(); } @@ -894,7 +894,7 @@ XkbError: * know about that yet. Once x2go starts using clone * we can drop this here. */ - if (nxagentX2go == 1) + if (nxagentX2go) { nxagentWriteKeyboardFile(nxagentRemoteRules, nxagentRemoteModel, nxagentRemoteLayout, nxagentRemoteVariant, nxagentRemoteOptions); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 1b9d735b01dd39a2ac6c0b32e00c4f31ae0d85d6 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 8 22:25:02 2019 +0200 README.keystrokes: mention nxdialog --- doc/nxagent/README.keystrokes | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/doc/nxagent/README.keystrokes b/doc/nxagent/README.keystrokes index 241619b31..750a460eb 100644 --- a/doc/nxagent/README.keystrokes +++ b/doc/nxagent/README.keystrokes @@ -69,14 +69,24 @@ keybindings. If an attribute occurs more than once in a line the last one wins. +Some of the actions can open a dialog window. Depending on the user's +answer the selected action will be taken. Some actions will only show +a dialog informing the user about the taken action. All these dialogs +will only work if the nxagent/x2goagent process has a properly +configured NX_CLIENT environment variable pointing to an executable +(like nxdialog) that is responsible for showing the dialogs and taking +the action(s). If that executable cannot be run no dialog will show up +and no action will be taken. + List of possible 'action' attributes: ------------------------------------- close_session - This terminates the session. If a proper helper is available - (NX_CLIENT environment variable point to e.g. nxdialog path) this - will ask the user if he want to suspend or terminate the session, - otherwise it will terminate without askting. + This terminates the session. If a proper dialog helper is available + ask the user if he wants to disconnect + or terminate the session and then perform the selected + action. Without proper helper it will do nothing (except writing an + error the session log) fullscreen Switches the client window into or out of fullscreen mode, using @@ -102,7 +112,9 @@ viewport_scroll_left/up/right/down (maximum step size is 200px). defer - Activates/deactivates deferred screen updates. + Activates/deactivates deferred screen updates. With a proper + dialog helper (see above) it will open a dialog informing the user + about the action taken. ignore Ignores the following keystroke, nothing will happen when this -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 79a2b7b241e61dae4c2ae7a3896f98243e41ff3b Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 8 21:49:50 2019 +0200 Remove useless "ignore" keystroke for Ctrl-Alt-Backspace nxagent does not react on that anyway (see xkb/xkbDflts.h) --- etc/keystrokes.cfg | 1 - nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/etc/keystrokes.cfg b/etc/keystrokes.cfg index c57d2efbb..856369839 100644 --- a/etc/keystrokes.cfg +++ b/etc/keystrokes.cfg @@ -5,7 +5,6 @@ <keystroke action="fullscreen" Control="1" Shift="1" AltMeta="1" key="f" /> <keystroke action="minimize" Control="1" AltMeta="1" key="m" /> <keystroke action="defer" Control="1" AltMeta="1" key="e" /> -<keystroke action="ignore" Control="1" AltMeta="1" key="BackSpace" /> <keystroke action="force_synchronization" Control="1" AltMeta="1" key="j" /> <keystroke action="resize" Control="1" AltMeta="1" key="r" /> <keystroke action="viewport_move_left" Control="1" Shift="1" AltMeta="1" key="Left" /> diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index 6def29ae4..3e02d318d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -113,8 +113,6 @@ struct nxagentSpecialKeystrokeMap default_map[] = { {KEYSTROKE_FULLSCREEN, ControlMask | ShiftMask, True, XK_f}, {KEYSTROKE_MINIMIZE, ControlMask, True, XK_m}, {KEYSTROKE_DEFER, ControlMask, True, XK_e}, - {KEYSTROKE_IGNORE, ControlMask, True, XK_BackSpace}, - {KEYSTROKE_IGNORE, 0, False, XK_Terminate_Server}, {KEYSTROKE_FORCE_SYNCHRONIZATION, ControlMask, True, XK_j}, #ifdef DUMP {KEYSTROKE_REGIONS_ON_SCREEN, ControlMask, True, XK_a}, -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6981e9bb0cd51d22b06dd4241a55f6e08f60e75d Merge: 226493690 6a938063b Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri May 17 15:51:36 2019 +0200 Merge branch 'andschwa-xtestext1h' into 3.6.x Attributes GH PR #806: https://github.com/ArcticaProject/nx-libs/pull/806 Fixes ArcticaProject/nx-libs#807. debian/copyright | 29 ----------------------------- debian/copyright.in | 9 --------- debian/nx-x11proto-xext-dev.install | 1 - nx-libs.spec | 1 - 4 files changed, 40 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 22649369085dfaa351003ba76b7838160089f7cc Merge: f6177d2ad fac36b24f Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat May 11 09:41:15 2019 +0200 Merge branch 'uli42-pr/small_fixes' into 3.6.x Attributes GH PR #797: https://github.com/ArcticaProject/nx-libs/pull/797 doc/nxagent/README.keystrokes | 36 +- etc/keystrokes.cfg | 1 - nx-X11/config/cf/gnu.cf | 2 +- nx-X11/config/cf/linux.cf | 32 +- nx-X11/include/extensions/Imakefile | 2 +- nx-X11/include/extensions/xtestext1.h | 325 ----- nx-X11/programs/Xserver/Imakefile | 2 +- nx-X11/programs/Xserver/Xext/Imakefile | 6 +- nx-X11/programs/Xserver/Xext/xtest1dd.c | 1612 ----------------------- nx-X11/programs/Xserver/Xext/xtest1dd.h | 126 -- nx-X11/programs/Xserver/Xext/xtest1di.c | 915 ------------- nx-X11/programs/Xserver/damageext/Imakefile | 4 +- nx-X11/programs/Xserver/hw/nxagent/Imakefile | 2 - nx-X11/programs/Xserver/hw/nxagent/Init.c | 14 +- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 43 +- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 2 - nx-X11/programs/Xserver/hw/nxagent/Millis.c | 13 - nx-X11/programs/Xserver/hw/nxagent/Millis.h | 2 - nx-X11/programs/Xserver/hw/nxagent/NXdamage.c | 20 +- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 37 +- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 2 - nx-X11/programs/Xserver/hw/nxagent/Options.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/TestExt.c | 91 -- nx-X11/programs/Xserver/mi/miinitext.c | 6 - nx-X11/programs/Xserver/os/WaitFor.c | 20 +- nx-X11/programs/Xserver/xkb/ddxLoad.c | 2 +- nxdialog/bin/nxdialog | 8 +- 28 files changed, 120 insertions(+), 3209 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6a938063bb436c21e91b1f1f9424c351b3f2296c Author: Andrew Schwartzmeyer <andrew@schwartzmeyer.com> Date: Mon May 13 21:32:07 2019 +0000 Remove Debian build references to `xtestext1.h` This file has been deleted, but references to it in the build remain, causing `debuild` to fail. --- debian/copyright | 29 ----------------------------- debian/copyright.in | 9 --------- debian/nx-x11proto-xext-dev.install | 1 - nx-libs.spec | 1 - 4 files changed, 40 deletions(-) diff --git a/debian/copyright b/debian/copyright index 1b3c367e0..59d976aae 100644 --- a/debian/copyright +++ b/debian/copyright @@ -2246,35 +2246,6 @@ Copyright: 1989, 1998, The Open Group 1996, 1998, The Open Group License: MIT~OpenGroup -Files: nx-X11/include/extensions/xtestext1.h - nx-X11/programs/Xserver/Xext/xtest1dd.c - nx-X11/programs/Xserver/Xext/xtest1di.c -Copyright: 1986-1988, 1998, The Open Group - 1986-1988, Hewlett-Packard Corporation -License: MIT~OpenGroup -Comment: - Contributions by Hewlett-Packard Corporation have been licensed - under the following license: - . - Permission to use, copy, modify, and distribute this - software and its documentation for any purpose and without - fee is hereby granted, provided that the above copyright - notice appear in all copies and that both that copyright - notice and this permission notice appear in supporting - documentation, and that the name of Hewlett-Packard not be used in - advertising or publicity pertaining to distribution of the - software without specific, written prior permission. - . - Hewlett-Packard makes no representations about the - suitability of this software for any purpose. It is provided - "as is" without express or implied warranty. - . - As additional note, we find: - . - This software is not subject to any license of the American - Telephone and Telegraph Company or of the Regents of the - University of California. - Files: nx-X11/programs/Xserver/hw/nxagent/NXdamage.c nx-X11/programs/Xserver/randr/rrmode.c nx-X11/programs/Xserver/randr/rrscreen.c diff --git a/debian/copyright.in b/debian/copyright.in index 8986ad062..bfbe86d90 100644 --- a/debian/copyright.in +++ b/debian/copyright.in @@ -2122,15 +2122,6 @@ Copyright: 1992, X Consortium License: MIT/X11 (BSD like) FIXME -Files: nx-X11/include/extensions/xtestext1.h - nx-X11/programs/Xserver/Xext/xtest1dd.c - nx-X11/programs/Xserver/Xext/xtest1di.c - nx-X11/programs/Xserver/mi/mibstore.c -Copyright: 1986-1988, 1998, The Open Group - 1987, 1998, The Open Group -License: NTP - FIXME - Files: nx-X11/programs/Xserver/miext/cw/cw.c nx-X11/programs/Xserver/miext/cw/cw.h nx-X11/programs/Xserver/miext/cw/cw_ops.c diff --git a/debian/nx-x11proto-xext-dev.install b/debian/nx-x11proto-xext-dev.install index 913aad2ae..a5a495fb9 100644 --- a/debian/nx-x11proto-xext-dev.install +++ b/debian/nx-x11proto-xext-dev.install @@ -12,5 +12,4 @@ usr/include/*/nx-X11/extensions/xcmiscstr.h usr/include/*/nx-X11/extensions/xf86bigfont.h usr/include/*/nx-X11/extensions/xf86bigfproto.h usr/include/*/nx-X11/extensions/xtestconst.h -usr/include/*/nx-X11/extensions/xtestext1.h usr/include/*/nx-X11/extensions/xteststr.h diff --git a/nx-libs.spec b/nx-libs.spec index c974cace3..f9ebf422e 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -598,7 +598,6 @@ rm -f %{buildroot}%{_datadir}/man/man1/nxdialog.1* %{_includedir}/nx-X11/extensions/xfixesproto.h %{_includedir}/nx-X11/extensions/xfixeswire.h %{_includedir}/nx-X11/extensions/xtestconst.h -%{_includedir}/nx-X11/extensions/xtestext1.h %{_includedir}/nx-X11/extensions/xteststr.h %files -n nxagent -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 20353e96a390a029f7b3b18fc7ddd82eae98b935 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 15 19:54:24 2019 +0200 libNX_X11: add additional checks for dpy and xkb We have seen crashes during session shutdown/connection problems here. These patches should avoid them. There's no proper way to test them, but they should do no harm.. Fixes ArcticaProject/nx-libs#801 Fixes https://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=695 --- nx-X11/lib/src/xkb/XKBBind.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nx-X11/lib/src/xkb/XKBBind.c b/nx-X11/lib/src/xkb/XKBBind.c index 068e8f2a0..ffe5ad9d7 100644 --- a/nx-X11/lib/src/xkb/XKBBind.c +++ b/nx-X11/lib/src/xkb/XKBBind.c @@ -108,7 +108,21 @@ XKeycodeToKeysym(Display *dpy, _XkbCheckPendingRefresh(dpy, dpy->xkb_info); +#ifdef NX_TRANS_SOCKET + /* + check again, we have seen cases where the connection broke + during CheckPendingEvents(), followed by a crash when accessing + dpy. See https://github.com/ArcticaProject/nx-libs/issues/801 + */ + if (_XkbUnavailable(dpy)) + return _XKeycodeToKeysym(dpy, kc, col); +#endif + xkb = dpy->xkb_info->desc; +#ifdef NX_TRANS_SOCKET + if (xkb == NULL) + return _XKeycodeToKeysym(dpy, kc, col); +#endif if ((kc < xkb->min_key_code) || (kc > xkb->max_key_code)) return NoSymbol; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 789d3a37e656167a63e637140805fac145c765ea Merge: 6981e9bb0 20353e96a Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue May 21 10:57:22 2019 +0200 Merge branch 'uli42-pr/fix_xkb_crash' into 3.6.x Attributes GH PR #809: https://github.com/ArcticaProject/nx-libs/pull/809 nx-X11/lib/src/xkb/XKBBind.c | 14 ++++++++++++++ nx-X11/programs/Xserver/xkb/xkbUtils.c | 4 ++++ 2 files changed, 18 insertions(+) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 4df77fe73fe03dc3098190f3702c0d5ab415968a Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 15 19:42:29 2019 +0200 xkbUtils.c: Catch division by zero Fixes ArcticaProject/nx-libs#808 --- nx-X11/programs/Xserver/xkb/xkbUtils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nx-X11/programs/Xserver/xkb/xkbUtils.c b/nx-X11/programs/Xserver/xkb/xkbUtils.c index 028f32454..21a5ce76a 100644 --- a/nx-X11/programs/Xserver/xkb/xkbUtils.c +++ b/nx-X11/programs/Xserver/xkb/xkbUtils.c @@ -685,6 +685,10 @@ unsigned act; else group= newGroup; } else { +#ifdef NXAGENT_SERVER + /* we have seen division by zero here */ + if (ctrls->num_groups != 0) +#endif group%= ctrls->num_groups; } } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 0eab060d17c1ecbfbda957d747fc21c1bedee416 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon May 27 20:35:25 2019 +0200 dix: remove unused requestLogIndex As done in these commits: commit 6583477035234e23ead2fad9db7a07e5862447a4 Author: Nicolai Hähnle <nhaehnle@gmail.com> Date: Sat May 23 13:35:24 2009 +0200 Remove reference to non-existing requestLog and requestLogIndex These fields were removed in 252ec504817e05b185e4896a2d899e9c00b8aeef. Signed-off-by: Nicolai Haehnle <nhaehnle@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> commit 252ec504817e05b185e4896a2d899e9c00b8aeef Author: Adam Jackson <ajax@redhat.com> Date: Mon Mar 30 15:18:30 2009 -0400 Document which bits of ClientRec are currently unused --- nx-X11/programs/Xserver/dix/dispatch.c | 9 --------- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 6 ------ nx-X11/programs/Xserver/include/dixstruct.h | 8 -------- 3 files changed, 23 deletions(-) diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index 5c4e54c73..86a33ec65 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -416,12 +416,6 @@ Dispatch(void) } client->sequence++; -#ifdef DEBUG - if (client->requestLogIndex == MAX_REQUEST_LOG) - client->requestLogIndex = 0; - client->requestLog[client->requestLogIndex] = MAJOROP; - client->requestLogIndex++; -#endif if (result > (maxBigRequestSize << 2)) result = BadLength; else @@ -3622,9 +3616,6 @@ void InitClient(ClientPtr client, int i, void * ospriv) client->numSaved = 0; client->saveSet = (SaveSetElt *)NULL; client->noClientException = Success; -#ifdef DEBUG - client->requestLogIndex = 0; -#endif client->requestVector = InitialVector; client->osPrivate = ospriv; client->swapped = FALSE; diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 465e791da..db055f0cd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -468,12 +468,6 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio #endif client->sequence++; -#ifdef DEBUG - if ((client->requestLogIndex >= MAX_REQUEST_LOG) || (client->requestLogIndex <= 0)) - client->requestLogIndex = 0; - client->requestLog[client->requestLogIndex] = MAJOROP; - client->requestLogIndex++; -#endif if (result > (maxBigRequestSize << 2)) result = BadLength; else diff --git a/nx-X11/programs/Xserver/include/dixstruct.h b/nx-X11/programs/Xserver/include/dixstruct.h index cdd2543a6..079dfb1ed 100644 --- a/nx-X11/programs/Xserver/include/dixstruct.h +++ b/nx-X11/programs/Xserver/include/dixstruct.h @@ -37,10 +37,6 @@ SOFTWARE. * translation from client ids to server addresses. */ -#ifdef DEBUG -#define MAX_REQUEST_LOG 100 -#endif - extern CallbackListPtr ClientStateCallback; typedef struct { @@ -121,10 +117,6 @@ typedef struct _Client { KeyCode minKC,maxKC; #endif -#ifdef DEBUG - unsigned char requestLog[MAX_REQUEST_LOG]; - int requestLogIndex; -#endif unsigned long replyBytesRemaining; #ifdef XCSECURITY XID authId; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 49adb1e5ccf6cd5da186a6ca10bfb6e8048b4be4 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu May 23 00:17:21 2019 +0200 render/glyph.c: add missing usage_hint was missing in 8b5bb2cdafe5f7bd77826a1fd28f07b7329be899 --- nx-X11/programs/Xserver/render/glyph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/render/glyph.c b/nx-X11/programs/Xserver/render/glyph.c index 9c9a485ea..a379b505f 100644 --- a/nx-X11/programs/Xserver/render/glyph.c +++ b/nx-X11/programs/Xserver/render/glyph.c @@ -589,7 +589,8 @@ miGlyphs(CARD8 op, height = extents.y2 - extents.y1; pMaskPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, - maskFormat->depth); + maskFormat->depth, + CREATE_PIXMAP_USAGE_SCRATCH); if (!pMaskPixmap) return; component_alpha = NeedsComponent(maskFormat->format); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 126cbe1ff20e19cd477c5fe9a127298bd12e3e2e Merge: 789d3a37e 0eab060d1 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jun 11 11:31:05 2019 +0200 Merge branch 'uli42-pr/remove_requestlog' into 3.6.x Attributes GH PR #811: https://github.com/ArcticaProject/nx-libs/pull/811 nx-X11/programs/Xserver/dix/dispatch.c | 9 --------- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 6 ------ nx-X11/programs/Xserver/include/dixstruct.h | 8 -------- 3 files changed, 23 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit a736122f5712d5d1b3b798ace3583a101c0cdf61 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon May 27 15:42:11 2019 +0200 os: fix BigReq ignoring when another request is pending Not sure how it came to this situation, but the following commit is partly contained in our version of the code. Some lines had not been removed, tough... commit c80c41767eb101e9dbd8393d8cca7764b4e248a4 Author: Aaron Plattner <aplattner@nvidia.com> Date: Mon Oct 25 22:01:32 2010 -0700 os: Fix BigReq ignoring when another request is pending Commit cf88363db0ebb42df7cc286b85d30d7898aea840 fixed the handling of BigReq requests that are way too large and handles the case where the read() syscall returns a short read. However, it neglected to handle the case where it returns a long read, which happens when the client has another request in the queue after the bogus large one. Handle the long read case by subtracting the smaller of 'needed' and 'gotnow' from oci->ignoreBytes. If needed < gotnow, simply subtract the two, leaving gotnow equal to the number of extra bytes read. Since the code immediately following the (oci->ignoreBytes > 0) block tries to handle the next request, advance oci->bufptr immediately instead of setting oci->lenLastReq and letting the next call to ReadRequestFromClient do it. Fixes the XTS pChangeKeyboardMapping-3 test. CASES TESTS PASS UNSUP UNTST NOTIU WARN FIP FAIL UNRES UNIN ABORT -Xproto 122 389 367 2 19 0 0 0 1 0 0 0 +Xproto 122 389 368 2 19 0 0 0 0 0 0 0 Signed-off-by: Aaron Plattner <aplattner@nvidia.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com> --- nx-X11/programs/Xserver/os/io.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/nx-X11/programs/Xserver/os/io.c b/nx-X11/programs/Xserver/os/io.c index ad1fdcd20..02a47f135 100644 --- a/nx-X11/programs/Xserver/os/io.c +++ b/nx-X11/programs/Xserver/os/io.c @@ -424,8 +424,6 @@ ReadRequestFromClient(ClientPtr client) if (oci->ignoreBytes > 0) { assert(needed == oci->ignoreBytes || needed == oci->size); - oci->ignoreBytes -= gotnow; - needed = gotnow = 0; /* * The _XSERVTransRead call above may return more or fewer bytes than we * want to ignore. Ignore the smaller of the two sizes. -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit fd84270023d72fbe335d8586d128a113b942137c Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 22 22:22:36 2019 +0200 Fix NXevents.c: Reactivate errornously commented function CheckMotion() had been commented in add881931f2e702fb1952f4e1baba04b3dc536ee as it looked identical to the version from dix/events.c except for some commented code. But this based (probably) on a thinko - code that had been disabled by NX became active again this way. Fix this by removing the comments and by adding #ifdef/else to emphasize the difference. --- nx-X11/programs/Xserver/dix/events.c | 4 + nx-X11/programs/Xserver/hw/nxagent/NXevents.c | 141 ++++++++++++++------------ 2 files changed, 79 insertions(+), 66 deletions(-) diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c index e936be77e..745932af3 100644 --- a/nx-X11/programs/Xserver/dix/events.c +++ b/nx-X11/programs/Xserver/dix/events.c @@ -245,6 +245,8 @@ static WindowPtr XYToWindow( int y ); +static Bool CheckMotion(xEvent *xE); + extern int lastEvent; static Mask lastEventMask; @@ -1951,6 +1953,7 @@ XYToWindow(int x, int y) } #endif /* NXAGENT_SERVER */ +#ifndef NXAGENT_SERVER static Bool CheckMotion(xEvent *xE) { @@ -2015,6 +2018,7 @@ CheckMotion(xEvent *xE) } return TRUE; } +#endif /* NXAGENT_SERVER */ void WindowsRestructured() diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c index 370fff6b5..43dfe8613 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c @@ -381,79 +381,88 @@ XYToWindow(int x, int y) return spriteTrace[spriteTraceGood-1]; } -// static Bool -// CheckMotion(xEvent *xE) -// { -// WindowPtr prevSpriteWin = sprite.win; -// +static Bool +CheckMotion(xEvent *xE) +{ + WindowPtr prevSpriteWin = sprite.win; + #ifdef PANORAMIX -// if(!noPanoramiXExtension) -// return XineramaCheckMotion(xE); + if(!noPanoramiXExtension) + return XineramaCheckMotion(xE); #endif -// if (xE && !syncEvents.playingEvents) -// { -// if (sprite.hot.pScreen != sprite.hotPhys.pScreen) -// { -// sprite.hot.pScreen = sprite.hotPhys.pScreen; -// ROOT = sprite.hot.pScreen->root; -// } -// sprite.hot.x = XE_KBPTR.rootX; -// sprite.hot.y = XE_KBPTR.rootY; -// if (sprite.hot.x < sprite.physLimits.x1) -// sprite.hot.x = sprite.physLimits.x1; -// else if (sprite.hot.x >= sprite.physLimits.x2) -// sprite.hot.x = sprite.physLimits.x2 - 1; -// if (sprite.hot.y < sprite.physLimits.y1) -// sprite.hot.y = sprite.physLimits.y1; -// else if (sprite.hot.y >= sprite.physLimits.y2) -// sprite.hot.y = sprite.physLimits.y2 - 1; + if (xE && !syncEvents.playingEvents) + { + if (sprite.hot.pScreen != sprite.hotPhys.pScreen) + { + sprite.hot.pScreen = sprite.hotPhys.pScreen; + ROOT = sprite.hot.pScreen->root; + } + sprite.hot.x = XE_KBPTR.rootX; + sprite.hot.y = XE_KBPTR.rootY; + if (sprite.hot.x < sprite.physLimits.x1) + sprite.hot.x = sprite.physLimits.x1; + else if (sprite.hot.x >= sprite.physLimits.x2) + sprite.hot.x = sprite.physLimits.x2 - 1; + if (sprite.hot.y < sprite.physLimits.y1) + sprite.hot.y = sprite.physLimits.y1; + else if (sprite.hot.y >= sprite.physLimits.y2) + sprite.hot.y = sprite.physLimits.y2 - 1; #ifdef SHAPE -// if (sprite.hotShape) -// ConfineToShape(sprite.hotShape, &sprite.hot.x, &sprite.hot.y); + if (sprite.hotShape) + ConfineToShape(sprite.hotShape, &sprite.hot.x, &sprite.hot.y); #endif -// sprite.hotPhys = sprite.hot; -// -// /* -// * This code force cursor position to be inside the -// * root window of the agent. We can't view a reason -// * to do this and it interacts in an undesirable way -// * with toggling fullscreen. -// * -// * if ((sprite.hotPhys.x != XE_KBPTR.rootX) || -// * (sprite.hotPhys.y != XE_KBPTR.rootY)) -// * { -// * (*sprite.hotPhys.pScreen->SetCursorPosition)( -// * sprite.hotPhys.pScreen, -// * sprite.hotPhys.x, sprite.hotPhys.y, FALSE); -// * } -// */ -// -// XE_KBPTR.rootX = sprite.hot.x; -// XE_KBPTR.rootY = sprite.hot.y; -// } -// -// sprite.win = XYToWindow(sprite.hot.x, sprite.hot.y); + sprite.hotPhys = sprite.hot; + +#ifdef NXAGENT_SERVER + /* + * This code force cursor position to be inside the + * root window of the agent. We can't view a reason + * to do this and it interacts in an undesirable way + * with toggling fullscreen. + * + * if ((sprite.hotPhys.x != XE_KBPTR.rootX) || + * (sprite.hotPhys.y != XE_KBPTR.rootY)) + * { + * (*sprite.hotPhys.pScreen->SetCursorPosition)( + * sprite.hotPhys.pScreen, + * sprite.hotPhys.x, sprite.hotPhys.y, FALSE); + * } + */ +#else + if ((sprite.hotPhys.x != XE_KBPTR.rootX) || + (sprite.hotPhys.y != XE_KBPTR.rootY)) + { + (*sprite.hotPhys.pScreen->SetCursorPosition)( + sprite.hotPhys.pScreen, + sprite.hotPhys.x, sprite.hotPhys.y, FALSE); + } +#endif + XE_KBPTR.rootX = sprite.hot.x; + XE_KBPTR.rootY = sprite.hot.y; + } + + sprite.win = XYToWindow(sprite.hot.x, sprite.hot.y); #ifdef notyet -// if (!(sprite.win->deliverableEvents & -// Motion_Filter(inputInfo.pointer->button)) -// !syncEvents.playingEvents) -// { -// /* XXX Do PointerNonInterestBox here */ -// } + if (!(sprite.win->deliverableEvents & + Motion_Filter(inputInfo.pointer->button)) + !syncEvents.playingEvents) + { + /* XXX Do PointerNonInterestBox here */ + } #endif -// if (sprite.win != prevSpriteWin) -// { -// if (prevSpriteWin != NullWindow) { -// if (!xE) -// UpdateCurrentTimeIf(); -// DoEnterLeaveEvents(prevSpriteWin, sprite.win, NotifyNormal); -// } -// PostNewCursor(); -// return FALSE; -// } -// return TRUE; -// } + if (sprite.win != prevSpriteWin) + { + if (prevSpriteWin != NullWindow) { + if (!xE) + UpdateCurrentTimeIf(); + DoEnterLeaveEvents(prevSpriteWin, sprite.win, NotifyNormal); + } + PostNewCursor(); + return FALSE; + } + return TRUE; +} void DefineInitialRootWindow(register WindowPtr win) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 0e496e5d1830670e273df54adedd8e5b5d68ef92 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 12:06:31 2019 +0200 Screen.c: use consistent spacing on pointer references --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index bcb0c2661..432bc1b37 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1778,7 +1778,7 @@ N/A if (nxagentReportWindowIds) { - fprintf(stderr, "NXAGENT_WINDOW_ID: SCREEN_WINDOW:[%d],WID:[0x%x]\n", pScreen -> myNum, nxagentDefaultWindows[pScreen->myNum]); + fprintf(stderr, "NXAGENT_WINDOW_ID: SCREEN_WINDOW:[%d],WID:[0x%x]\n", pScreen->myNum, nxagentDefaultWindows[pScreen->myNum]); } if (nxagentOption(Rootless) == 0) @@ -1787,9 +1787,9 @@ N/A mask = PointerMotionMask; attributes.event_mask = mask; - nxagentInputWindows[pScreen -> myNum] = + nxagentInputWindows[pScreen->myNum] = XCreateWindow(nxagentDisplay, - nxagentDefaultWindows[pScreen -> myNum], + nxagentDefaultWindows[pScreen->myNum], 0, 0, nxagentOption(Width), nxagentOption(Height), @@ -1799,7 +1799,7 @@ N/A if (nxagentReportWindowIds) { - fprintf(stderr, "NXAGENT_WINDOW_ID: INPUT_WINDOW:[%d],WID:[0x%x]\n", pScreen -> myNum, nxagentInputWindows[pScreen->myNum]); + fprintf(stderr, "NXAGENT_WINDOW_ID: INPUT_WINDOW:[%d],WID:[0x%x]\n", pScreen->myNum, nxagentInputWindows[pScreen->myNum]); } } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 92f41213edf57332124df8e0b50ca73ff1a11773 Merge: 126cbe1ff a736122f5 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jun 11 12:00:48 2019 +0200 Merge branch 'uli42-pr/fix_broken_cursor_handling' into 3.6.x Attributes GH PR #810: https://github.com/ArcticaProject/nx-libs/pull/810 nx-X11/programs/Xserver/dix/events.c | 4 + nx-X11/programs/Xserver/hw/nxagent/NXevents.c | 141 ++++++++++++++------------ nx-X11/programs/Xserver/os/io.c | 2 - nx-X11/programs/Xserver/render/glyph.c | 3 +- 4 files changed, 81 insertions(+), 69 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 8365ce463e696ee1a0817f2a7808c48d43004ed2 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 12:05:24 2019 +0200 Screen.c: whitespace/formatting fixes --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 43 +++++++++++++++-------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 6bbe25e4d..bcb0c2661 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -404,7 +404,7 @@ Window nxagentCreateIconWindow(void) if (nxagentReportWindowIds) { - fprintf (stderr, "NXAGENT_WINDOW_ID: ICON_WINDOW,WID:[0x%x]\n", w); + fprintf(stderr, "NXAGENT_WINDOW_ID: ICON_WINDOW,WID:[0x%x]\n", w); } #ifdef TEST fprintf(stderr, "nxagentCreateIconWindow: Created new icon window with id [0x%x].\n", @@ -1778,28 +1778,29 @@ N/A if (nxagentReportWindowIds) { - fprintf (stderr, "NXAGENT_WINDOW_ID: SCREEN_WINDOW:[%d],WID:[0x%x]\n", pScreen -> myNum, nxagentDefaultWindows[pScreen->myNum]); + fprintf(stderr, "NXAGENT_WINDOW_ID: SCREEN_WINDOW:[%d],WID:[0x%x]\n", pScreen -> myNum, nxagentDefaultWindows[pScreen->myNum]); } - if (nxagentOption(Rootless) == 0) - { - valuemask = CWEventMask; - mask = PointerMotionMask; - attributes.event_mask = mask; - - nxagentInputWindows[pScreen -> myNum] = - XCreateWindow(nxagentDisplay, - nxagentDefaultWindows[pScreen -> myNum], - 0, 0, - nxagentOption(Width), - nxagentOption(Height), - 0, 0, InputOnly, - nxagentDefaultVisual(pScreen), - valuemask , &attributes); - if (nxagentReportWindowIds) - { - fprintf (stderr, "NXAGENT_WINDOW_ID: INPUT_WINDOW:[%d],WID:[0x%x]\n", pScreen -> myNum, nxagentInputWindows[pScreen->myNum]); - } + if (nxagentOption(Rootless) == 0) + { + valuemask = CWEventMask; + mask = PointerMotionMask; + attributes.event_mask = mask; + + nxagentInputWindows[pScreen -> myNum] = + XCreateWindow(nxagentDisplay, + nxagentDefaultWindows[pScreen -> myNum], + 0, 0, + nxagentOption(Width), + nxagentOption(Height), + 0, 0, InputOnly, + nxagentDefaultVisual(pScreen), + valuemask , &attributes); + + if (nxagentReportWindowIds) + { + fprintf(stderr, "NXAGENT_WINDOW_ID: INPUT_WINDOW:[%d],WID:[0x%x]\n", pScreen -> myNum, nxagentInputWindows[pScreen->myNum]); + } } #ifdef TEST -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit d98eeec0225fd729cd4f0f18da8adfb1f4c496fa Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 12:04:20 2019 +0200 Screen.c: report both created windows (and with the right name) --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index ff6d9fd7e..6bbe25e4d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1776,6 +1776,11 @@ N/A nxagentDefaultVisual(pScreen), valuemask, &attributes); + if (nxagentReportWindowIds) + { + fprintf (stderr, "NXAGENT_WINDOW_ID: SCREEN_WINDOW:[%d],WID:[0x%x]\n", pScreen -> myNum, nxagentDefaultWindows[pScreen->myNum]); + } + if (nxagentOption(Rootless) == 0) { valuemask = CWEventMask; @@ -1791,12 +1796,12 @@ N/A 0, 0, InputOnly, nxagentDefaultVisual(pScreen), valuemask , &attributes); + if (nxagentReportWindowIds) + { + fprintf (stderr, "NXAGENT_WINDOW_ID: INPUT_WINDOW:[%d],WID:[0x%x]\n", pScreen -> myNum, nxagentInputWindows[pScreen->myNum]); + } } - if (nxagentReportWindowIds) - { - fprintf (stderr, "NXAGENT_WINDOW_ID: SCREEN_WINDOW:[%d],WID:[0x%x]\n", pScreen -> myNum, nxagentInputWindows[pScreen->myNum]); - } #ifdef TEST fprintf(stderr, "nxagentOpenScreen: Created new default window with id [0x%x].\n", nxagentDefaultWindows[pScreen->myNum]); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 4b19c4975d5cfb6db0428870d5bf61b8ccb0ae64 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 15:21:45 2019 +0200 Clipboard.c: fix wrong variable being printed --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 13cfd81e6..f3c6cb1ad 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -305,7 +305,7 @@ void nxagentPrintClipboardStat(char *header) fprintf(stderr, " lastClientSelection (Atom) [% 4d][%s]\n", lastClientSelection, NameForAtom(lastClientSelection)); fprintf(stderr, " lastClientTarget (Atom) [% 4d][%s]\n", lastClientTarget, NameForAtom(lastClientTarget)); fprintf(stderr, " lastClientTime (Time) [%u]\n", lastServerTime); - fprintf(stderr, " lastClientReqTime (Time) [%u]\n", lastServerTime); + fprintf(stderr, " lastClientReqTime (Time) [%u]\n", lastServerReqTime); fprintf(stderr, " lastClientPropertySize (unsigned long) [%lu]\n", lastClientPropertySize); fprintf(stderr, " lastClientStage (ClientSelectionStage) [%d][%s]\n", lastClientStage, GetClientSelectionStageString(lastClientStage)); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 61255ac1ae0fa438b04d91aead68424df0360bd2 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 12:01:05 2019 +0200 Window.c: fix: report correct window on icon window creation --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 9ba217c8f..ff6d9fd7e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -404,11 +404,11 @@ Window nxagentCreateIconWindow(void) if (nxagentReportWindowIds) { - fprintf (stderr, "NXAGENT_WINDOW_ID: ICON_WINDOW,WID:[0x%x]\n", nxagentIconWindow); + fprintf (stderr, "NXAGENT_WINDOW_ID: ICON_WINDOW,WID:[0x%x]\n", w); } #ifdef TEST fprintf(stderr, "nxagentCreateIconWindow: Created new icon window with id [0x%x].\n", - nxagentIconWindow); + w); #endif /* -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit d9b1272fbd6c5228d75a68a393b098e039c11ab2 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 12:09:16 2019 +0200 Screen.c: more TEST output --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 432bc1b37..8568562c2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1781,6 +1781,11 @@ N/A fprintf(stderr, "NXAGENT_WINDOW_ID: SCREEN_WINDOW:[%d],WID:[0x%x]\n", pScreen->myNum, nxagentDefaultWindows[pScreen->myNum]); } + #ifdef TEST + fprintf(stderr, "nxagentOpenScreen: Created new default window for screen [%d] with id [0x%x].\n", + pScreen->myNum, nxagentDefaultWindows[pScreen->myNum]); + #endif + if (nxagentOption(Rootless) == 0) { valuemask = CWEventMask; @@ -1801,12 +1806,12 @@ N/A { fprintf(stderr, "NXAGENT_WINDOW_ID: INPUT_WINDOW:[%d],WID:[0x%x]\n", pScreen->myNum, nxagentInputWindows[pScreen->myNum]); } - } - #ifdef TEST - fprintf(stderr, "nxagentOpenScreen: Created new default window with id [0x%x].\n", - nxagentDefaultWindows[pScreen->myNum]); - #endif + #ifdef TEST + fprintf(stderr, "nxagentOpenScreen: Created new input window for screen [%d] with id [0x%x].\n", + pScreen->myNum, nxagentInputWindows[pScreen->myNum]); + #endif + } /* * Setting WM_CLASS to "X2GoAgent" when running in X2Go Agent mode -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit d38fb8137e77c6aa08189cc4bb131f0e5d8ccc0b Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 15:32:38 2019 +0200 Events.c: add debug output --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 5281b4b5c..7ec97dada 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2940,6 +2940,13 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X) #endif #ifdef DEBUG + fprintf(stderr, "%s: CurrentSelections[i].lastTimeChanged [%d]\n", __func__, CurrentSelections[i].lastTimeChanged.milliseconds); + fprintf(stderr, "%s: Event timestamp [%ld]\n", __func__, xfixesEvent->xfixesselection.timestamp); + fprintf(stderr, "%s: Event selection timestamp [%ld]\n", __func__, xfixesEvent->xfixesselection.selection_timestamp); + fprintf(stderr, "%s: Event selection window [0x%x]\n", __func__, xfixesEvent->xfixesselection.window); + fprintf(stderr, "%s: Event selection owner [0x%x]\n", __func__, xfixesEvent->xfixesselection.owner); + fprintf(stderr, "%s: Event selection [%s]\n", __func__, NameForAtom(nxagentRemoteToLocalAtom(xfixesEvent->xfixesselection.selection))); + fprintf(stderr, "nxagentHandleXFixesSelectionNotify: Subtype "); switch (xfixesEvent -> xfixesselection.subtype) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 39ff69c72554cc3e50a452f0ca3a707a4d542377 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat May 4 01:47:50 2019 +0200 NXmiexpose.c: use upstream miHandleExposures() It is (functionally) identical to our code, so why have duplicate code? --- nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c | 274 ------------------------ nx-X11/programs/Xserver/mi/miexpose.c | 2 - 2 files changed, 276 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c index 48b565564..ff331ecc2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c @@ -102,280 +102,6 @@ Equipment Corporation. #include "../../mi/miexpose.c" -/* miHandleExposures - generate a region for exposures for areas that were copied from obscured or -non-existent areas to non-obscured areas of the destination. Paint the -background for the region, if the destination is a window. - -NOTE: - this should generally be called, even if graphicsExposures is false, -because this is where bits get recovered from backing store. - -NOTE: - added argument 'plane' is used to indicate how exposures from backing -store should be accomplished. If plane is 0 (i.e. no bit plane), CopyArea -should be used, else a CopyPlane of the indicated plane will be used. The -exposing is done by the backing store's GraphicsExpose function, of course. - -*/ - -RegionPtr -miHandleExposures(pSrcDrawable, pDstDrawable, - pGC, srcx, srcy, width, height, dstx, dsty, plane) - register DrawablePtr pSrcDrawable; - register DrawablePtr pDstDrawable; - GCPtr pGC; - int srcx, srcy; - int width, height; - int dstx, dsty; - unsigned long plane; -{ - register ScreenPtr pscr; - RegionPtr prgnSrcClip; /* drawable-relative source clip */ - RegionRec rgnSrcRec; - RegionPtr prgnDstClip; /* drawable-relative dest clip */ - RegionRec rgnDstRec; - BoxRec srcBox; /* unclipped source */ - RegionRec rgnExposed; /* exposed region, calculated source- - relative, made dst relative to - intersect with visible parts of - dest and send events to client, - and then screen relative to paint - the window background - */ - WindowPtr pSrcWin; - BoxRec expBox; - Bool extents; - - /* - * Set the elements reported by the compiler - * as uninitialized. - */ - - expBox.x1 = 0; - expBox.y1 = 0; - expBox.x2 = 0; - expBox.y2 = 0; - - /* This prevents warning about pscr not being used. */ - pGC->pScreen = pscr = pGC->pScreen; - - /* avoid work if we can */ - if (!pGC->graphicsExposures && - (pDstDrawable->type == DRAWABLE_PIXMAP) && - ((pSrcDrawable->type == DRAWABLE_PIXMAP) || - (((WindowPtr)pSrcDrawable)->backStorage == NULL))) - return NULL; - - srcBox.x1 = srcx; - srcBox.y1 = srcy; - srcBox.x2 = srcx+width; - srcBox.y2 = srcy+height; - - if (pSrcDrawable->type != DRAWABLE_PIXMAP) - { - BoxRec TsrcBox; - - TsrcBox.x1 = srcx + pSrcDrawable->x; - TsrcBox.y1 = srcy + pSrcDrawable->y; - TsrcBox.x2 = TsrcBox.x1 + width; - TsrcBox.y2 = TsrcBox.y1 + height; - pSrcWin = (WindowPtr) pSrcDrawable; - if (pGC->subWindowMode == IncludeInferiors) - { - prgnSrcClip = NotClippedByChildren (pSrcWin); - if ((RegionContainsRect(prgnSrcClip, &TsrcBox)) == rgnIN) - { - RegionDestroy(prgnSrcClip); - return NULL; - } - } - else - { - if ((RegionContainsRect(&pSrcWin->clipList, &TsrcBox)) == rgnIN) - return NULL; - prgnSrcClip = &rgnSrcRec; - RegionNull(prgnSrcClip); - RegionCopy(prgnSrcClip, &pSrcWin->clipList); - } - RegionTranslate(prgnSrcClip, - -pSrcDrawable->x, -pSrcDrawable->y); - } - else - { - BoxRec box; - - if ((srcBox.x1 >= 0) && (srcBox.y1 >= 0) && - (srcBox.x2 <= pSrcDrawable->width) && - (srcBox.y2 <= pSrcDrawable->height)) - return NULL; - - box.x1 = 0; - box.y1 = 0; - box.x2 = pSrcDrawable->width; - box.y2 = pSrcDrawable->height; - prgnSrcClip = &rgnSrcRec; - RegionInit(prgnSrcClip, &box, 1); - pSrcWin = (WindowPtr)NULL; - } - - if (pDstDrawable == pSrcDrawable) - { - prgnDstClip = prgnSrcClip; - } - else if (pDstDrawable->type != DRAWABLE_PIXMAP) - { - if (pGC->subWindowMode == IncludeInferiors) - { - prgnDstClip = NotClippedByChildren((WindowPtr)pDstDrawable); - } - else - { - prgnDstClip = &rgnDstRec; - RegionNull(prgnDstClip); - RegionCopy(prgnDstClip, - &((WindowPtr)pDstDrawable)->clipList); - } - RegionTranslate(prgnDstClip, - -pDstDrawable->x, -pDstDrawable->y); - } - else - { - BoxRec box; - - box.x1 = 0; - box.y1 = 0; - box.x2 = pDstDrawable->width; - box.y2 = pDstDrawable->height; - prgnDstClip = &rgnDstRec; - RegionInit(prgnDstClip, &box, 1); - } - - /* drawable-relative source region */ - RegionInit(&rgnExposed, &srcBox, 1); - - /* now get the hidden parts of the source box*/ - RegionSubtract(&rgnExposed, &rgnExposed, prgnSrcClip); - - if (pSrcWin && pSrcWin->backStorage) - { - /* - * Copy any areas from the source backing store. Modifies - * rgnExposed. - */ - (* pSrcWin->drawable.pScreen->ExposeCopy) ((WindowPtr)pSrcDrawable, - pDstDrawable, - pGC, - &rgnExposed, - srcx, srcy, - dstx, dsty, - plane); - } - - /* move them over the destination */ - RegionTranslate(&rgnExposed, dstx-srcx, dsty-srcy); - - /* intersect with visible areas of dest */ - RegionIntersect(&rgnExposed, &rgnExposed, prgnDstClip); - - /* - * If we have LOTS of rectangles, we decide to take the extents - * and force an exposure on that. This should require much less - * work overall, on both client and server. This is cheating, but - * isn't prohibited by the protocol ("spontaneous combustion" :-) - * for windows. - */ - extents = pGC->graphicsExposures && - (RegionNumRects(&rgnExposed) > RECTLIMIT) && - (pDstDrawable->type != DRAWABLE_PIXMAP); -#ifdef SHAPE - if (pSrcWin) - { - RegionPtr region; - if (!(region = wClipShape (pSrcWin))) - region = wBoundingShape (pSrcWin); - /* - * If you try to CopyArea the extents of a shaped window, compacting the - * exposed region will undo all our work! - */ - if (extents && pSrcWin && region && - (RegionContainsRect(region, &srcBox) != rgnIN)) - extents = FALSE; - } -#endif - if (extents) - { - WindowPtr pWin = (WindowPtr)pDstDrawable; - - expBox = *RegionExtents(&rgnExposed); - RegionReset(&rgnExposed, &expBox); - /* need to clear out new areas of backing store */ - if (pWin->backStorage) - (void) (* pWin->drawable.pScreen->ClearBackingStore)( - pWin, - expBox.x1, - expBox.y1, - expBox.x2 - expBox.x1, - expBox.y2 - expBox.y1, - FALSE); - } - if ((pDstDrawable->type != DRAWABLE_PIXMAP) && - (((WindowPtr)pDstDrawable)->backgroundState != None)) - { - WindowPtr pWin = (WindowPtr)pDstDrawable; - - /* make the exposed area screen-relative */ - RegionTranslate(&rgnExposed, - pDstDrawable->x, pDstDrawable->y); - - if (extents) - { - /* PaintWindowBackground doesn't clip, so we have to */ - RegionIntersect(&rgnExposed, &rgnExposed, &pWin->clipList); - } - (*pWin->drawable.pScreen->PaintWindowBackground)( - (WindowPtr)pDstDrawable, &rgnExposed, PW_BACKGROUND); - - if (extents) - { - RegionReset(&rgnExposed, &expBox); - } - else - RegionTranslate(&rgnExposed, - -pDstDrawable->x, -pDstDrawable->y); - } - if (prgnDstClip == &rgnDstRec) - { - RegionUninit(prgnDstClip); - } - else if (prgnDstClip != prgnSrcClip) - { - RegionDestroy(prgnDstClip); - } - - if (prgnSrcClip == &rgnSrcRec) - { - RegionUninit(prgnSrcClip); - } - else - { - RegionDestroy(prgnSrcClip); - } - - if (pGC->graphicsExposures) - { - /* don't look */ - RegionPtr exposed = RegionCreate(NullBox, 0); - *exposed = rgnExposed; - return exposed; - } - else - { - RegionUninit(&rgnExposed); - return NULL; - } -} - void miWindowExposures(pWin, prgn, other_exposed) WindowPtr pWin; diff --git a/nx-X11/programs/Xserver/mi/miexpose.c b/nx-X11/programs/Xserver/mi/miexpose.c index 9135d2e6e..520b0ed7a 100644 --- a/nx-X11/programs/Xserver/mi/miexpose.c +++ b/nx-X11/programs/Xserver/mi/miexpose.c @@ -126,7 +126,6 @@ exposing is done by the backing store's GraphicsExpose function, of course. */ -#ifndef NXAGENT_SERVER RegionPtr miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, dstx, dsty, plane) @@ -373,7 +372,6 @@ miHandleExposures(pSrcDrawable, pDstDrawable, return NULL; } } -#endif /* send GraphicsExpose events, or a NoExpose event, based on the region */ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 9739c7009513fc6e72265da40ca2e488152fbda2 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 15:23:55 2019 +0200 Clipboard.c: Scope improvements --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index f3c6cb1ad..3045698ed 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -392,8 +392,6 @@ Bool nxagentValidServerTargets(Atom target) void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) { - int i; - #ifdef DEBUG fprintf(stderr, "%s: Called with client [%p] window [%p].\n", __func__, (void *) pClient, (void *) pWindow); @@ -405,7 +403,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow) * Only for PRIMARY and CLIPBOARD selections. */ - for (i = 0; i < nxagentMaxSelections; i++) + for (int i = 0; i < nxagentMaxSelections; i++) { if ((pClient != NULL && lastSelectionOwner[i].client == pClient) || (pWindow != NULL && lastSelectionOwner[i].windowPtr == pWindow)) @@ -1259,7 +1257,6 @@ void nxagentResetSelectionOwner(void) void nxagentSetSelectionOwner(Selection *pSelection) { - int i; #ifdef DEBUG fprintf(stderr, "%s: Got called.\n", __func__); #endif @@ -1286,7 +1283,7 @@ void nxagentSetSelectionOwner(Selection *pSelection) * Only for PRIMARY and CLIPBOARD selections. */ - for (i = 0; i < nxagentMaxSelections; i++) + for (int i = 0; i < nxagentMaxSelections; i++) { if (pSelection->selection == CurrentSelections[i].selection) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit af1c4b9b7b83426f1fde1cfb906b2ee26e947576 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat May 25 17:29:17 2019 +0200 NXmiexpose.c: mark NX changes --- nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c index 085684fc1..146ecad75 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c @@ -107,9 +107,6 @@ miWindowExposures(pWin, prgn, other_exposed) WindowPtr pWin; register RegionPtr prgn, other_exposed; { - - int total; - RegionPtr exposures = prgn; if (pWin->backStorage && prgn) /* @@ -146,15 +143,19 @@ miWindowExposures(pWin, prgn, other_exposed) exposures = other_exposed; } +#ifdef NXAGENT_SERVER /* * If the number of rectangles is greater * than 4, let the function decide. */ - total = RegionNumRects(exposures); + int total = RegionNumRects(exposures); if (clientInterested && exposures && (total > RECTLIMIT || (total > 4 && nxagentExtentsPredicate(total) == 1))) + #else + if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT)) + #endif { /* * If we have LOTS of rectangles, we decide to take the extents -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit a2523273485c6a3c9c598a2088bcea354815db81 Merge: 92f41213e 2da476a67 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jun 11 12:05:42 2019 +0200 Merge branch 'uli42-pr/various_small_things' into 3.6.x Attributes GH PR #813: https://github.com/ArcticaProject/nx-libs/pull/813 nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 27 +++- nx-X11/programs/Xserver/hw/nxagent/Events.c | 7 + nx-X11/programs/Xserver/hw/nxagent/Screen.c | 55 ++++---- nx-X11/programs/Xserver/hw/nxagent/Window.c | 174 +++++++++++++++++++++++-- 4 files changed, 226 insertions(+), 37 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 9cb29cce25cf5d313951bbba161ffe01ed169027 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 15:27:02 2019 +0200 Clipboard.c: more debugging output --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 3045698ed..824c1dc47 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1239,7 +1239,9 @@ void nxagentResetSelectionOwner(void) { XSetSelectionOwner(nxagentDisplay, lastSelectionOwner[i].selection, serverWindow, CurrentTime); + #ifdef DEBUG fprintf(stderr, "%s: Reset clipboard state.\n", __func__); + #endif lastSelectionOwner[i].client = NULL; lastSelectionOwner[i].window = None; @@ -1267,7 +1269,7 @@ void nxagentSetSelectionOwner(Selection *pSelection) } #ifdef DEBUG - fprintf(stderr, "%s: Setting selection owner to window [0x%x].\n", __func__, + fprintf(stderr, "%s: Setting selection owner to serverwindow ([0x%x]).\n", __func__, serverWindow); #endif @@ -1287,6 +1289,20 @@ void nxagentSetSelectionOwner(Selection *pSelection) { if (pSelection->selection == CurrentSelections[i].selection) { + #ifdef DEBUG + fprintf(stderr, "%s: lastSelectionOwner.client [0x%x] -> [0x%x]\n", __func__, lastSelectionOwner[i].client, pSelection->client); + fprintf(stderr, "%s: lastSelectionOwner.window [0x%x] -> [0x%x]\n", __func__, lastSelectionOwner[i].window, pSelection->window); + fprintf(stderr, "%s: lastSelectionOwner.windowPtr [0x%x] -> [0x%x] [0x%x] (serverWindow: [0x%x])\n", __func__, lastSelectionOwner[i].windowPtr, pSelection->pWin, nxagentWindow(pSelection->pWin), serverWindow); + fprintf(stderr, "%s: lastSelectionOwner.lastTimeChanged [%d]\n", __func__, lastSelectionOwner[i].lastTimeChanged); + #endif + + /* + * inform the real X server that our serverWindow is the + * clipboard owner. The real owner window (inside nxagent) is + * stored in lastSelectionOwner.window. + * lastSelectionOwner.windowPtr points to the struct that + * contains all information about the owner window + */ XSetSelectionOwner(nxagentDisplay, lastSelectionOwner[i].selection, serverWindow, CurrentTime); lastSelectionOwner[i].client = pSelection->client; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 2da476a67e1580d4957755e0c6cc3df2321b038b Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu May 30 11:36:18 2019 +0200 Window.c: comment on the purpose of some functions --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 174 ++++++++++++++++++++++++++-- 1 file changed, 166 insertions(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index c404d0a46..c5c533934 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -247,6 +247,15 @@ WindowPtr nxagentWindowPtr(Window window) return match.pWin; } +/* + * from "Definition of the Porting Layer for X v11 Sample Server": + * + * This routine is a hook for when DIX creates a window. It should + * fill in the "Window Procedures in the WindowRec" below and also + * allocate the devPrivate block for it. + * + * See Xserver/fb/fbwindow.c for the sample server implementation. + */ Bool nxagentCreateWindow(WindowPtr pWin) { unsigned long mask; @@ -530,7 +539,7 @@ void nxagentSetVersionProperty(WindowPtr pWin) #ifdef DEBUG else { - fprintf(stderr, "%s: Added property [%s], value [%s] for root window [%x].\n", __func__, name, NX_VERSION_CURRENT_STRING, pWin); + fprintf(stderr, "%s: Added property [%s], value [%s] for root window [%x].\n", __func__, name, NX_VERSION_CURRENT_STRING, pWin); } #endif } @@ -553,6 +562,15 @@ Bool nxagentSomeWindowsAreMapped(void) return False; } +/* + * from "Definition of the Porting Layer for X v11 Sample Server": + * + * This routine is a hook for when DIX destroys a window. It should + * deallocate the devPrivate block for it and any other blocks that + * need to be freed, besides doing other cleanup actions. + * + * See Xserver/fb/fbwindow.c for the sample server implementation. + */ Bool nxagentDestroyWindow(WindowPtr pWin) { nxagentPrivWindowPtr pWindowPriv; @@ -683,6 +701,20 @@ Bool nxagentDestroyWindow(WindowPtr pWin) return True; } +/* + * from "Definition of the Porting Layer for X v11 Sample Server": + * + * This routine is a hook for when DIX moves or resizes a window. It + * should do whatever private operations need to be done when a window + * is moved or resized. For instance, if DDX keeps a pixmap tile used + * for drawing the background or border, and it keeps the tile rotated + * such that it is longword aligned to longword locations in the frame + * buffer, then you should rotate your tiles here. The actual graphics + * involved in moving the pixels on the screen and drawing the border + * are handled by CopyWindow(), below. + * + * See Xserver/fb/fbwindow.c for the sample server implementation. + */ Bool nxagentPositionWindow(WindowPtr pWin, int x, int y) { if (nxagentScreenTrap == 1) @@ -1218,6 +1250,15 @@ void nxagentMoveViewport(ScreenPtr pScreen, int hShift, int vShift) nxagentOption(Width), nxagentOption(Height)); } +/* + * This will update the window on the real X server by calling + * XConfigureWindow()/XMapWindow()/XLowerWindow()/XRaiseWindow() + * mask definesthe values that need to be updated, see e.g + * man XConfigureWindow. + * + * In addition to the bit flags known to Xorg it uses these + * self-defined ones: CW_Update, CW_Shape, CW_Map, CW_RootlessRestack. + */ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) { unsigned int valuemask; @@ -1510,6 +1551,16 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) } } +/* + * from "Definition of the Porting Layer for X v11 Sample Server": + * + * This function will be called when a window is reparented. At the + * time of the call, pWin will already be spliced into its new + * position in the window tree, and pPriorParent is its previous + * parent. This function can be NULL. + * + * We simply pass this pver to the real X server. + */ void nxagentReparentWindow(WindowPtr pWin, WindowPtr pOldParent) { if (nxagentScreenTrap) @@ -1529,6 +1580,16 @@ void nxagentReparentWindow(WindowPtr pWin, WindowPtr pOldParent) pWin->origin.y - wBorderWidth(pWin)); } +/* + * from "Definition of the Porting Layer for X v11 Sample Server": + * + * ChangeWindowAttributes is called whenever DIX changes window + * attributes, such as the size, front-to-back ordering, title, or + * anything of lesser severity that affects the window itself. The + * sample server implements this routine. It computes accelerators for + * quickly putting up background and border tiles. (See description of + * the set of routines stored in the WindowRec.) + */ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) { XSetWindowAttributes attributes; @@ -1822,6 +1883,7 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask) return 1; } +/* Set the WM_STATE property of pWin to the desired value */ void nxagentSetWMState(WindowPtr pWin, CARD32 desired) { Atom prop = MakeAtom("WM_STATE", strlen("WM_STATE"), True); @@ -1834,6 +1896,20 @@ void nxagentSetWMState(WindowPtr pWin, CARD32 desired) } } +/* + * from "Definition of the Porting Layer for X v11 Sample Server": + * + * RealizeWindow/UnRealizeWindow: + * These routines are hooks for when DIX maps (makes visible) and + * unmaps (makes invisible) a window. It should do whatever private + * operations need to be done when these happen, such as allocating or + * deallocating structures that are only needed for visible + * windows. RealizeWindow does NOT draw the window border, background + * or contents; UnrealizeWindow does NOT erase the window or generate + * exposure events for underlying windows; this is taken care of by + * DIX. DIX does, however, call PaintWindowBackground() and + * PaintWindowBorder() to perform some of these. +-+ */ Bool nxagentRealizeWindow(WindowPtr pWin) { if (nxagentScreenTrap == 1) @@ -1894,6 +1970,7 @@ Bool nxagentRealizeWindow(WindowPtr pWin) return True; } +/* See nxagentRealizeWindow for a description */ Bool nxagentUnrealizeWindow(WindowPtr pWin) { if (nxagentScreenTrap) @@ -1918,8 +1995,6 @@ Bool nxagentUnrealizeWindow(WindowPtr pWin) void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) { - void (*PaintWindowBackgroundBackup)(WindowPtr, RegionPtr, int); - if (pWin->backgroundState == BackgroundPixmap) { pWin->background.pixmap = nxagentVirtualPixmap(pWin->background.pixmap); @@ -1930,13 +2005,22 @@ void nxagentFrameBufferPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what) pWin->border.pixmap = nxagentVirtualPixmap(pWin->border.pixmap); } - PaintWindowBackgroundBackup = pWin->drawable.pScreen -> PaintWindowBackground; + /* + * Call fbPaintWindow(). We need to temporarily replace + * PaintWindowBackground() by ourself because fbPaintWindow() is + * recursively calling it for parent windows, too. + */ + { + void (*PaintWindowBackgroundBackup)(WindowPtr, RegionPtr, int); - pWin->drawable.pScreen -> PaintWindowBackground = nxagentFrameBufferPaintWindow; + PaintWindowBackgroundBackup = pWin->drawable.pScreen -> PaintWindowBackground; - fbPaintWindow(pWin, pRegion, what); + pWin->drawable.pScreen -> PaintWindowBackground = nxagentFrameBufferPaintWindow; - pWin->drawable.pScreen -> PaintWindowBackground = PaintWindowBackgroundBackup; + fbPaintWindow(pWin, pRegion, what); + + pWin->drawable.pScreen -> PaintWindowBackground = PaintWindowBackgroundBackup; + } if (pWin->backgroundState == BackgroundPixmap) { @@ -2003,11 +2087,46 @@ void nxagentPaintWindowBorder(WindowPtr pWin, RegionPtr pRegion, int what) RegionUninit(&temp); } +/* + * from "Definition of the Porting Layer for X v11 Sample Server": + * + * CopyWindow is called when a window is moved, and graphically moves + * to pixels of a window on the screen. It should not change any other + * state within DDX (see PositionWindow(), above). + * + * oldpt is the old location of the upper-left corner. oldRegion is + * the old region it is coming from. The new location and new region + * is stored in the WindowRec. oldRegion might modified in place by + * this routine (the sample implementation does this). + * + * CopyArea could be used, except that this operation has more + * complications. First of all, you do not want to copy a rectangle + * onto a rectangle. The original window may be obscured by other + * windows, and the new window location may be similarly + * obscured. Second, some hardware supports multiple windows with + * multiple depths, and your routine needs to take care of that. + * + * The pixels in oldRegion (with reference point oldpt) are copied to + * the window's new region (pWin->borderClip). pWin->borderClip is + * gotten directly from the window, rather than passing it as a + * parameter. + * + * The sample server implementation is in Xserver/fb/fbwindow.c. + */ void nxagentCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion) { fbCopyWindow(pWin, oldOrigin, oldRegion); } +/* + * from "Definition of the Porting Layer for X v11 Sample Server": + * + * Whenever the cliplist for a window is changed, this function is + * called to perform whatever hardware manipulations might be + * necessary. When called, the clip list and border clip regions in + * the window are set to the new values. dx,dy are the distance that + * the window has been moved (if at all). + */ void nxagentClipNotify(WindowPtr pWin, int dx, int dy) { /* @@ -2026,6 +2145,20 @@ void nxagentClipNotify(WindowPtr pWin, int dx, int dy) #endif /* NXAGENT_SHAPE */ } +/* + * from "Definition of the Porting Layer for X v11 Sample Server": + * + * The WindowExposures() routine paints the border and generates + * exposure events for the window. pRegion is an unoccluded region of + * the window, and pBSRegion is an occluded region that has backing + * store. Since exposure events include a rectangle describing what + * was exposed, this routine may have to send back a series of + * exposure events, one for each rectangle of the region. The count + * field in the expose event is a hint to the client as to the number + * of regions that are after this one. This routine must be + * provided. The sample server has a machine-independent version in + * Xserver/mi/miexpose.c. + */ void nxagentWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed) { /* @@ -3340,6 +3473,7 @@ Bool nxagentIsIconic(WindowPtr pWin) } } +/* pass Eventmask to the real X server (for the rootless toplevel window only) */ void nxagentSetTopLevelEventMask(WindowPtr pWin) { if (nxagentOption(Rootless) && nxagentWindowTopLevel(pWin)) @@ -3408,7 +3542,7 @@ void nxagentFlushConfigureWindow(void) index = index -> prev; free(tmp); } -} + } nxagentConfiguredWindowList = NULL; @@ -3438,6 +3572,14 @@ void nxagentFlushConfigureWindow(void) return; } +/* + * from "Definition of the Porting Layer for X v11 Sample Server": + * + * If this routine is not NULL, DIX calls it shortly after calling + * ValidateTree, passing it the same arguments. This is useful for + * managing multi-layered framebuffers. The sample server sets this to + * NULL. + */ void nxagentPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) { /* @@ -3449,6 +3591,16 @@ void nxagentPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind) return; } +/* + * Add the given window to the beginning of + * nxagentconfiguredWindowList. This list collects all windows that + * need to be reconfigured on the real X server. valuemask defines + * what changes need to be done. The required values (like position, + * size, ...) are already stored in pWin). + * + * Note that we just add the window to the list here. The actual work + * will be done by nxagentFlushConfigureWindow() later. + */ void nxagentAddConfiguredWindow(WindowPtr pWin, unsigned int valuemask) { unsigned int mask; @@ -3518,6 +3670,12 @@ void nxagentAddConfiguredWindow(WindowPtr pWin, unsigned int valuemask) return; } +/* + * remove pWin from nxgentConfigureWindowList + * + * This is just updating the linked list and freeing the + * given entry. It will not perform any X stuff + */ void nxagentDeleteConfiguredWindow(WindowPtr pWin) { ConfiguredWindowStruct *index, *previous, *tmp; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 9e051eab0fee0915702c6752669542c7cc40de18 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 1 01:22:39 2019 +0200 NXmiexpose.c: use upstream version of miPaintWindows() miPaintWindow() was identical to the version in miexpose.c except for some unitialized variable fixes. As these also should be in upstream code we add them there (Note: Xorg never fixed this but totally rewrote the miPaintWindow() later on.) This allows us to totally drop our special version of miPaintWindow(). --- nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c | 269 ------------------------ nx-X11/programs/Xserver/mi/miexpose.c | 6 +- 2 files changed, 2 insertions(+), 273 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c index ff331ecc2..085684fc1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c @@ -202,272 +202,3 @@ miWindowExposures(pWin, prgn, other_exposed) else if (exposures && exposures != prgn) RegionDestroy(exposures); } - -void -miPaintWindow(pWin, prgn, what) -register WindowPtr pWin; -RegionPtr prgn; -int what; -{ - int status; - - Bool usingScratchGC = FALSE; - WindowPtr pRoot; - -#define FUNCTION 0 -#define FOREGROUND 1 -#define TILE 2 -#define FILLSTYLE 3 -#define ABSX 4 -#define ABSY 5 -#define CLIPMASK 6 -#define SUBWINDOW 7 -#define COUNT_BITS 8 - - ChangeGCVal gcval[7]; - ChangeGCVal newValues [COUNT_BITS] = {{ 0 }}; - - BITS32 gcmask, index, mask; - RegionRec prgnWin; - DDXPointRec oldCorner; - BoxRec box = {0}; - WindowPtr pBgWin; - GCPtr pGC; - register int i; - register BoxPtr pbox; - register ScreenPtr pScreen = pWin->drawable.pScreen; - register xRectangle *prect; - int numRects; - - /* - * Set the elements reported by the compiler - * as uninitialized. - */ - - prgnWin.extents.x1 = 0; - prgnWin.extents.y1 = 0; - prgnWin.extents.x2 = 0; - prgnWin.extents.y2 = 0; - - prgnWin.data = NULL; - - oldCorner.x = 0; - oldCorner.y = 0; - - gcmask = 0; - - if (what == PW_BACKGROUND) - { - switch (pWin->backgroundState) { - case None: - return; - case ParentRelative: - (*pWin->parent->drawable.pScreen->PaintWindowBackground)(pWin->parent, prgn, what); - return; - case BackgroundPixel: - newValues[FOREGROUND].val = pWin->background.pixel; - newValues[FILLSTYLE].val = FillSolid; - gcmask |= GCForeground | GCFillStyle; - break; - case BackgroundPixmap: - newValues[TILE].ptr = (void *)pWin->background.pixmap; - newValues[FILLSTYLE].val = FillTiled; - gcmask |= GCTile | GCFillStyle | GCTileStipXOrigin | GCTileStipYOrigin; - break; - } - } - else - { - if (pWin->borderIsPixel) - { - newValues[FOREGROUND].val = pWin->border.pixel; - newValues[FILLSTYLE].val = FillSolid; - gcmask |= GCForeground | GCFillStyle; - } - else - { - newValues[TILE].ptr = (void *)pWin->border.pixmap; - newValues[FILLSTYLE].val = FillTiled; - gcmask |= GCTile | GCFillStyle | GCTileStipXOrigin | GCTileStipYOrigin; - } - } - - prect = (xRectangle *)calloc(RegionNumRects(prgn), sizeof(xRectangle)); - if (!prect) - return; - - newValues[FUNCTION].val = GXcopy; - gcmask |= GCFunction | GCClipMask; - - i = pScreen->myNum; - pRoot = screenInfo.screens[i]->root; - - pBgWin = pWin; - if (what == PW_BORDER) - { - while (pBgWin->backgroundState == ParentRelative) - pBgWin = pBgWin->parent; - } - - if ((pWin->drawable.depth != pRoot->drawable.depth) || - (pWin->drawable.bitsPerPixel != pRoot->drawable.bitsPerPixel)) - { - usingScratchGC = TRUE; - pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen); - if (!pGC) - { - free(prect); - return; - } - /* - * mash the clip list so we can paint the border by - * mangling the window in place, pretending it - * spans the entire screen - */ - if (what == PW_BORDER) - { - prgnWin = pWin->clipList; - oldCorner.x = pWin->drawable.x; - oldCorner.y = pWin->drawable.y; - pWin->drawable.x = pWin->drawable.y = 0; - box.x1 = 0; - box.y1 = 0; - box.x2 = pScreen->width; - box.y2 = pScreen->height; - RegionInit(&pWin->clipList, &box, 1); - pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; - newValues[ABSX].val = pBgWin->drawable.x; - newValues[ABSY].val = pBgWin->drawable.y; - } - else - { - newValues[ABSX].val = 0; - newValues[ABSY].val = 0; - } - } else { - /* - * draw the background to the root window - */ - if (screenContext[i] == (GCPtr)NULL) - { - if (!ResType && !(ResType = CreateNewResourceType(tossGC))) - return; - screenContext[i] = CreateGC((DrawablePtr)pWin, (BITS32) 0, - (XID *)NULL, &status); - if (!screenContext[i]) { - free(prect); - return; - } - numGCs++; - if (!AddResource(FakeClientID(0), ResType, - (void *)screenContext[i])) - { - free(prect); - return; - } - } - pGC = screenContext[i]; - newValues[SUBWINDOW].val = IncludeInferiors; - newValues[ABSX].val = pBgWin->drawable.x; - newValues[ABSY].val = pBgWin->drawable.y; - gcmask |= GCSubwindowMode; - pWin = pRoot; - } - - if (pWin->backStorage) - (*pWin->drawable.pScreen->DrawGuarantee) (pWin, pGC, GuaranteeVisBack); - - mask = gcmask; - gcmask = 0; - i = 0; - while (mask) { - index = lowbit (mask); - mask &= ~index; - switch (index) { - case GCFunction: - if (pGC->alu != newValues[FUNCTION].val) { - gcmask |= index; - gcval[i++].val = newValues[FUNCTION].val; - } - break; - case GCTileStipXOrigin: - if ( pGC->patOrg.x != newValues[ABSX].val) { - gcmask |= index; - gcval[i++].val = newValues[ABSX].val; - } - break; - case GCTileStipYOrigin: - if ( pGC->patOrg.y != newValues[ABSY].val) { - gcmask |= index; - gcval[i++].val = newValues[ABSY].val; - } - break; - case GCClipMask: - if ( pGC->clientClipType != CT_NONE) { - gcmask |= index; - gcval[i++].val = CT_NONE; - } - break; - case GCSubwindowMode: - if ( pGC->subWindowMode != newValues[SUBWINDOW].val) { - gcmask |= index; - gcval[i++].val = newValues[SUBWINDOW].val; - } - break; - case GCTile: - if (pGC->tileIsPixel || pGC->tile.pixmap != newValues[TILE].ptr) - { - gcmask |= index; - gcval[i++].ptr = newValues[TILE].ptr; - } - break; - case GCFillStyle: - if ( pGC->fillStyle != newValues[FILLSTYLE].val) { - gcmask |= index; - gcval[i++].val = newValues[FILLSTYLE].val; - } - break; - case GCForeground: - if ( pGC->fgPixel != newValues[FOREGROUND].val) { - gcmask |= index; - gcval[i++].val = newValues[FOREGROUND].val; - } - break; - } - } - - if (gcmask) - dixChangeGC(NullClient, pGC, gcmask, NULL, gcval); - - if (pWin->drawable.serialNumber != pGC->serialNumber) - ValidateGC((DrawablePtr)pWin, pGC); - - numRects = RegionNumRects(prgn); - pbox = RegionRects(prgn); - for (i= numRects; --i >= 0; pbox++, prect++) - { - prect->x = pbox->x1 - pWin->drawable.x; - prect->y = pbox->y1 - pWin->drawable.y; - prect->width = pbox->x2 - pbox->x1; - prect->height = pbox->y2 - pbox->y1; - } - prect -= numRects; - (*pGC->ops->PolyFillRect)((DrawablePtr)pWin, pGC, numRects, prect); - free(prect); - - if (pWin->backStorage) - (*pWin->drawable.pScreen->DrawGuarantee) (pWin, pGC, GuaranteeNothing); - - if (usingScratchGC) - { - if (what == PW_BORDER) - { - RegionUninit(&pWin->clipList); - pWin->clipList = prgnWin; - pWin->drawable.x = oldCorner.x; - pWin->drawable.y = oldCorner.y; - pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; - } - FreeScratchGC(pGC); - } -} diff --git a/nx-X11/programs/Xserver/mi/miexpose.c b/nx-X11/programs/Xserver/mi/miexpose.c index 520b0ed7a..d2bf93c6c 100644 --- a/nx-X11/programs/Xserver/mi/miexpose.c +++ b/nx-X11/programs/Xserver/mi/miexpose.c @@ -626,7 +626,6 @@ tossGC ( return 0; } -#ifndef NXAGENT_SERVER void miPaintWindow(pWin, prgn, what) register WindowPtr pWin; @@ -652,8 +651,8 @@ int what; ChangeGCVal newValues [COUNT_BITS] = {{ 0 }}; BITS32 gcmask, index, mask; - RegionRec prgnWin; - DDXPointRec oldCorner; + RegionRec prgnWin = {0}; + DDXPointRec oldCorner = {0}; BoxRec box = {0}; WindowPtr pBgWin; GCPtr pGC; @@ -881,7 +880,6 @@ int what; FreeScratchGC(pGC); } } -#endif /* MICLEARDRAWABLE -- sets the entire drawable to the background color of * the GC. Useful when we have a scratch drawable and need to initialize -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 3fd7e5f93fe0cc3198c5cc2fb5da9635b849c5be Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 14:18:06 2019 +0200 Add nxagentExternalClipboardEventTrap --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 12 ++++++++++++ nx-X11/programs/Xserver/hw/nxagent/Trap.c | 8 ++++++++ nx-X11/programs/Xserver/hw/nxagent/Trap.h | 8 ++++++++ 3 files changed, 28 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 7ec97dada..4bddbba3a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2968,7 +2968,19 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X) info.selection = &CurrentSelections[i]; info.kind = xfixesEvent->xfixesselection.subtype; + + /* + * The trap indicates that we are triggered by a clipboard event + * originating from the real X server. In that case we do not + * want to propagate back changes to the real X server, because + * it already knows about them and we would end up in an + * infinite loop of events. If there was a better way to + * identify that situation during Callback processing we could + * get rid of the Trap... + */ + nxagentExternalClipboardEventTrap = 1; CallCallbacks(&SelectionCallback, &info); + nxagentExternalClipboardEventTrap = 0; } } return 1; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Trap.c b/nx-X11/programs/Xserver/hw/nxagent/Trap.c index c582f6a16..f219bb43c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Trap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Trap.c @@ -120,3 +120,11 @@ int nxagentXkbCapsTrap = 0; int nxagentXkbNumTrap = 0; + +/* + * Set to indicate we are processing a clipboard event triggered by + * the real X server. This is used to avoid endless loops if callbacks + * would trigger another event by the real X server + */ + +int nxagentExternalClipboardEventTrap = 0; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Trap.h b/nx-X11/programs/Xserver/hw/nxagent/Trap.h index f0884f657..9f0c055c8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Trap.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Trap.h @@ -121,4 +121,12 @@ extern int nxagentXkbCapsTrap; extern int nxagentXkbNumTrap; +/* + * Set to indicate we are processing a clipboard event triggered by + * the real X server. This is used to avoid endless loops if callbacks + * would trigger another event by the real X server + */ + +extern int nxagentExternalClipboardEventTrap; + #endif /* __Trap_H__ */ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 2972f6af1b63f4e98aa4504a83f756b8486c7df0 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 14:20:47 2019 +0200 Add nxagentSetSelectionCallback --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 69 ++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 824c1dc47..9c518801b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1257,6 +1257,75 @@ void nxagentResetSelectionOwner(void) return; } +#ifdef NXAGENT_CLIPBOARD +void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data, + void *args) +{ + /* + * Only act if the Trap is unset. The trap indicates that we are + * triggered by a clipboard event originating from the real X + * server. In that case we do not want to propagate back changes to + * the real X server, because it already knows about them and we + * would end up in an infinite loop of events. If there was a better + * way to identify that situation during Callback processing we + * could get rid of the Trap... + */ + if (nxagentExternalClipboardEventTrap != 0) + { + #ifdef DEBUG + fprintf(stderr, "%s: Trap is set, doing nothing\n", __func__); + #endif + return; + } + + SelectionInfoRec *info = (SelectionInfoRec *)args; + + Selection * pCurSel = (Selection *)info->selection; + + #ifdef DEBUG + fprintf(stderr, "%s: pCurSel->lastTimeChanged [%d]\n", __func__, pCurSel->lastTimeChanged.milliseconds); + #endif + + if (info->kind == SelectionSetOwner) + { + #ifdef DEBUG + fprintf(stderr, "%s: called with SelectionCallbackKind SelectionSetOwner\n", __func__); + fprintf(stderr, "%s: pCurSel->pWin [0x%x]\n", __func__, pCurSel->pWin ? pCurSel->pWin->drawable.id : NULL); + fprintf(stderr, "%s: pCurSel->selection [%s]\n", __func__, NameForAtom(pCurSel->selection)); + #endif + + if ((pCurSel->pWin != NULL) && + (nxagentOption(Clipboard) != ClipboardNone) && + ((pCurSel->selection == XA_PRIMARY) || + (pCurSel->selection == MakeAtom("CLIPBOARD", 9, 0)))) + { + #ifdef DEBUG + fprintf(stderr, "%s: calling nxagentSetSelectionOwner\n", __func__); + #endif + nxagentSetSelectionOwner(pCurSel); + } + } + else if (info->kind == SelectionWindowDestroy) + { + #ifdef DEBUG + fprintf(stderr, "%s: called with SelectionCallbackKind SelectionWindowDestroy\n", __func__); + #endif + } + else if (info->kind == SelectionClientClose) + { + #ifdef DEBUG + fprintf(stderr, "%s: called with SelectionCallbackKind SelectionClientClose\n", __func__); + #endif + } + else + { + #ifdef DEBUG + fprintf(stderr, "%s: called with unknown SelectionCallbackKind\n", __func__); + #endif + } +} +#endif + void nxagentSetSelectionOwner(Selection *pSelection) { #ifdef DEBUG -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 09ba97b2d0ff3e2f8203679480fe5a54020637b2 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 14:21:43 2019 +0200 NXdispatch.c: Use Callback instead of a modified function --- nx-X11/programs/Xserver/hw/nxagent/Init.c | 9 +++++++++ nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index 80ca5fac1..1e24a618e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -143,6 +143,11 @@ void OsVendorEndRedirectErrorFFunction(); static void nxagentGrabServerCallback(CallbackListPtr *callbacks, void *data, void *args); +#ifdef NXAGENT_CLIPBOARD +extern void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data, + void *args); +#endif + void ddxInitGlobals(void) { /* @@ -411,6 +416,10 @@ FIXME: These variables, if not removed at all because have probably blackRoot = TRUE; nxagentInitKeystrokes(False); + +#ifdef NXAGENT_CLIPBOARD + AddCallback(&SelectionCallback, nxagentSetSelectionCallback, NULL); +#endif } void diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index db055f0cd..44194ff3b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -764,15 +764,6 @@ ProcSetSelectionOwner(register ClientPtr client) CallCallbacks(&SelectionCallback, &info); } -#ifdef NXAGENT_CLIPBOARD - if ((CurrentSelections[i].pWin != NULL) && - (nxagentOption(Clipboard) != ClipboardNone) && - ((CurrentSelections[i].selection == XA_PRIMARY) || - (CurrentSelections[i].selection == MakeAtom("CLIPBOARD", 9, 0)))) - { - nxagentSetSelectionOwner(&CurrentSelections[i]); - } -#endif return (client->noClientException); } else -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 073c6c17e768cf61a879cb100f5ad2cb16703518 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu May 30 16:04:43 2019 +0200 NXmiexpose.c: drop file altogether The only left function is identical to the one in mi/miexpose.c. --- nx-X11/programs/Xserver/Imakefile | 3 - nx-X11/programs/Xserver/hw/nxagent/Imakefile | 2 - nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c | 192 ------------------------ nx-X11/programs/Xserver/mi/Imakefile | 13 +- nx-X11/programs/Xserver/mi/miexpose.c | 2 - 5 files changed, 2 insertions(+), 210 deletions(-) diff --git a/nx-X11/programs/Xserver/Imakefile b/nx-X11/programs/Xserver/Imakefile index 95628651b..db2f0d7a5 100644 --- a/nx-X11/programs/Xserver/Imakefile +++ b/nx-X11/programs/Xserver/Imakefile @@ -246,7 +246,6 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \ hw/nxagent/NXpicture.o \ hw/nxagent/NXextension.o \ hw/nxagent/NXglxext.o \ - hw/nxagent/NXmiexpose.o \ hw/nxagent/NXresource.o \ hw/nxagent/NXdamage.o \ $(NULL) @@ -264,7 +263,6 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \ hw/nxagent/NXextension.o \ hw/nxagent/NXglxext.o \ hw/nxagent/NXxvdisp.o \ - hw/nxagent/NXmiexpose.o \ hw/nxagent/NXresource.o \ hw/nxagent/NXdamage.o \ $(NULL) @@ -282,7 +280,6 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \ hw/nxagent/NXextension.o \ hw/nxagent/NXglxext.o \ hw/nxagent/NXxvdisp.o \ - hw/nxagent/NXmiexpose.o \ hw/nxagent/NXresource.o \ hw/nxagent/NXdamage.o \ dix/main.o \ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index c14b59a2c..5a3a999f4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -20,7 +20,6 @@ SRCS = \ NXshm.c \ NXglxext.c \ NXxvdisp.c \ - NXmiexpose.c \ NXresource.c \ NXdamage.c \ NXmitrap.c \ @@ -81,7 +80,6 @@ OBJS = \ NXshm.o \ NXglxext.o \ NXxvdisp.o \ - NXmiexpose.o \ NXresource.o \ NXdamage.o \ NXmitrap.o \ diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c deleted file mode 100644 index c4ff88c5d..000000000 --- a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c +++ /dev/null @@ -1,192 +0,0 @@ -/**************************************************************************/ -/* */ -/* Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com) */ -/* Copyright (c) 2008-2014 Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> */ -/* Copyright (c) 2011-2016 Mike Gabriel <mike.gabriel@das-netzwerkteam.de>*/ -/* Copyright (c) 2014-2016 Mihai Moldovan <ionic@ionic.de> */ -/* Copyright (c) 2014-2016 Ulrich Sibiller <uli42@gmx.de> */ -/* Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com) */ -/* */ -/* NXAGENT, NX protocol compression and NX extensions to this software */ -/* are copyright of the aforementioned persons and companies. */ -/* */ -/* Redistribution and use of the present software is allowed according */ -/* to terms specified in the file LICENSE which comes in the source */ -/* distribution. */ -/* */ -/* All rights reserved. */ -/* */ -/* NOTE: This software has received contributions from various other */ -/* contributors, only the core maintainers and supporters are listed as */ -/* copyright holders. Please contact us, if you feel you should be listed */ -/* as copyright holder, as well. */ -/* */ -/**************************************************************************/ - -/*********************************************************** - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ -/***************************************************************** - -Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING, -BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of Digital Equipment Corporation -shall not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from Digital -Equipment Corporation. - -******************************************************************/ - - -#include "Windows.h" - -#include "../../mi/miexpose.c" - -void -miWindowExposures(pWin, prgn, other_exposed) - WindowPtr pWin; - register RegionPtr prgn, other_exposed; -{ - RegionPtr exposures = prgn; - if (pWin->backStorage && prgn) - /* - * in some cases, backing store will cause a different - * region to be exposed than needs to be repainted - * (like when a window is mapped). RestoreAreas is - * allowed to return a region other than prgn, - * in which case this routine will free the resultant - * region. If exposures is null, then no events will - * be sent to the client; if prgn is empty - * no areas will be repainted. - */ - exposures = (*pWin->drawable.pScreen->RestoreAreas)(pWin, prgn); - if ((prgn && !RegionNil(prgn)) || - (exposures && !RegionNil(exposures)) || other_exposed) - { - RegionRec expRec; - int clientInterested; - - /* - * Restore from backing-store FIRST. - */ - clientInterested = (pWin->eventMask|wOtherEventMasks(pWin)) & ExposureMask; - if (other_exposed) - { - if (exposures) - { - RegionUnion(other_exposed, - exposures, - other_exposed); - if (exposures != prgn) - RegionDestroy(exposures); - } - exposures = other_exposed; - } - if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT)) - { - /* - * If we have LOTS of rectangles, we decide to take the extents - * and force an exposure on that. This should require much less - * work overall, on both client and server. This is cheating, but - * isn't prohibited by the protocol ("spontaneous combustion" :-). - */ - BoxRec box; - - box = *RegionExtents(exposures); - if (exposures == prgn) { - exposures = &expRec; - RegionInit(exposures, &box, 1); - RegionReset(prgn, &box); - } else { - RegionReset(exposures, &box); - RegionUnion(prgn, prgn, exposures); - } - /* PaintWindowBackground doesn't clip, so we have to */ - RegionIntersect(prgn, prgn, &pWin->clipList); - /* need to clear out new areas of backing store, too */ - if (pWin->backStorage) - (void) (* pWin->drawable.pScreen->ClearBackingStore)( - pWin, - box.x1 - pWin->drawable.x, - box.y1 - pWin->drawable.y, - box.x2 - box.x1, - box.y2 - box.y1, - FALSE); - } - if (prgn && !RegionNil(prgn)) - (*pWin->drawable.pScreen->PaintWindowBackground)(pWin, prgn, PW_BACKGROUND); - if (clientInterested && exposures && !RegionNil(exposures)) - miSendExposures(pWin, exposures, - pWin->drawable.x, pWin->drawable.y); - if (exposures == &expRec) - { - RegionUninit(exposures); - } - else if (exposures && exposures != prgn && exposures != other_exposed) - RegionDestroy(exposures); - if (prgn) - RegionEmpty(prgn); - } - else if (exposures && exposures != prgn) - RegionDestroy(exposures); -} diff --git a/nx-X11/programs/Xserver/mi/Imakefile b/nx-X11/programs/Xserver/mi/Imakefile index 9124ace89..46e5191ad 100644 --- a/nx-X11/programs/Xserver/mi/Imakefile +++ b/nx-X11/programs/Xserver/mi/Imakefile @@ -39,15 +39,6 @@ FFS_DEFINES = -DHAS_FFS MIINITEXTSRC = miinitext.c MIINITEXTOBJ = miinitext.o -#if (!(defined(NXAgentServer) && NXAgentServer)) -NXAGENT_SKIP_SRCS = \ - miexpose.c \ - $(NULL) -NXAGENT_SKIP_OBJS = \ - miexpose.o \ - $(NULL) -#endif - SRCS = $(CBRT_SRC) \ mivaltree.c \ mipolyseg.c \ @@ -83,7 +74,7 @@ SRCS = $(CBRT_SRC) \ migc.c \ micmap.c \ mioverlay.c \ - $(NXAGENT_SKIP_SRCS) \ + miexpose.c \ $(NULL) OBJS = $(CBRT_OBJ) \ @@ -121,7 +112,7 @@ OBJS = $(CBRT_OBJ) \ migc.o \ micmap.o \ mioverlay.o \ - $(NXAGENT_SKIP_OBJS) \ + miexpose.o \ $(NULL) #if defined(XorgVersion) diff --git a/nx-X11/programs/Xserver/mi/miexpose.c b/nx-X11/programs/Xserver/mi/miexpose.c index d2bf93c6c..8e60f475e 100644 --- a/nx-X11/programs/Xserver/mi/miexpose.c +++ b/nx-X11/programs/Xserver/mi/miexpose.c @@ -489,7 +489,6 @@ miSendExposures(pWin, pRgn, dx, dy) free(pEvent); } -#ifndef NXAGENT_SERVER void miWindowExposures(pWin, prgn, other_exposed) WindowPtr pWin; @@ -578,7 +577,6 @@ miWindowExposures(pWin, prgn, other_exposed) else if (exposures && exposures != prgn) RegionDestroy(exposures); } -#endif /* this code is highly unlikely. it is not haile selassie. -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6ce9fb5f2875754f97035d3338b3d0e1d20169ae Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu May 30 16:02:53 2019 +0200 Window.c/NXmiexpose.c: remove hack for certain WM theme We do not even know what theme this is and it is probably not relevant nowadays. --- nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c | 15 +-------------- nx-X11/programs/Xserver/hw/nxagent/Window.c | 19 ------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c index 146ecad75..c4ff88c5d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c @@ -142,20 +142,7 @@ miWindowExposures(pWin, prgn, other_exposed) } exposures = other_exposed; } - -#ifdef NXAGENT_SERVER - /* - * If the number of rectangles is greater - * than 4, let the function decide. - */ - - int total = RegionNumRects(exposures); - - if (clientInterested && exposures && (total > RECTLIMIT || - (total > 4 && nxagentExtentsPredicate(total) == 1))) - #else - if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT)) - #endif + if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT)) { /* * If we have LOTS of rectangles, we decide to take the extents diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index c5c533934..8307c3de4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -3484,26 +3484,7 @@ void nxagentSetTopLevelEventMask(WindowPtr pWin) } /* - * This function must return 1 if we want the - * exposures to be sent as the window's extents. - * This is actually a harmless, but useful hack, - * as it speeds up the window redraws considera- - * bly, when using a very popular WM theme. */ - -int nxagentExtentsPredicate(int total) -{ - #ifdef TEST - if (total == 6 || total == 11 || total == 10) - { - fprintf(stderr, "nxagentExtentsPredicate: WARNING! Returning [%d] with [%d] rectangles.\n", - (total == 6 || total == 11 || total == 10), total); - } - #endif - - return (total == 6 || total == 11 || total == 10); -} - void nxagentFlushConfigureWindow(void) { ConfiguredWindowStruct *index; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 58cd35745086567b5b1fa0fc7a295e849ac070ce Merge: a25232734 073c6c17e Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jun 11 12:10:25 2019 +0200 Merge branch 'uli42-pr/drop_nxmiexpose' into 3.6.x Attributes GH PR #812: https://github.com/ArcticaProject/nx-libs/pull/812 nx-X11/programs/Xserver/Imakefile | 3 - nx-X11/programs/Xserver/hw/nxagent/Imakefile | 2 - nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c | 747 ------------------------ nx-X11/programs/Xserver/hw/nxagent/Window.c | 19 - nx-X11/programs/Xserver/mi/Imakefile | 13 +- nx-X11/programs/Xserver/mi/miexpose.c | 10 +- 6 files changed, 4 insertions(+), 790 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit c0754a35755cdd4e25386abc6378e07605845948 Merge: 58cd35745 848dee5c4 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Jun 11 12:24:44 2019 +0200 Merge branch 'uli42-pr/use_selection_callback' into 3.6.x Attributes GH PR #814: https://github.com/ArcticaProject/nx-libs/pull/814 nx-X11/programs/Xserver/dix/dispatch.c | 2 - nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 69 +++++++++++++++ nx-X11/programs/Xserver/hw/nxagent/Events.c | 12 +++ nx-X11/programs/Xserver/hw/nxagent/Init.c | 9 ++ nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 106 ------------------------ nx-X11/programs/Xserver/hw/nxagent/Trap.c | 8 ++ nx-X11/programs/Xserver/hw/nxagent/Trap.h | 8 ++ 7 files changed, 106 insertions(+), 108 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 848dee5c42bffdf19c4b9f01c38334bf53fefa49 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 10 14:25:53 2019 +0200 NXdispatch.c: use upstream version of ProcSetSelectionOwner --- nx-X11/programs/Xserver/dix/dispatch.c | 2 - nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 97 ------------------------- 2 files changed, 99 deletions(-) diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index 86a33ec65..6b6dbcad9 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -919,7 +919,6 @@ ProcGetAtomName(register ClientPtr client) } } -#ifndef NXAGENT_SERVER int ProcSetSelectionOwner(register ClientPtr client) { @@ -1014,7 +1013,6 @@ ProcSetSelectionOwner(register ClientPtr client) return (BadAtom); } } -#endif /* NXAGENT_SERVER */ int ProcGetSelectionOwner(register ClientPtr client) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 44194ff3b..339994e6c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -677,103 +677,6 @@ ProcQueryTree(register ClientPtr client) } -int -ProcSetSelectionOwner(register ClientPtr client) -{ - WindowPtr pWin; - TimeStamp time; - REQUEST(xSetSelectionOwnerReq); - - REQUEST_SIZE_MATCH(xSetSelectionOwnerReq); - UpdateCurrentTime(); - time = ClientTimeToServerTime(stuff->time); - - /* If the client's time stamp is in the future relative to the server's - time stamp, do not set the selection, just return success. */ - if (CompareTimeStamps(time, currentTime) == LATER) - return Success; - if (stuff->window != None) - { - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - DixReadAccess); - if (!pWin) - return(BadWindow); - } - else - pWin = (WindowPtr)None; - if (ValidAtom(stuff->selection)) - { - int i = 0; - - /* - * First, see if the selection is already set... - */ - while ((i < NumCurrentSelections) && - CurrentSelections[i].selection != stuff->selection) - i++; - if (i < NumCurrentSelections) - { - /* If the timestamp in client's request is in the past relative - to the time stamp indicating the last time the owner of the - selection was set, do not set the selection, just return - success. */ - if (CompareTimeStamps(time, CurrentSelections[i].lastTimeChanged) - == EARLIER) - return Success; - if (CurrentSelections[i].client && - (!pWin || (CurrentSelections[i].client != client))) - { - xEvent event = {0}; - event.u.u.type = SelectionClear; - event.u.selectionClear.time = time.milliseconds; - event.u.selectionClear.window = CurrentSelections[i].window; - event.u.selectionClear.atom = CurrentSelections[i].selection; - (void) TryClientEvents (CurrentSelections[i].client, &event, 1, - NoEventMask, NoEventMask /* CantBeFiltered */, - NullGrab); - } - } - else - { - /* - * It doesn't exist, so add it... - */ - Selection *newsels; - - if (i == 0) - newsels = (Selection *)malloc(sizeof(Selection)); - else - newsels = (Selection *)realloc(CurrentSelections, - (NumCurrentSelections + 1) * sizeof(Selection)); - if (!newsels) - return BadAlloc; - NumCurrentSelections++; - CurrentSelections = newsels; - CurrentSelections[i].selection = stuff->selection; - } - CurrentSelections[i].lastTimeChanged = time; - CurrentSelections[i].window = stuff->window; - CurrentSelections[i].pWin = pWin; - CurrentSelections[i].client = (pWin ? client : NullClient); - if (SelectionCallback) - { - SelectionInfoRec info = {0}; - - info.selection = &CurrentSelections[i]; - info.kind= SelectionSetOwner; - CallCallbacks(&SelectionCallback, &info); - } - - return (client->noClientException); - } - else - { - client->errorValue = stuff->selection; - return (BadAtom); - } -} - - int ProcConvertSelection(register ClientPtr client) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit a765857aaa450862f6a3dc5de811671fbc82ca61 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Jun 1 00:52:06 2019 +0200 Remove the Must_have_memory hack. We are not using any alloc function that respects that variable, so lets drop it. Backport of this commit: commit 0ce61e21d6d7dcca0090e319bbcdb678570f2c3f Author: Adam Jackson <ajax@redhat.com> Date: Fri Oct 3 16:05:19 2008 -0400 Remove the Must_have_memory hack. Also remove an astonishing amount of misunderstanding of how casts work. --- nx-X11/programs/Xserver/Xi/chgkbd.c | 2 -- nx-X11/programs/Xserver/dix/events.c | 25 ++++++++----------------- nx-X11/programs/Xserver/hw/nxagent/NXevents.c | 4 +--- nx-X11/programs/Xserver/include/globals.h | 1 - nx-X11/programs/Xserver/mi/micursor.c | 12 ++++-------- nx-X11/programs/Xserver/mi/migc.c | 6 ++---- nx-X11/programs/Xserver/os/utils.c | 2 -- 7 files changed, 15 insertions(+), 37 deletions(-) diff --git a/nx-X11/programs/Xserver/Xi/chgkbd.c b/nx-X11/programs/Xserver/Xi/chgkbd.c index 8f4e35773..2ca631e2d 100644 --- a/nx-X11/programs/Xserver/Xi/chgkbd.c +++ b/nx-X11/programs/Xserver/Xi/chgkbd.c @@ -153,11 +153,9 @@ ProcXChangeKeyboardDevice(register ClientPtr client) df->time = xf->time; df->traceGood = xf->traceGood; if (df->traceSize != xf->traceSize) { - Must_have_memory = TRUE; /* XXX */ df->trace = (WindowPtr *) realloc(df->trace, xf->traceSize * sizeof(WindowPtr)); - Must_have_memory = FALSE; /* XXX */ } df->traceSize = xf->traceSize; for (i = 0; i < df->traceSize; i++) diff --git a/nx-X11/programs/Xserver/dix/events.c b/nx-X11/programs/Xserver/dix/events.c index 745932af3..70224c3b8 100644 --- a/nx-X11/programs/Xserver/dix/events.c +++ b/nx-X11/programs/Xserver/dix/events.c @@ -1938,10 +1938,8 @@ XYToWindow(int x, int y) if (spriteTraceGood >= spriteTraceSize) { spriteTraceSize += 10; - Must_have_memory = TRUE; /* XXX */ - spriteTrace = (WindowPtr *)realloc( + spriteTrace = realloc( spriteTrace, spriteTraceSize*sizeof(WindowPtr)); - Must_have_memory = FALSE; /* XXX */ } spriteTrace[spriteTraceGood++] = pWin; pWin = pWin->firstChild; @@ -2455,11 +2453,9 @@ CheckPassiveGrabsOnWindow( { if (device->sync.evcount < count) { - Must_have_memory = TRUE; /* XXX */ - device->sync.event = (xEvent *)realloc(device->sync.event, - count* - sizeof(xEvent)); - Must_have_memory = FALSE; /* XXX */ + device->sync.event = realloc(device->sync.event, + count* + sizeof(xEvent)); } device->sync.evcount = count; for (dxE = device->sync.event; --count >= 0; dxE++, xE++) @@ -2627,10 +2623,8 @@ DeliverGrabbedEvent(register xEvent *xE, register DeviceIntPtr thisDev, FreezeThaw(thisDev, TRUE); if (thisDev->sync.evcount < count) { - Must_have_memory = TRUE; /* XXX */ - thisDev->sync.event = (xEvent *)realloc(thisDev->sync.event, - count*sizeof(xEvent)); - Must_have_memory = FALSE; /* XXX */ + thisDev->sync.event = realloc(thisDev->sync.event, + count*sizeof(xEvent)); } thisDev->sync.evcount = count; for (dxE = thisDev->sync.event; --count >= 0; dxE++, xE++) @@ -3505,11 +3499,8 @@ SetInputFocus( if (depth > focus->traceSize) { focus->traceSize = depth+1; - Must_have_memory = TRUE; /* XXX */ - focus->trace = (WindowPtr *)realloc(focus->trace, - focus->traceSize * - sizeof(WindowPtr)); - Must_have_memory = FALSE; /* XXX */ + focus->trace = realloc(focus->trace, + focus->traceSize * sizeof(WindowPtr)); } focus->traceGood = depth; for (pWin = focusWin, depth--; pWin; pWin = pWin->parent, depth--) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c index 43dfe8613..78d74a0d5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXevents.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXevents.c @@ -367,10 +367,8 @@ XYToWindow(int x, int y) if (spriteTraceGood >= spriteTraceSize) { spriteTraceSize += 10; - Must_have_memory = TRUE; /* XXX */ - spriteTrace = (WindowPtr *)realloc( + spriteTrace = realloc( spriteTrace, spriteTraceSize*sizeof(WindowPtr)); - Must_have_memory = FALSE; /* XXX */ } spriteTrace[spriteTraceGood++] = pWin; pWin = pWin->firstChild; diff --git a/nx-X11/programs/Xserver/include/globals.h b/nx-X11/programs/Xserver/include/globals.h index d5b9c4407..50aaaa2bf 100644 --- a/nx-X11/programs/Xserver/include/globals.h +++ b/nx-X11/programs/Xserver/include/globals.h @@ -20,7 +20,6 @@ extern int monitorResolution; extern Bool loadableFonts; extern int defaultColorVisualClass; -extern Bool Must_have_memory; extern int GrabInProgress; extern char *ConnectionInfo; extern Bool noTestExtensions; diff --git a/nx-X11/programs/Xserver/mi/micursor.c b/nx-X11/programs/Xserver/mi/micursor.c index e95c43b3d..90b0f2ae9 100644 --- a/nx-X11/programs/Xserver/mi/micursor.c +++ b/nx-X11/programs/Xserver/mi/micursor.c @@ -53,8 +53,6 @@ SOFTWARE. #include "misc.h" #include "mi.h" -extern Bool Must_have_memory; - void miRecolorCursor( pScr, pCurs, displayed) ScreenPtr pScr; @@ -65,11 +63,9 @@ miRecolorCursor( pScr, pCurs, displayed) * This is guaranteed to correct any color-dependent state which may have * been bound up in private state created by RealizeCursor */ - (* pScr->UnrealizeCursor)( pScr, pCurs); - Must_have_memory = TRUE; /* XXX */ - (* pScr->RealizeCursor)( pScr, pCurs); - Must_have_memory = FALSE; /* XXX */ - if ( displayed) - (* pScr->DisplayCursor)( pScr, pCurs); + pScr->UnrealizeCursor(pScr, pCurs); + pScr->RealizeCursor(pScr, pCurs); + if (displayed) + pScr->DisplayCursor(pScr, pCurs); } diff --git a/nx-X11/programs/Xserver/mi/migc.c b/nx-X11/programs/Xserver/mi/migc.c index 4d67cbf5d..afd5031a4 100644 --- a/nx-X11/programs/Xserver/mi/migc.c +++ b/nx-X11/programs/Xserver/mi/migc.c @@ -68,11 +68,9 @@ miCreateGCOps(prototype) { GCOpsPtr ret; - /* XXX */ Must_have_memory = TRUE; - ret = (GCOpsPtr) malloc(sizeof(GCOps)); - /* XXX */ Must_have_memory = FALSE; + ret = malloc(sizeof(GCOps)); if (!ret) - return 0; + return NULL; *ret = *prototype; ret->devPrivate.val = 1; return ret; diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c index 0a1e3f7b2..5634bb621 100644 --- a/nx-X11/programs/Xserver/os/utils.c +++ b/nx-X11/programs/Xserver/os/utils.c @@ -257,8 +257,6 @@ Bool PanoramiXExtensionDisabledHack = FALSE; int auditTrailLevel = 1; -Bool Must_have_memory = FALSE; - #if defined(SVR4) || defined(__linux__) || defined(CSRG_BASED) #define HAS_SAVED_IDS_AND_SETEUID #endif -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit d8f5e647c92b73835665c555d06c8814c7d0dbb5 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu May 30 23:50:53 2019 +0200 NXwindow.c: fix compiler warning NXwindow.c:265:27: warning: ‘%d’ directive writing between 1 and 11 bytes into a region of size 10 [-Wformat-overflow=] sprintf(artsd_port,"%d", nPort); ^~ NXwindow.c:265:26: note: directive argument in the range [-2147476648, 2147483647] sprintf(artsd_port,"%d", nPort); ^~~~ NXwindow.c:265:7: note: ‘sprintf’ output between 2 and 12 bytes into a destination of size 10 sprintf(artsd_port,"%d", nPort); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index 2fe37f79c..0851daf97 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -296,7 +296,7 @@ InitRootWindow(WindowPtr pWin) #ifdef NXAGENT_ARTSD { char artsd_port[10]; - int nPort; + short int nPort; extern void nxagentPropagateArtsdProperties(ScreenPtr pScreen, char *port); nPort = atoi(display) + 7000; sprintf(artsd_port,"%d", nPort); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 28e42b3bd0d7fb5d5674acd256fed5e84903a271 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat May 4 01:44:36 2019 +0200 mi: Hush an almost certainly bogus warning commit 57e872301f5e836be2efb8f952f9c9711650b447 Author: Adam Jackson <ajax@redhat.com> Date: Thu Apr 5 13:07:09 2018 -0400 mi: Hush an almost certainly bogus warning In file included from ../mi/miexpose.c:83: ../mi/miexpose.c: In function ‘miHandleExposures’: ../include/regionstr.h:174:22: warning: ‘expBox.y2’ may be used uninitialized in this function [-Wmaybe-uninitialized] (_pReg)->extents = *(_pBox); ~~~~~~~~~~~~~~~~~^~~~~~~~~~ ../mi/miexpose.c:139:12: note: ‘expBox.y2’ was declared here BoxRec expBox; ^~~~~~ etc. It's initialized if (extents), and then only read if (extents), but gcc doesn't seem to figure that out. Whatever, bzero it to be explicit. Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com> --- nx-X11/programs/Xserver/mi/miexpose.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/mi/miexpose.c b/nx-X11/programs/Xserver/mi/miexpose.c index 8e60f475e..274a8d4ce 100644 --- a/nx-X11/programs/Xserver/mi/miexpose.c +++ b/nx-X11/programs/Xserver/mi/miexpose.c @@ -151,7 +151,7 @@ miHandleExposures(pSrcDrawable, pDstDrawable, the window background */ WindowPtr pSrcWin; - BoxRec expBox; + BoxRec expBox = { 0, }; Bool extents; /* This prevents warning about pscr not being used. */ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit a3e0376f95cb57aeda12438313cba67b1690d685 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 29 23:52:44 2019 +0200 Window.c: remove leftover (commented) code This was eventually replaced by nxagentAddConfiguredWindow(pWin, CW_Map) some lines below which is just leading to the same code being executed some time later. (nxagentAddConfiguredWindow() will add a window to a list. nxagentFlushConfiguredWindow() is called at certain points to update all windows in that list in one go. "update" here means calling XConfigureWindow() or XMapWindow() on the real display.) --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 8307c3de4..7d98d25fe 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -1942,20 +1942,6 @@ Bool nxagentRealizeWindow(WindowPtr pWin) #endif */ - /* - * Mapping of the root window is called by - * InitRootWindow in DIX. Skip the operation - * if we are in rootless mode. - */ - - /* - * if (!nxagentOption(Rootless) || - * nxagentRootlessWindow != pWin) - * { - * XMapWindow(nxagentDisplay, nxagentWindow(pWin)); - * } - */ - #ifdef TEST if (nxagentOption(Rootless) && nxagentLastWindowDestroyed) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 9f5ddede95086c6f31efe89ed228ac035a89a8e5 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu May 30 00:10:43 2019 +0200 Window.c: Drop defines CWParent and CWStackingOrder They were just aliases to already existing defines and were not used stringently. So we had mix of aliased and non-aliased uses which is confusing when trying to understand the code... --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 28 ++++++++++++++-------------- nx-X11/programs/Xserver/hw/nxagent/Windows.h | 3 --- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 7d98d25fe..f602d0ed3 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -727,7 +727,7 @@ Bool nxagentPositionWindow(WindowPtr pWin, int x, int y) (void *) pWin, nxagentWindow(pWin), x, y); #endif - nxagentAddConfiguredWindow(pWin, CWParent | CWX | CWY | CWWidth | + nxagentAddConfiguredWindow(pWin, CWSibling | CWX | CWY | CWWidth | CWHeight | CWBorderWidth); return True; @@ -1284,7 +1284,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) { if (mask & CW_RootlessRestack) { - mask = CWStackingOrder; + mask = CWStackMode; } } @@ -1299,7 +1299,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) if (mask & CW_Update) { - mask |= CWX | CWY | CWWidth | CWHeight | CWBorderWidth | CWStackingOrder; + mask |= CWX | CWY | CWWidth | CWHeight | CWBorderWidth | CWStackMode; } if (mask & CWX) @@ -1378,7 +1378,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) MAKE_SYNC_CONFIGURE_WINDOW; } - if (mask & CWStackingOrder && + if (mask & CWStackMode && nxagentWindowPriv(pWin)->siblingAbove != nxagentWindowSiblingAbove(pWin)) { WindowPtr pSib; @@ -1478,7 +1478,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) * really needed? * * - * else if (mask & CWStackingOrder) + * else if (mask & CWStackMode) * { * if (nxagentSplashWindow) * { @@ -1920,12 +1920,12 @@ Bool nxagentRealizeWindow(WindowPtr pWin) /* * Not needed. * - * nxagentConfigureWindow(pWin, CWStackingOrder); + * nxagentConfigureWindow(pWin, CWStackMode); * * nxagentFlushConfigureWindow(); */ - nxagentAddConfiguredWindow(pWin, CWStackingOrder); + nxagentAddConfiguredWindow(pWin, CWStackMode); nxagentAddConfiguredWindow(pWin, CW_Shape); /* add by dimbor */ @@ -2116,10 +2116,10 @@ void nxagentCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion) void nxagentClipNotify(WindowPtr pWin, int dx, int dy) { /* - * nxagentConfigureWindow(pWin, CWStackingOrder); + * nxagentConfigureWindow(pWin, CWStackMode); */ - nxagentAddConfiguredWindow(pWin, CWStackingOrder); + nxagentAddConfiguredWindow(pWin, CWStackMode); nxagentAddConfiguredWindow(pWin, CW_Shape); #ifndef NXAGENT_SHAPE @@ -3572,10 +3572,10 @@ void nxagentAddConfiguredWindow(WindowPtr pWin, unsigned int valuemask) { unsigned int mask; - mask = valuemask & (CWParent | CWX | CWY | CWWidth | CWHeight | - CWBorderWidth | CWStackingOrder | CW_Map | CW_Update | CW_Shape); + mask = valuemask & (CWSibling | CWX | CWY | CWWidth | CWHeight | + CWBorderWidth | CWStackMode | CW_Map | CW_Update | CW_Shape); - valuemask &= ~(CWParent | CWX | CWY | CWWidth | CWHeight | CWBorderWidth | CWStackingOrder); + valuemask &= ~(CWSibling | CWX | CWY | CWWidth | CWHeight | CWBorderWidth | CWStackMode); if (mask & CWX && nxagentWindowPriv(pWin)->x != @@ -3612,11 +3612,11 @@ void nxagentAddConfiguredWindow(WindowPtr pWin, unsigned int valuemask) valuemask |= CWBorderWidth; } - if (mask & CWStackingOrder && + if (mask & CWStackMode && nxagentWindowPriv(pWin)->siblingAbove != nxagentWindowSiblingAbove(pWin)) { - valuemask |= CWStackingOrder; + valuemask |= CWStackMode; } { diff --git a/nx-X11/programs/Xserver/hw/nxagent/Windows.h b/nx-X11/programs/Xserver/hw/nxagent/Windows.h index 8612cdf82..35d686a33 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Windows.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Windows.h @@ -159,9 +159,6 @@ extern int nxagentWindowPrivateIndex; #define nxagentDefaultWindowIsVisible() \ (nxagentVisibility != VisibilityFullyObscured) -#define CWParent CWSibling -#define CWStackingOrder CWStackMode - #define CW_Map (1 << 15) #define CW_Update (1 << 16) #define CW_Shape (1 << 17) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit b961e190bc69bc93cb1f3fd6cbff7e9c1247de25 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 1 02:06:30 2019 +0200 miwindow.c: add hint to Red Hat Bugzilla + fix --- nx-X11/programs/Xserver/mi/miwindow.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nx-X11/programs/Xserver/mi/miwindow.c b/nx-X11/programs/Xserver/mi/miwindow.c index 2a583eda7..c696caf26 100644 --- a/nx-X11/programs/Xserver/mi/miwindow.c +++ b/nx-X11/programs/Xserver/mi/miwindow.c @@ -1052,6 +1052,7 @@ miSetShape(pWin) * pointer to the parent, so maybe doesn't change * the attribute of the window itself. This is to * be better investigated. + * Update: Red Hat fixed this bug the same way (BZ 676270). */ if (WasViewable && pOldClip) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 1a8de6352d068e0a45904cf9b80bde30561eca2f Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu May 30 00:30:46 2019 +0200 dix/window.c: fix compiler warning Window.c:3827:46: warning: array subscript 128 is above array bounds of ‘StoringPixmapRec *[128]’ {aka ‘struct <anonymous> *[128]’} [-Warray-bounds] i, (void *) nxagentBSPixmapList[i]); --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index f602d0ed3..6758e0875 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -3938,16 +3938,16 @@ int nxagentEmptyBSPixmapList(void) StoringPixmapPtr nxagentFindItemBSPixmapList(unsigned long pixmapId) { - int i; - - for (i = 0; i < BSPIXMAPLIMIT; i++) + for (int i = 0; i < BSPIXMAPLIMIT; i++) { if ((nxagentBSPixmapList[i] != NULL) && (nxagentBSPixmapList[i] -> storingPixmapId == pixmapId)) { #ifdef TEST - fprintf(stderr, "nxagentFindItemBSPixmapList: pixmapId [%lu].\n", pixmapId); - fprintf(stderr, "nxagentFindItemBSPixmapList: nxagentBSPixmapList[%d] -> storingPixmapId [%lu].\n", + fprintf(stderr, "%s: pixmapId [%lu].\n", __func__, pixmapId); + fprintf(stderr, "%s: nxagentBSPixmapList[%d] = [%p].\n", __func__, + i, (void *) nxagentBSPixmapList[i]); + fprintf(stderr, "%s: nxagentBSPixmapList[%d] -> storingPixmapId [%lu].\n", __func__, i, nxagentBSPixmapList[i] -> storingPixmapId); #endif @@ -3955,15 +3955,13 @@ StoringPixmapPtr nxagentFindItemBSPixmapList(unsigned long pixmapId) } } - #ifdef TEST - fprintf(stderr, "nxagentFindItemBSPixmapList: WARNING! Item not found.\n"); + #ifdef WARNING + fprintf(stderr, "%s: WARNING! Item not found.\n", __func__); #endif #ifdef TEST - fprintf(stderr, "nxagentFindItemBSPixmapList: Pixmap with id [%lu] not found.\n", + fprintf(stderr, "%s: Pixmap with id [%lu] not found.\n", __func__, pixmapId); - fprintf(stderr, "nxagentBSPixmapList[%d] = [%p].\n", - i, (void *) nxagentBSPixmapList[i]); #endif return NULL; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 3900ba3f8459c4822eaa6b8ac6035980a63fdfff Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed May 1 10:40:47 2019 +0200 NXshm.c: remove left-overs from patch format was broken, would not compile --- nx-X11/programs/Xserver/hw/nxagent/NXshm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c index 246d39355..9a314391c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXshm.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXshm.c @@ -387,8 +387,8 @@ ProcShmPutImage(client) ((stuff->format != ZPixmap) && (stuff->srcX < screenInfo.bitmapScanlinePad) && ((stuff->format == XYBitmap) || - - ((stuff->srcY == 0) && - - (stuff->srcHeight == stuff->totalHeight))))) && + ((stuff->srcY == 0) && + (stuff->srcHeight == stuff->totalHeight))))) && ((stuff->srcX + stuff->srcWidth) == stuff->totalWidth)) (*pGC->ops->PutImage) (pDraw, pGC, stuff->depth, stuff->dstX, stuff->dstY, @@ -396,7 +396,7 @@ ProcShmPutImage(client) stuff->srcX, stuff->format, shmdesc->addr + stuff->offset + (stuff->srcY * length)); -- else + else #endif { #ifdef TEST -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6d00a387fc138b575dfe9133d5120fa9cb6a3a45 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jun 12 19:25:57 2019 +0200 Rootless.c: improve TEST/WARN/DEBUG outout by adding [] around values as almost everywhere --- nx-X11/programs/Xserver/hw/nxagent/Rootless.c | 72 +++++++++++++-------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c index 82ec14fe9..f50cd1295 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c @@ -485,7 +485,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) { #ifdef TEST fprintf(stderr, "nxagentExportProperty: WARNING! Ignored ChangeProperty " - "on %swindow %lx property %s type %s nUnits %ld format %d\n", + "on %swindow [0x%lx] property [%s] type [%s] nUnits [%ld] format [%d]\n", nxagentWindowTopLevel(pWin) ? "toplevel " : "", nxagentWindow(pWin), validateString(propertyS), validateString(typeS), nUnits, format); #endif @@ -565,8 +565,8 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) propHints.flags &= ~IconPixmapHint; #ifdef WARNING - fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon pixmap %x from hint " - "exporting property %s type %s on window %p.\n", + fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon pixmap [0x%x] from hint " + "exporting property [%s] type [%s] on window [%p].\n", (unsigned int) wmHints.icon_pixmap, propertyS, typeS, (void *) pWin); #endif @@ -587,8 +587,8 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) propHints.flags &= ~IconWindowHint; #ifdef WARNING - fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon window %x from hint " - "exporting property %s type %s on window %p.\n", + fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon window [0x%x] from hint " + "exporting property [%s] type [%s] on window [%p].\n", (unsigned int) wmHints.icon_window, propertyS, typeS, (void *) pWin); #endif @@ -609,8 +609,8 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) propHints.flags &= ~IconMaskHint; #ifdef WARNING - fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon mask %x from hint " - "exporting property %s type %s on window %p.\n", + fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon mask [0x%x] from hint " + "exporting property [%s] type [%s] on window [%p].\n", (unsigned int) wmHints.icon_mask, propertyS, typeS, (void *) pWin); #endif @@ -631,8 +631,8 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) propHints.flags &= ~WindowGroupHint; #ifdef WARNING - fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up window group %x from hint " - "exporting property %s type %s on window %p.\n", + fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up window group [0x%x] from hint " + "exporting property [%s] type [%s] on window [%p].\n", (unsigned int) wmHints.window_group, propertyS, typeS, (void *) pWin); #endif @@ -650,7 +650,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) if (!atoms) { #ifdef WARNING - fprintf(stderr, "nxagentExportProperty: WARNING! malloc() failed for '%s'- bailing out.\n", typeS); + fprintf(stderr, "nxagentExportProperty: WARNING! malloc() failed for '[%s]'- bailing out.\n", typeS); #endif return False; } @@ -679,7 +679,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) if (atoms[j] == None) { #ifdef WARNING - fprintf(stderr, "nxagentExportProperty: WARNING! Failed to convert local atom %ld [%s].\n", + fprintf(stderr, "nxagentExportProperty: WARNING! Failed to convert local atom [%ld] [%s].\n", (long int) input[i], validateString(atomName)); #endif } @@ -708,7 +708,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) if (!wind) { #ifdef WARNING - fprintf(stderr, "nxagentExportProperty: WARNING! malloc() failed for '%s' - bailing out.\n", typeS); + fprintf(stderr, "nxagentExportProperty: WARNING! malloc() failed for '[%s]' - bailing out.\n", typeS); #endif return False; } @@ -728,8 +728,8 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) else { #ifdef WARNING - fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up window %ld " - "exporting property %s type %s on window %p.\n", + fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up window [%ld] " + "exporting property [%s] type [%s] on window [%p].\n", (long int) input[i], propertyS, typeS, (void *) pWin); #endif @@ -819,7 +819,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) { #ifdef TEST fprintf(stderr, "nxagentExportProperty: WARNING! Ignored ChangeProperty " - "on %swindow %x property %s type %s nUnits %ld format %d\n", + "on %swindow [0x%x] property [%s] type [%s] nUnits [%ld] format [%d]\n", nxagentWindowTopLevel(pWin) ? "toplevel " : "", nxagentWindow(pWin), validateString(propertyS), validateString(typeS), nUnits, format); @@ -866,7 +866,7 @@ void nxagentImportProperty(Window window, if (pWin == NULL) { #ifdef TEST - fprintf(stderr, "nxagentImportProperty: Failed to look up remote window %lx property [%ld] exiting.\n", + fprintf(stderr, "nxagentImportProperty: Failed to look up remote window [0x%lx] property [%ld] exiting.\n", window, property); #endif @@ -885,7 +885,7 @@ void nxagentImportProperty(Window window, } #ifdef TEST - fprintf(stderr, "nxagentImportProperty: Window %lx property [%ld]: %s\n", + fprintf(stderr, "nxagentImportProperty: Window [0x%lx] property [%ld]: [%s]\n", window, property, validateString(NameForAtom(propertyL))); #endif @@ -900,7 +900,7 @@ void nxagentImportProperty(Window window, if (buffer == NULL && (nitems > 0)) { #ifdef WARNING - fprintf(stderr, "nxagentImportProperty: Failed to retrieve remote property [%ld] %s on Window %ld\n", + fprintf(stderr, "nxagentImportProperty: Failed to retrieve remote property [%ld] [%s] on Window [%ld]\n", (long int) property, validateString(NameForAtom(propertyL)), (long int) window); #endif } @@ -956,8 +956,8 @@ void nxagentImportProperty(Window window, else if (wmState.icon) { #ifdef WARNING - fprintf(stderr, "nxagentImportProperty: WARNING! Failed to convert remote window %ld" - " importing property %ld of type WM_STATE", (long int) wmState.icon, + fprintf(stderr, "nxagentImportProperty: WARNING! Failed to convert remote window [%ld]" + " importing property [%ld] of type WM_STATE", (long int) wmState.icon, (long int) property); #endif } @@ -982,7 +982,7 @@ void nxagentImportProperty(Window window, #ifdef WARNING fprintf(stderr, "nxagentImportProperty: WARNING! Failed to look up remote icon " - "pixmap %d from hint importing property [%ld] type %s on window %p.\n", + "pixmap [%d] from hint importing property [%ld] type [%s] on window [%p].\n", (unsigned int) wmHints.icon_pixmap, (long int) property, typeS, (void *) pWin); #endif @@ -1003,7 +1003,7 @@ void nxagentImportProperty(Window window, #ifdef WARNING fprintf(stderr, "nxagentImportProperty: WARNING! Failed to look up remote icon " - "window %x from hint importing property [%ld] type %s on window %p.\n", + "window [0x%x] from hint importing property [%ld] type [%s] on window [%p].\n", (unsigned int) wmHints.icon_window, (long int) property, typeS, (void *) pWin); #endif @@ -1024,7 +1024,7 @@ void nxagentImportProperty(Window window, #ifdef WARNING fprintf(stderr, "nxagentImportProperty: WARNING! Failed to look up remote icon " - "mask %x from hint importing property [%ld] type %s on window %p.\n", + "mask [0x%x] from hint importing property [%ld] type [%s] on window [%p].\n", (unsigned int) wmHints.icon_mask, (long int) property, typeS, (void *) pWin); #endif } @@ -1044,7 +1044,7 @@ void nxagentImportProperty(Window window, #ifdef WARNING fprintf(stderr, "nxagentImportProperty: WARNING! Failed to look up remote window " - "group %x from hint importing property [%ld] type %s on window %p.\n", + "group [0x%x] from hint importing property [%ld] type [%s] on window [%p].\n", (unsigned int) wmHints.window_group, (long int) property, typeS, (void *) pWin); #endif @@ -1060,7 +1060,7 @@ void nxagentImportProperty(Window window, if (atoms == NULL) { #ifdef WARNING - fprintf(stderr, "nxagentImportProperty: WARNING! malloc() failed for '%s' - bailing out.\n", typeS); + fprintf(stderr, "nxagentImportProperty: WARNING! malloc() failed for '[%s]' - bailing out.\n", typeS); #endif return; @@ -1077,7 +1077,7 @@ void nxagentImportProperty(Window window, if (atoms[i] == None) { #ifdef WARNING - fprintf(stderr, "nxagentImportProperty: WARNING! Failed to convert remote atom %ld.\n", + fprintf(stderr, "nxagentImportProperty: WARNING! Failed to convert remote atom [%ld].\n", (long int) input[i]); #endif } @@ -1093,7 +1093,7 @@ void nxagentImportProperty(Window window, if (!wind) { #ifdef WARNING - fprintf(stderr, "nxagentImportProperty: WARNING! malloc() failed for '%s' - bailing out.\n", typeS); + fprintf(stderr, "nxagentImportProperty: WARNING! malloc() failed for '[%s]' - bailing out.\n", typeS); #endif return; @@ -1113,8 +1113,8 @@ void nxagentImportProperty(Window window, else { #ifdef WARNING - fprintf(stderr, "nxagentImportProperty: WARNING! Failed to look up remote window %lx " - "importing property [%ld] type %s on window %p.\n", + fprintf(stderr, "nxagentImportProperty: WARNING! Failed to look up remote window [0x%lx] " + "importing property [%ld] type [%s] on window [%p].\n", (long int) input[i], (long int) property, typeS, (void*)pWin); #endif @@ -1127,7 +1127,7 @@ void nxagentImportProperty(Window window, { #ifdef TEST fprintf(stderr, "nxagentImportProperty: ChangeProperty " - "on window %lx property [%ld] type %s nitems %ld format %d\n", + "on window [0x%lx] property [%ld] type [%s] nitems [%ld] format [%d]\n", window, property, typeS, nitems, format); #endif @@ -1138,7 +1138,7 @@ void nxagentImportProperty(Window window, { #ifdef TEST fprintf(stderr, "nxagentImportProperty: WARNING! Ignored ChangeProperty " - "on window %lx property [%ld] type %s ntems %ld format %d\n", + "on window [0x%lx] property [%ld] type [%s] ntems [%ld] format [%d]\n", window, property, validateString(typeS), nitems, format); #endif } @@ -1183,7 +1183,7 @@ void nxagentRemovePropertyFromList(void) struct nxagentPropertyRec *tmp = nxagentPropertyList.first; #ifdef TEST - fprintf(stderr, "nxagentRemovePropertyFromList: Property %ld on Window %lx to list, list size is %d.\n\n", + fprintf(stderr, "nxagentRemovePropertyFromList: Property [%ld] on Window [0x%lx] to list, list size is [%d].\n\n", nxagentPropertyList.first -> property, nxagentPropertyList.first -> window, nxagentPropertyList.size); #endif @@ -1220,8 +1220,8 @@ void nxagentAddPropertyToList(Atom property, WindowPtr pWin) } #ifdef TEST - fprintf(stderr, "nxagentAddPropertyToList: Adding record Property %ld - Window %lx[%p]" - "to list, list size is %d.\n", property, nxagentWindow(pWin), (void*) pWin, + fprintf(stderr, "nxagentAddPropertyToList: Adding record Property [%ld] - Window [0x%lx][%p]" + "to list, list size is [%d].\n", property, nxagentWindow(pWin), (void*) pWin, nxagentPropertyList.size); #endif @@ -1262,12 +1262,12 @@ Bool nxagentNotifyMatchChangeProperty(void *p) XPropertyEvent *X = p; #ifdef TEST - fprintf(stderr, "nxagentNotifyMatchChangeProperty: Property notify on window %lx property %ld.\n", + fprintf(stderr, "nxagentNotifyMatchChangeProperty: Property notify on window [0x%lx] property [%ld].\n", X -> window, X -> atom); if (first) { - fprintf(stderr, "nxagentNotifyMatchChangeProperty: First element on list is window %lx property %ld list size is %d.\n", + fprintf(stderr, "nxagentNotifyMatchChangeProperty: First element on list is window [0x%lx] property [%ld] list size is [%d].\n", first -> window, first -> property, nxagentPropertyList.size); } else -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 1bfafc127c82b87bbb398bbd7c6984144c3fb3eb Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu May 30 11:38:10 2019 +0200 Window.c: add missing comment about nxagentConfiguredWindowList was in inital version of 6ce9fb5f2875754f97035d3338b3d0e1d20169ae but got lost during some rebasing/cherry-picking preceeding the pull request. --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 6758e0875..78a5081f0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -3470,6 +3470,12 @@ void nxagentSetTopLevelEventMask(WindowPtr pWin) } /* + * Run nxagentConfigureWindow() on all windows in + * nxagentConfiguredWindowList and move them from the list + * afterwards. The list will be empty then. + * + * This is also taking care of entries in nxagentExposeQueue that need + * to be synchronized with the real X server. */ void nxagentFlushConfigureWindow(void) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 2b25eb3d2fb4b2a50c0c746dfe967cfb82e38e1c Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jun 12 00:16:48 2019 +0200 Pixmap.c: fix comment phrasing/spelling --- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c index be154f9c2..676a0aebb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c @@ -1355,7 +1355,7 @@ Bool nxagentPixmapOnShadowDisplay(PixmapPtr pMap) /* FIXME: If the pixmap has a different depth from the window, the - XPutImage returns a BadMatch. For example this may happens if + XPutImage returns a BadMatch. For example this may happen if the Render extension is enabled. Can we fix this creating a new pixmap? */ @@ -1372,7 +1372,7 @@ FIXME: If the pixmap has a different depth from the window, the /* * If the framebuffer is updated continuously, the nxagent - * visualization become too much slow. + * visualization becomes much too slow. */ if ((GetTimeInMillis() - showTime) < 500) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 308824ba96b8752835e15dedf2bc0e1cd7c1ddaa Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 13 22:56:45 2019 +0200 xkb: initialize tsyms Backport of this commit: commit b2167015043a458e9cf93b827b43eb5b7c552ce9 Author: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Date: Sat Nov 4 23:06:27 2017 +0100 xkb: initialize tsyms This fixes some “Conditional jump depends on uninitialized value(s)” errors spotted by valgrind. Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> --- nx-X11/programs/Xserver/xkb/xkbUtils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/xkb/xkbUtils.c b/nx-X11/programs/Xserver/xkb/xkbUtils.c index 21a5ce76a..a545f06eb 100644 --- a/nx-X11/programs/Xserver/xkb/xkbUtils.c +++ b/nx-X11/programs/Xserver/xkb/xkbUtils.c @@ -187,7 +187,7 @@ XkbDescPtr xkb; unsigned key,nG,explicit; KeySymsPtr pCore; int types[XkbNumKbdGroups]; -KeySym tsyms[XkbMaxSymsPerKey],*syms; +KeySym tsyms[XkbMaxSymsPerKey] = {NoSymbol},*syms; XkbMapChangesPtr mc; xkb= pXDev->key->xkbInfo->desc; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 3b06ad51d91ff2b9442f159cddf34ed03bc2dd35 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 17 16:06:02 2019 +0200 Screen.c: Fix: make sure RRCloseScreen is being called Fixes ArcticaProject/nx-libs#598 In nxagentOpenScreen we first initialized the RRExtension for the screen and then replaced pScreen->CloseScreen by nxagentCloseScreen. This resulted in RandR's RRCloseScreen (and any other CloseScreen procedure installed by extensions) being no longer called. Moving RandR init after configuring pScreen->CloseScreen ensures the correct calling cascade: RRCloseScreen -> nxagentCloseScreen ->fbCloseScreen (called explicitly by nxagentCloseScreen). Which in turn will fix this memory leak: ==9688== 328 (312 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 271 of 319 ==9688== at 0x4837B65: calloc (vg_replace_malloc.c:752) ==9688== by 0x4ED2C6: RRScreenInit (randr.c:329) ==9688== by 0x1F2B18: nxagentInitRandRExtension (Extensions.c:122) ==9688== by 0x1DEAFF: nxagentOpenScreen (Screen.c:1409) ==9688== by 0x16D7F8: AddScreen (dispatch.c:4257) ==9688== by 0x1DA0CF: InitOutput (Init.c:397) ==9688== by 0x14DCC2: main (main.c:280) --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 7d180da44..84ef9c4a4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1401,13 +1401,6 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, pScreen -> rootVisual = defaultVisual; pScreen -> rootDepth = rootDepth; - /* - * Complete the initialization of the RANDR - * extension. - */ - - nxagentInitRandRExtension(pScreen); - /* * Set up the internal structures used for * tracking the proxy resources associated @@ -1694,6 +1687,13 @@ N/A nxagentOption(Height)) / 32) } + /* + * Complete the initialization of the RANDR + * extension. + */ + + nxagentInitRandRExtension(pScreen); + #ifdef TEST nxagentPrintAgentGeometry(NULL, "nxagentOpenScreen:"); #endif -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit ca741177e8a36f0eb5e84a047681bfd2edd3e3ba Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 17 18:15:05 2019 +0200 CloseDevice: call XkbRemoveResourceClient before freeing key class struct This patch is not necessary at the current code level. But when xkb code introduced the dev->key check Xorg upstream missed that. So we backport it now to skip that trap when updating xkb code. Author: Alan Coopersmith <alan.coopersmith@sun.com> Date: Mon Jan 4 18:21:54 2010 -0800 CloseDevice: call XkbRemoveResourceClient before freeing key class struct XkbRemoveResourceClient() returns immediately if dev->key is NULL. CloseDevice calls XkbRemoveResourceClient until it removes all resources. If we free dev->key and NULL it before XkbRemoveResourceClient, then infinite loop ensues, and the server appears to hang on exit or crash. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de> --- nx-X11/programs/Xserver/dix/devices.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/dix/devices.c b/nx-X11/programs/Xserver/dix/devices.c index 51cf3fef9..8ad1cc371 100644 --- a/nx-X11/programs/Xserver/dix/devices.c +++ b/nx-X11/programs/Xserver/dix/devices.c @@ -203,7 +203,15 @@ CloseDevice(register DeviceIntPtr dev) if (dev->inited) (void)(*dev->deviceProc)(dev, DEVICE_CLOSE); + +#ifdef XKB + while (dev->xkb_interest) { + XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); + } +#endif + free(dev->name); + if (dev->key) { #ifdef XKB @@ -267,11 +275,6 @@ CloseDevice(register DeviceIntPtr dev) #endif free(l); } -#ifdef XKB - while (dev->xkb_interest) { - XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); - } -#endif free(dev->sync.event); free(dev); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 4dd1f3cbdff984ff55bc2f88c64b2544c8d88148 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 17 20:25:09 2019 +0200 Fix memleaks: Free devPrivates of devices on shutdown Fixes these two memory leaks identified by valgrind: ==28336== 32 (8 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 180 of 308 ==28336== at 0x48356AF: malloc (vg_replace_malloc.c:298) ==28336== by 0x4837DE7: realloc (vg_replace_malloc.c:826) ==28336== by 0x1AE322: AllocateDevicePrivate (privates.c:439) ==28336== by 0x27527B: XkbSetExtension (xkbActions.c:72) ==28336== by 0x198E9B: _RegisterPointerDevice (devices.c:361) ==28336== by 0x1DBA35: InitInput (Init.c:440) ==28336== by 0x14DBD6: main (main.c:303) ==28336== ==28336== 32 (8 direct, 24 indirect) bytes in 1 blocks are definitely lost in loss record 181 of 308 ==28336== at 0x48356AF: malloc (vg_replace_malloc.c:298) ==28336== by 0x4837DE7: realloc (vg_replace_malloc.c:826) ==28336== by 0x1AE322: AllocateDevicePrivate (privates.c:439) ==28336== by 0x27527B: XkbSetExtension (xkbActions.c:72) ==28336== by 0x198F1B: _RegisterKeyboardDevice (devices.c:384) ==28336== by 0x1DBA3D: InitInput (Init.c:441) ==28336== by 0x14DBD6: main (main.c:303) --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 9 ++++++++- nx-X11/programs/Xserver/hw/nxagent/Pointer.c | 11 +++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 46686b754..c8038955b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1025,11 +1025,18 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio break; case DEVICE_CLOSE: - #ifdef TEST fprintf(stderr, "nxagentKeyboardProc: Called for [DEVICE_CLOSE].\n"); #endif + for (int i = 0; i < pDev->nPrivates; i++) + { + free(pDev->devPrivates[i].ptr); + pDev->devPrivates[i].ptr = NULL; + } + free(pDev->devPrivates); + pDev->devPrivates = NULL; + break; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pointer.c b/nx-X11/programs/Xserver/hw/nxagent/Pointer.c index c59230724..85d286b96 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pointer.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pointer.c @@ -40,7 +40,7 @@ is" without express or implied warranty. #include "X.h" #include "Xproto.h" #include "screenint.h" -#include "input.h" +#include "inputstr.h" #include "misc.h" #include "scrnintstr.h" #include "servermd.h" @@ -162,11 +162,18 @@ int nxagentPointerProc(DeviceIntPtr pDev, int onoff) break; case DEVICE_CLOSE: - #ifdef TEST fprintf(stderr, "nxagentPointerProc: Called for [DEVICE_CLOSE].\n"); #endif + for (int i = 0; i < pDev->nPrivates; i++) + { + free(pDev->devPrivates[i].ptr); + pDev->devPrivates[i].ptr = NULL; + } + free(pDev->devPrivates); + pDev->devPrivates = NULL; + break; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 340de78e26e7837561909ae2a44c2ef85863d87b Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 17 17:31:32 2019 +0200 Keyboard.c: nullify freed pointers While trying to properly free memory allocated by XKB I accidently called nxagentFreeKeyboardDeviceData twice and noticed it would cause a segfault here. As the other pointers are also nullified after being freed let's just do it here, too. --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 96b33ea7d..46686b754 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1327,14 +1327,18 @@ static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev) dev->focus = NULL; } - for (k = dev->kbdfeed; k; k = knext) + if (dev->kbdfeed) { - knext = k->next; - #ifdef XKB - if (k->xkb_sli) - XkbFreeSrvLedInfo(k->xkb_sli); - #endif - free(k); + for (k = dev->kbdfeed; k; k = knext) + { + knext = k->next; + #ifdef XKB + if (k->xkb_sli) + XkbFreeSrvLedInfo(k->xkb_sli); + #endif + free(k); + } + dev->kbdfeed = NULL; } #ifdef DEBUG -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 0f8dbbab2a218269165f06de37db59b5a20f09ea Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 14 00:14:17 2019 +0200 Screen.c: correctly free stuff in nxagentCloseScreen fixes a memory leak: ==19074== 2 bytes in 1 blocks are definitely lost in loss record 8 of 313 ==19074== at 0x483577F: malloc (vg_replace_malloc.c:299) ==19074== by 0x1FD83D: fbAllocatePrivates (fballpriv.c:79) ==19074== by 0x20A666: fbSetupScreen (fbscreen.c:110) ==19074== by 0x20A666: fbScreenInit (fbscreen.c:300) ==19074== by 0x1DEA4C: nxagentOpenScreen (Screen.c:1356) ==19074== by 0x16D7F8: AddScreen (dispatch.c:4257) ==19074== by 0x1DA0CF: InitOutput (Init.c:397) ==19074== by 0x14DCC2: main (main.c:280) --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 8568562c2..7d180da44 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -2141,20 +2141,32 @@ Bool nxagentCloseScreen(ScreenPtr pScreen) fprintf(stderr, "running nxagentCloseScreen()\n"); #endif + /* + * We have called fbScreenInit() in nxagenOpenScreen, which in turn + * called fbOpenScreen. But we are not using the data as created by + * fbOpenScreen but have freed it and replaced by our own. So we free + * our own stuff here and take care that fbCloseScreen will not free + * them again. + */ + for (i = 0; i < pScreen->numDepths; i++) { free(pScreen->allowedDepths[i].vids); + pScreen->allowedDepths[i].vids = NULL; } + pScreen->numDepths = 0; + /* * Free the frame buffer. */ free(((PixmapPtr)pScreen -> devPrivate) -> devPrivate.ptr); + free(pScreen->devPrivate);pScreen->devPrivate = NULL; + free(pScreen->allowedDepths); pScreen->allowedDepths = NULL; + free(pScreen->visuals); pScreen->visuals = NULL; - free(pScreen->allowedDepths); - free(pScreen->visuals); - free(pScreen->devPrivate); + fbCloseScreen(pScreen); /* * Reset the geometry and alpha information -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 7e12c9ba57eb583cf1d0a22894fa3c4c090a2c7f Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Jun 18 19:04:12 2019 +0200 Extension.c: code simplifications --- nx-X11/programs/Xserver/hw/nxagent/Extensions.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c index 785724cea..239d84b85 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Extensions.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Extensions.c @@ -98,13 +98,12 @@ void nxagentInitGlxExtension(VisualPtr *visuals, DepthPtr *depths, int *numVisuals, int *numDepths, int *rootDepth, VisualID *defaultVisual) { - miInitVisualsProcPtr initVisuals; /* * Initialize the visuals to use the GLX extension. */ - initVisuals = NULL; + miInitVisualsProcPtr initVisuals = NULL; GlxWrapInitVisuals(&initVisuals); @@ -372,15 +371,13 @@ static int nxagentRandRInitSizes(ScreenPtr pScreen) int nxagentRandRSetConfig(ScreenPtr pScreen, Rotation rotation, int rate, RRScreenSizePtr pSize) { - int r; - UpdateCurrentTime(); /* * Whatever size is OK for us. */ - r = nxagentResizeScreen(pScreen, pSize -> width, pSize -> height, + int r = nxagentResizeScreen(pScreen, pSize -> width, pSize -> height, pSize -> mmWidth, pSize -> mmHeight); nxagentMoveViewport(pScreen, 0, 0); @@ -430,8 +427,6 @@ void nxagentRandRSetWindowsSize(int width, int height) int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight) { - int result; - UpdateCurrentTime(); if (nxagentOption(DesktopResize) == 1 && @@ -453,7 +448,7 @@ int nxagentRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, nxagentChangeOption(Height, height); } - result = nxagentResizeScreen(pScreen, width, height, mmWidth, mmHeight); + int result = nxagentResizeScreen(pScreen, width, height, mmWidth, mmHeight); if (result == 1 && nxagentOption(DesktopResize) == 1 && nxagentOption(Fullscreen) == 0 && nxagentOption(AllScreens) == 0) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 17d5e62ba400e105b7faf130ef31db299a5478c7 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 17 21:57:45 2019 +0200 Events.c: use designated initializer in nxagentDeactivatePointerGrab --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 32 +++++++++++++++-------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 4bddbba3a..8e976779d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -4011,21 +4011,23 @@ void nxagentDeactivatePointerGrab(void) if (grab) { - XButtonEvent X; - memset(&X, 0, sizeof(XButtonEvent)); - - X.type = ButtonRelease; - X.serial = 0; - X.send_event = FALSE; - X.time = currentTime.milliseconds; - X.display = nxagentDisplay; - X.window = nxagentWindow(grab -> window); - X.root = RootWindow(nxagentDisplay, 0); - X.subwindow = 0; - X.x = X.y = X.x_root = X.y_root = 0; - X.state = 0x100; - X.button = 1; - X.same_screen = TRUE; + XButtonEvent X = { + .type = ButtonRelease, + .serial = 0, + .send_event = FALSE, + .time = currentTime.milliseconds, + .display = nxagentDisplay, + .window = nxagentWindow(grab -> window), + .root = RootWindow(nxagentDisplay, 0), + .subwindow = 0, + .x = 0, + .y = 0, + .x_root = 0, + .y_root = 0, + .state = 0x100, + .button = 1, + .same_screen = TRUE, + }; XPutBackEvent(nxagentDisplay, (XEvent*)&X); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 7564422263a10ec8992e538bb741b2ddb51dad82 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jun 17 23:37:51 2019 +0200 Screen.c: fix another memory leak ==12280== 0 bytes in 5 blocks are definitely lost in loss record 1 of 304 ==12280== at 0x483577F: malloc (vg_replace_malloc.c:299) ==12280== by 0x2EFC29: init_visuals (xf86glx.c:489) ==12280== by 0x2EFC29: __MESA_initVisuals (xf86glx.c:540) ==12280== by 0x17C902: GlxInitVisuals (glxext.c:317) ==12280== by 0x218C03: fbInitVisuals (fbcmap.c:668) ==12280== by 0x20BC41: fbFinishScreenInit (fbscreen.c:229) ==12280== by 0x20C005: fbScreenInit (fbscreen.c:273) ==12280== by 0x1E024C: nxagentOpenScreen (Screen.c:1356) ==12280== by 0x16D828: AddScreen (dispatch.c:4171) ==12280== by 0x1DB7DF: InitOutput (Init.c:396) ==12280== by 0x14DB12: main (main.c:279) ==12280== ==12280== 64 bytes in 2 blocks are definitely lost in loss record 223 of 304 ==12280== at 0x483577F: malloc (vg_replace_malloc.c:299) ==12280== by 0x2EFA05: init_visuals (xf86glx.c:489) ==12280== by 0x2EFA05: __MESA_initVisuals (xf86glx.c:540) ==12280== by 0x17C902: GlxInitVisuals (glxext.c:317) ==12280== by 0x218C03: fbInitVisuals (fbcmap.c:668) ==12280== by 0x20BC41: fbFinishScreenInit (fbscreen.c:229) ==12280== by 0x20C005: fbScreenInit (fbscreen.c:273) ==12280== by 0x1E024C: nxagentOpenScreen (Screen.c:1356) ==12280== by 0x16D828: AddScreen (dispatch.c:4171) ==12280== by 0x1DB7DF: InitOutput (Init.c:396) ==12280== by 0x14DB12: main (main.c:279) --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 84ef9c4a4..2fcb741db 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1391,15 +1391,23 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, * by fbScreenInit with our own. */ - free(pScreen -> visuals); + for (int i = 0; i < pScreen->numDepths; i++) + { + #ifdef DEBUG + fprintf(stderr, "%s: depth [%d] index [%d] vids [%p]\n", __func__, pScreen->allowedDepths[i].depth, i, (void*) pScreen->allowedDepths[i].vids); + #endif + free(pScreen->allowedDepths[i].vids); + } + free(pScreen -> allowedDepths); + pScreen -> allowedDepths = depths; + pScreen -> numDepths = numDepths; + pScreen -> rootDepth = rootDepth; + free(pScreen -> visuals); pScreen -> visuals = visuals; - pScreen -> allowedDepths = depths; pScreen -> numVisuals = numVisuals; - pScreen -> numDepths = numDepths; pScreen -> rootVisual = defaultVisual; - pScreen -> rootDepth = rootDepth; /* * Set up the internal structures used for -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 5cb497146091acf84f389f6b459f5d2f8ea86643 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Jun 18 18:57:17 2019 +0200 mi/miinitext.c: fix memleaks: remove (double) glx initialization Fix these memory leaks: ==30021== 128 bytes in 1 blocks are definitely lost in loss record 230 of 302 ==30021== at 0x483577F: malloc (vg_replace_malloc.c:299) ==30021== by 0x2EF89C: init_visuals (xf86glx.c:390) ==30021== by 0x2EF89C: __MESA_initVisuals (xf86glx.c:541) ==30021== by 0x17C922: GlxInitVisuals (glxext.c:317) ==30021== by 0x218E73: fbInitVisuals (fbcmap.c:668) ==30021== by 0x20BEB1: fbFinishScreenInit (fbscreen.c:229) ==30021== by 0x20C275: fbScreenInit (fbscreen.c:273) ==30021== by 0x1E0317: nxagentOpenScreen (Screen.c:1357) ==30021== by 0x16D848: AddScreen (dispatch.c:4171) ==30021== by 0x1DB7FF: InitOutput (Init.c:396) ==30021== by 0x14DB12: main (main.c:279) ==30021== ==30021== 3,072 (192 direct, 2,880 indirect) bytes in 1 blocks are definitely lost in loss record 290 of 302 ==30021== at 0x483577F: malloc (vg_replace_malloc.c:299) ==30021== by 0x2CCCC7: _gl_context_modes_create (glcontextmodes.c:364) ==30021== by 0x2EF87C: init_visuals (xf86glx.c:381) ==30021== by 0x2EF87C: __MESA_initVisuals (xf86glx.c:541) ==30021== by 0x17C922: GlxInitVisuals (glxext.c:317) ==30021== by 0x218E73: fbInitVisuals (fbcmap.c:668) ==30021== by 0x20BEB1: fbFinishScreenInit (fbscreen.c:229) ==30021== by 0x20C275: fbScreenInit (fbscreen.c:273) ==30021== by 0x1E0317: nxagentOpenScreen (Screen.c:1357) ==30021== by 0x16D848: AddScreen (dispatch.c:4171) ==30021== by 0x1DB7FF: InitOutput (Init.c:396) ==30021== by 0x14DB12: main (main.c:279) The problem here is that GlxInitVisuals is called twice. First via fbScreenInit and then again via nxagentInitGlxExtension. We remove the first one to ensure the code in nxagenOpenScreen works as initially intended. There's an xorg upstream patch that does the same (7d74690536b64f7b8e8036507ab7790807349c50), but it also cleans up other stuff we do not even have in out source (yet?). --- nx-X11/programs/Xserver/mi/miinitext.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/mi/miinitext.c b/nx-X11/programs/Xserver/mi/miinitext.c index 9e0f82643..319cb1f2d 100644 --- a/nx-X11/programs/Xserver/mi/miinitext.c +++ b/nx-X11/programs/Xserver/mi/miinitext.c @@ -228,7 +228,6 @@ extern void GlxPushProvider(__GLXprovider *impl); */ #ifndef __DARWIN__ extern void GlxExtensionInit(void); -extern void GlxWrapInitVisuals(miInitVisualsProcPtr *); #else extern void DarwinGlxExtensionInit(void); extern void DarwinGlxWrapInitVisuals(miInitVisualsProcPtr *); @@ -474,9 +473,7 @@ InitVisualWrap() { miResetInitVisuals(); #ifdef GLXEXT -#ifndef __DARWIN__ - GlxWrapInitVisuals(&miInitVisualsProc); -#else +#ifdef __DARWIN__ DarwinGlxWrapInitVisuals(&miInitVisualsProc); #endif #endif -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 8205db4254b4dfba3ecc0cd800e334bdf430b3e3 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jun 19 01:12:26 2019 +0200 Font.c: code simplifications --- nx-X11/programs/Xserver/hw/nxagent/Font.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index c135adb72..fb441d431 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -369,18 +369,16 @@ static void nxagentFreeRemoteFontList(nxagentFontList *listRec) Bool nxagentFontFind(const char *name, int *pos) { - int low,high,res,iter,lpos; - if (!nxagentRemoteFontList.length) { *pos=0; return False; } - low = 0; - high = nxagentRemoteFontList.length - 1; - iter = 0; - res = 1; - lpos = nxagentRemoteFontList.length; + int low = 0; + int high = nxagentRemoteFontList.length - 1; + int iter = 0; + int res = 1; + int lpos = nxagentRemoteFontList.length; while (low <= high) { *pos = (high + low)/2; @@ -416,18 +414,15 @@ Bool nxagentFontFind(const char *name, int *pos) Bool nxagentFontLookUp(const char *name) { int i; - int result; - - char *scalable; if (name != NULL && strlen(name) == 0) { return 0; } - result = nxagentFontFind(name, &i); + int result = nxagentFontFind(name, &i); - scalable = NULL; + char *scalable = NULL; /* * Let's try with the scalable font description. @@ -435,9 +430,7 @@ Bool nxagentFontLookUp(const char *name) if (result == 0) { - scalable = nxagentMakeScalableFontName(name, 0); - - if (scalable != NULL) + if ((scalable = nxagentMakeScalableFontName(name, 0)) != NULL) { result = nxagentFontFind(scalable, &i); @@ -451,9 +444,7 @@ Bool nxagentFontLookUp(const char *name) if (result == 0) { - scalable = nxagentMakeScalableFontName(name, 1); - - if (scalable != NULL) + if ((scalable = nxagentMakeScalableFontName(name, 1)) != NULL) { result = nxagentFontFind(scalable, &i); @@ -888,7 +879,6 @@ static void nxagentFontDisconnect(FontPtr pFont, XID param1, void * param2) static void nxagentCollectFailedFont(FontPtr fpt, XID id) { - if (nxagentFailedToReconnectFonts.font == NULL) { nxagentFailedToReconnectFonts.size = 8; @@ -1632,7 +1622,6 @@ XFontStruct* nxagentLoadQueryFont(register Display *dpy, char *name, FontPtr pFo int nxagentFreeFont(XFontStruct *fs) { - if (fs -> per_char) { #ifdef USE_XF86BIGFONT -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit b5eb7c76e9758973a84a060d47b044f2acc980d3 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Jun 18 19:10:38 2019 +0200 Screen.c: more debug output --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 2fcb741db..b5d133b42 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1394,7 +1394,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, for (int i = 0; i < pScreen->numDepths; i++) { #ifdef DEBUG - fprintf(stderr, "%s: depth [%d] index [%d] vids [%p]\n", __func__, pScreen->allowedDepths[i].depth, i, (void*) pScreen->allowedDepths[i].vids); + fprintf(stderr, "%s: freeing depth [%d] index [%d] vids [%p]\n", __func__, pScreen->allowedDepths[i].depth, i, (void*) pScreen->allowedDepths[i].vids); #endif free(pScreen->allowedDepths[i].vids); } @@ -2159,6 +2159,9 @@ Bool nxagentCloseScreen(ScreenPtr pScreen) for (i = 0; i < pScreen->numDepths; i++) { + #ifdef DEBUG + fprintf(stderr, "%s: freeing depth [%d] index [%d] vids [%p]\n", __func__, pScreen->allowedDepths[i].depth, i, (void*) pScreen->allowedDepths[i].vids); + #endif free(pScreen->allowedDepths[i].vids); pScreen->allowedDepths[i].vids = NULL; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit bffdacc48a6bd49e4ac1b4ce5d2fcc8eecdb811c Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Jun 18 23:36:45 2019 +0200 glxext.c: fix another memory leak ==10226== 3,337 bytes in 1 blocks are definitely lost in loss record 295 of 307 ==10226== at 0x483577F: malloc (vg_replace_malloc.c:299) ==10226== by 0x6281DB9: strdup (strdup.c:42) ==10226== by 0x2ABA9E: __glXClientInfo (glxcmds.c:2170) ==10226== by 0x17CA3E: __glXDispatch (NXglxext.c:128) ==10226== by 0x16EE77: Dispatch (NXdispatch.c:476) ==10226== by 0x14DCE0: main (main.c:353) There's no point in trying to free cl->* after memset(0). This one is a bug that is found identically in xorg upstream and has only been fixed during rework of the whole client resource freeing stuff. So we fix it in glxext.c. --- nx-X11/programs/Xserver/GL/glx/glxext.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/GL/glx/glxext.c b/nx-X11/programs/Xserver/GL/glx/glxext.c index e92e605fa..4f2d2082d 100644 --- a/nx-X11/programs/Xserver/GL/glx/glxext.c +++ b/nx-X11/programs/Xserver/GL/glx/glxext.c @@ -64,6 +64,7 @@ static void ResetClientState(int clientIndex) if (cl->returnBuf) free(cl->returnBuf); if (cl->largeCmdBuf) free(cl->largeCmdBuf); if (cl->currentContexts) free(cl->currentContexts); + if (cl->GLClientextensions) free(cl->GLClientextensions); memset(cl, 0, sizeof(__GLXclientState)); /* ** By default, assume that the client supports @@ -71,9 +72,6 @@ static void ResetClientState(int clientIndex) */ cl->GLClientmajorVersion = 1; cl->GLClientminorVersion = 0; - if (cl->GLClientextensions) - free(cl->GLClientextensions); - } /* -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit cb508b2632f661e19b44f1375ddce3ffb415f4c5 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat May 25 19:38:14 2019 +0200 various scope improvements --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 24 +++++-------- nx-X11/programs/Xserver/hw/nxagent/Font.c | 49 +++++++++----------------- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 4 +-- nx-X11/programs/Xserver/hw/nxagent/NXglyph.c | 8 +---- nx-X11/programs/Xserver/hw/nxagent/NXpicture.c | 12 ++----- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 18 ++++------ nx-X11/programs/Xserver/hw/nxagent/Rootless.c | 38 +++++++------------- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 4 +-- 8 files changed, 50 insertions(+), 107 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 8e976779d..9d9f5d204 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -1964,14 +1964,14 @@ FIXME: Don't enqueue the KeyRelease event if the key was } case UnmapNotify: { - WindowPtr pWin; - #ifdef TEST fprintf(stderr, "nxagentDispatchEvents: Going to handle new UnmapNotify event.\n"); #endif if (nxagentOption(Rootless) == 1) { + WindowPtr pWin; + if ((pWin = nxagentRootlessTopLevelWindow(X.xunmap.window)) != NULL || ((pWin = nxagentWindowPtr(X.xunmap.window)) != NULL && nxagentWindowTopLevel(pWin) == 1)) @@ -1995,22 +1995,19 @@ FIXME: Don't enqueue the KeyRelease event if the key was } case MapNotify: { - WindowPtr pWin; - ClientPtr pClient; - #ifdef TEST fprintf(stderr, "nxagentDispatchEvents: Going to handle new MapNotify event.\n"); #endif if (nxagentOption(Rootless) == 1) { - Bool value = 1; + WindowPtr pWin; if ((pWin = nxagentRootlessTopLevelWindow(X.xmap.window)) != NULL || ((pWin = nxagentWindowPtr(X.xmap.window)) != NULL && nxagentWindowTopLevel(pWin) == 1)) { - pClient = wClient(pWin); + ClientPtr pClient = wClient(pWin); nxagentScreenTrap = 1; @@ -2021,6 +2018,8 @@ FIXME: Don't enqueue the KeyRelease event if the key was if (pWin != NULL) { + Bool value = 1; + TraverseTree(pWin, nxagentChangeMapPrivate, &value); } } @@ -2355,8 +2354,6 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result) int nxagentHandlePropertyNotify(XEvent *X) { - int resource; - if (nxagentOption(Rootless) && !nxagentNotifyMatchChangeProperty((XPropertyEvent *) X)) { #ifdef TEST @@ -2366,7 +2363,7 @@ int nxagentHandlePropertyNotify(XEvent *X) if (nxagentWindowPtr(X -> xproperty.window) != NULL) { - resource = NXGetCollectPropertyResource(nxagentDisplay); + int resource = NXGetCollectPropertyResource(nxagentDisplay); if (resource == -1) { @@ -2643,8 +2640,6 @@ int nxagentHandleGraphicsExposeEvent(XEvent *X) int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) { - WindowPtr pWin; - *result = doNothing; #ifdef TEST @@ -2680,7 +2675,7 @@ int nxagentHandleClientMessageEvent(XEvent *X, enum HandleEventResult *result) return 0; } - pWin = nxagentWindowPtr(X -> xclient.window); + WindowPtr pWin = nxagentWindowPtr(X -> xclient.window); if (pWin == NULL) { @@ -2886,7 +2881,6 @@ int nxagentHandleXkbKeyboardStateEvent(XEvent *X) int nxagentHandleXFixesSelectionNotify(XEvent *X) { - int i; Atom local; XFixesSelectionEvent *xfixesEvent = (XFixesSelectionEvent *) X; @@ -2915,7 +2909,7 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X) if (SelectionCallback) { - i = 0; + int i = 0; while ((i < NumCurrentSelections) && CurrentSelections[i].selection != local) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 8de50fdc3..c135adb72 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -165,8 +165,6 @@ static struct _nxagentFailedToReconnectFonts void nxagentFreeFontCache(void) { - int i; - #ifdef NXAGENT_FONTCACHE_DEBUG fprintf(stderr, "Font: Freeing nxagent font cache\n"); #endif @@ -178,7 +176,7 @@ void nxagentFreeFontCache(void) fprintf(stderr, "Font: Freeing nxagent font cache, there are [%d] entries.\n", CACHE_INDEX); #endif - for (i = 0; i < CACHE_INDEX; i++) + for (int i = 0; i < CACHE_INDEX; i++) { #ifdef NXAGENT_FONTCACHE_DEBUG fprintf(stderr, "Font: Freeing nxagent font cache entry [%d] entry pointer is [%p], name [%s]\n", @@ -208,8 +206,6 @@ void nxagentFreeFontCache(void) void nxagentListRemoteFonts(const char *searchPattern, const int maxNames) { - int i, q, p; - char **xList; int xLen = 0; @@ -241,7 +237,7 @@ void nxagentListRemoteFonts(const char *searchPattern, const int maxNames) * other one will select the 'real' fonts. */ - for (p = 0; p < patternsQt; p++) + for (int p = 0; p < patternsQt; p++) { xList = XListFonts(nxagentDisplay, patterns[p], maxNames, &xLen); @@ -256,11 +252,9 @@ void nxagentListRemoteFonts(const char *searchPattern, const int maxNames) nxagentListRemoteAddName(searchPattern, maxNames); - for (i = 0; i < xLen; i++) + for (int i = 0; i < xLen; i++) { - q = 1; - - nxagentListRemoteAddName(xList[i], q); + nxagentListRemoteAddName(xList[i], 1); } XFreeFontNames(xList); @@ -270,7 +264,7 @@ void nxagentListRemoteFonts(const char *searchPattern, const int maxNames) fprintf(stderr, "nxagentListRemoteFonts: Printing remote font list.\n"); - for (i = 0; i < nxagentRemoteFontList.length; i++) + for (int i = 0; i < nxagentRemoteFontList.length; i++) { fprintf(stderr, "Font# %d, \"%s\"\n", i, nxagentRemoteFontList.list[i]->name); } @@ -353,9 +347,7 @@ void nxagentListRemoteAddName(const char *name, int status) static void nxagentFreeRemoteFontList(nxagentFontList *listRec) { - int l; - - for (l = 0; l < listRec -> length; l++) + for (int l = 0; l < listRec -> length; l++) { if (listRec -> list[l]) { @@ -857,7 +849,6 @@ static void nxagentFontDisconnect(FontPtr pFont, XID param1, void * param2) { nxagentPrivFont *privFont; Bool *pBool = (Bool*)param2; - int i; if (pFont == NULL || !*pBool) return; @@ -869,7 +860,7 @@ static void nxagentFontDisconnect(FontPtr pFont, XID param1, void * param2) (void *) pFont, privFont -> font_struct ? nxagentFont(pFont) : 0); #endif - for (i = 0; i < CACHE_INDEX; i++) + for (int i = 0; i < CACHE_INDEX; i++) { if (strcasecmp(CACHE_NAME(i), privFont -> fontName) == 0) { @@ -1043,13 +1034,11 @@ static void nxagentFontReconnect(FontPtr pFont, XID param1, void * param2) static void nxagentFreeCacheBeforeReconnect(void) { - int i; - #ifdef NXAGENT_RECONNECT_FONT_DEBUG printFontCacheDump("nxagentFreeCacheBeforeReconnect"); #endif - for (i = 0; i < CACHE_INDEX; i++) + for (int i = 0; i < CACHE_INDEX; i++) { if (CACHE_FSTRUCT(i)) { @@ -1061,15 +1050,13 @@ static void nxagentFreeCacheBeforeReconnect(void) static void nxagentCleanCacheAfterReconnect(void) { - int i, j; int real_size = CACHE_INDEX; - nxCacheFontEntryRecPtr swapEntryPtr; #ifdef NXAGENT_RECONNECT_FONT_DEBUG printFontCacheDump("nxagentCleanCacheAfterReconnect"); #endif - for (i = 0; i < CACHE_INDEX; i++) + for (int i = 0; i < CACHE_INDEX; i++) { if(CACHE_FSTRUCT(i) == NULL) { @@ -1078,8 +1065,11 @@ static void nxagentCleanCacheAfterReconnect(void) } } - for (i = 0; i < real_size; i++) + for (int i = 0; i < real_size; i++) { + int j; + nxCacheFontEntryRecPtr swapEntryPtr; + /* Find - first bad occurrence if exist. */ while ((i < real_size) && CACHE_FSTRUCT(i)) i++; @@ -1108,11 +1098,9 @@ static void nxagentCleanCacheAfterReconnect(void) #ifdef NXAGENT_RECONNECT_FONT_DEBUG static void printFontCacheDump(char* msg) { - int i; - fprintf(stderr, "%s - begin -\n", msg); - for (i = 0; i < CACHE_INDEX; i++) + for (int i = 0; i < CACHE_INDEX; i++) { if (CACHE_FSTRUCT(i)) { @@ -1129,7 +1117,6 @@ static void printFontCacheDump(char* msg) Bool nxagentReconnectAllFonts(void *p0) { - int cid; Bool fontSuccess = True; reconnectFlexibility = *((int *) p0); @@ -1147,7 +1134,7 @@ Bool nxagentReconnectAllFonts(void *p0) FindClientResourcesByType(clients[serverClient -> index], RT_NX_FONT, (FindResType) nxagentFontReconnect, &fontSuccess); - for (cid = 0; cid < MAXCLIENTS; cid++) + for (int cid = 0; cid < MAXCLIENTS; cid++) { if (clients[cid]) { @@ -1258,7 +1245,6 @@ static void nxagentFreeFailedToReconnectFonts(void) Bool nxagentReconnectFailedFonts(void *p0) { - int i; int attempt = 1; const int maxAttempt = 5; @@ -1312,7 +1298,7 @@ Bool nxagentReconnectFailedFonts(void *p0) nxagentFreeRemoteFontList(&nxagentRemoteFontList); nxagentListRemoteFonts("*", nxagentMaxFontNames); - for(i = 0; i < nxagentFailedToReconnectFonts.index; i++) + for(int i = 0; i < nxagentFailedToReconnectFonts.index; i++) { fontSuccess = True; @@ -1365,7 +1351,6 @@ Bool nxagentReconnectFailedFonts(void *p0) Bool nxagentDisconnectAllFonts(void) { - int cid; Bool fontSuccess = True; #if defined(NXAGENT_RECONNECT_DEBUG) || defined(NXAGENT_RECONNECT_FONT_DEBUG) @@ -1384,7 +1369,7 @@ Bool nxagentDisconnectAllFonts(void) FindClientResourcesByType(clients[serverClient -> index], RT_NX_FONT, (FindResType) nxagentFontDisconnect, &fontSuccess); - for(cid = 0; cid < MAXCLIENTS; cid++) + for(int cid = 0; cid < MAXCLIENTS; cid++) { if( clients[cid] && fontSuccess ) { diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index c8038955b..cff92ec48 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1299,8 +1299,6 @@ static int nxagentRestoreKeyboardDeviceData(DeviceIntPtr devBackup, DeviceIntPtr static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev) { - KbdFeedbackPtr k, knext; - if (!dev) { #ifdef PANIC @@ -1336,7 +1334,7 @@ static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev) if (dev->kbdfeed) { - for (k = dev->kbdfeed; k; k = knext) + for (KbdFeedbackPtr k = dev->kbdfeed, knext; k; k = knext) { knext = k->next; #ifdef XKB diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c index 35dcbc132..1f82e73dc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c @@ -138,12 +138,6 @@ ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global) int oldSize; CARD32 s; - #ifdef NXAGENT_SERVER - - CARD32 c; - - #endif - tableEntries = hash->tableEntries + change; hashSet = FindGlyphHashSet (tableEntries); if (hashSet == hash->hashSet) @@ -164,7 +158,7 @@ ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global) #ifdef NXAGENT_SERVER - c = hash->table[i].corruptedGlyph; + CARD32 c = hash->table[i].corruptedGlyph; #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c index 4ea7d2d73..e35d1e9bc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c @@ -309,12 +309,6 @@ static PicturePtr createSourcePicture(void) unsigned int totalPictureSize; - DevUnion *ppriv; - - char *privPictureRecAddr; - - int i; - /* * Compute size of entire PictureRect, plus privates. */ @@ -327,9 +321,9 @@ static PicturePtr createSourcePicture(void) if (pPicture != NULL) { - ppriv = (DevUnion *) (pPicture + 1); + DevUnion *ppriv = (DevUnion *) (pPicture + 1); - for (i = 0; i < picturePrivateCount; ++i) + for (int i = 0; i < picturePrivateCount; ++i) { /* * Other privates are inaccessible. @@ -338,7 +332,7 @@ static PicturePtr createSourcePicture(void) ppriv[i].ptr = NULL; } - privPictureRecAddr = (char *) &ppriv[picturePrivateCount]; + char *privPictureRecAddr = (char *) &ppriv[picturePrivateCount]; ppriv[nxagentPicturePrivateIndex].ptr = (void *) privPictureRecAddr; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c index 676a0aebb..653426ebb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c @@ -700,7 +700,6 @@ static void nxagentPixmapMatchID(void *p0, XID x1, void *p2) PixmapPtr nxagentPixmapPtr(Pixmap pixmap) { - int i; struct nxagentPixmapPair pair; if (pixmap == None) @@ -714,7 +713,7 @@ PixmapPtr nxagentPixmapPtr(Pixmap pixmap) FindClientResourcesByType(clients[serverClient -> index], RT_NX_PIXMAP, nxagentPixmapMatchID, &pair); - for (i = 0; (pair.pMap == NULL) && (i < MAXCLIENTS); i++) + for (int i = 0; (pair.pMap == NULL) && (i < MAXCLIENTS); i++) { if (clients[i]) { @@ -790,8 +789,8 @@ void nxagentDisconnectPixmap(void *p0, XID x1, void *p2) Bool nxagentDisconnectAllPixmaps(void) { - int r = 1; int i; + int r = 1; #ifdef TEST fprintf(stderr, "nxagentDisconnectAllPixmaps: Going to iterate through pixmap resources.\n"); @@ -958,8 +957,6 @@ Bool nxagentReconnectAllPixmaps(void *p0) { Bool result = 1; - int i; - #ifdef TEST fprintf(stderr, "nxagentReconnectAllPixmaps: Going to recreate all pixmaps.\n"); #endif @@ -991,7 +988,7 @@ Bool nxagentReconnectAllPixmaps(void *p0) #endif - for (i = 0, result = 1; i < MAXCLIENTS; result = 1, i++) + for (int i = 0, result = 1; i < MAXCLIENTS; result = 1, i++) { if (clients[i] != NULL) { @@ -1138,10 +1135,9 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap) if (!integrity) { - int i; char *p, *q; - for (i = 0, p = image -> data, q = data; i < length; i++) + for (int i = 0, p = image -> data, q = data; i < length; i++) { if (p[i] != q[i]) { @@ -1187,7 +1183,6 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap) Bool nxagentCheckAllPixmapIntegrity(void) { - int i; Bool imageIsGood = True; #ifdef TEST @@ -1197,7 +1192,7 @@ Bool nxagentCheckAllPixmapIntegrity(void) FindClientResourcesByType(clients[serverClient -> index], RT_NX_PIXMAP, nxagentCheckOnePixmapIntegrity, &imageIsGood); - for (i = 0; (i < MAXCLIENTS) && (imageIsGood); i++) + for (int i = 0; (i < MAXCLIENTS) && (imageIsGood); i++) { if (clients[i]) { @@ -1630,11 +1625,10 @@ void nxagentPrintResourcePredicate(void *value, XID id, XID type, void *cdata) void nxagentPrintResources(void) { Bool result; - int i; nxagentPrintResourceTypes(); - for (i = 0; i < MAXCLIENTS; i++) + for (int i = 0; i < MAXCLIENTS; i++) { if (clients[i]) { diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c index f50cd1295..c2611c194 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c @@ -120,12 +120,10 @@ static void nxagentPrintRootlessTopLevelWindowMap(void); void nxagentPrintRootlessTopLevelWindowMap(void) { - int i; - fprintf(stderr, "nxagentPrintRootlessTopLevelWindowMap: Map size is [%d] num of entry [%d].\n", topLevelParentMap.size, topLevelParentMap.next); - for (i = 0; i < topLevelParentMap.next; i++) + for (int i = 0; i < topLevelParentMap.next; i++) { fprintf(stderr, "nxagentPrintRootlessTopLevelWindowMap: [%d] pWin at [%p] XID at [%ld].\n", i, (void *) topLevelParentMap.elt[i].pWin, (long int) topLevelParentMap.elt[i].xid); @@ -136,9 +134,7 @@ void nxagentPrintRootlessTopLevelWindowMap(void) void nxagentRootlessAddTopLevelWindow(WindowPtr pWin, Window w) { - int i; - - for (i = 0; i < topLevelParentMap.next; i++) + for (int i = 0; i < topLevelParentMap.next; i++) { if (topLevelParentMap.elt[i].pWin == pWin) { @@ -181,9 +177,7 @@ void nxagentRootlessAddTopLevelWindow(WindowPtr pWin, Window w) WindowPtr nxagentRootlessTopLevelWindow(Window w) { - int i; - - for (i = 0; i < topLevelParentMap.next; i++) + for (int i = 0; i < topLevelParentMap.next; i++) { if (w == topLevelParentMap.elt[i].xid) { @@ -196,9 +190,7 @@ WindowPtr nxagentRootlessTopLevelWindow(Window w) void nxagentRootlessDelTopLevelWindow(WindowPtr pWin) { - int i; - - for (i = 0; i < topLevelParentMap.next; i++) + for (int i = 0; i < topLevelParentMap.next; i++) { if (pWin == topLevelParentMap.elt[i].pWin) { @@ -506,7 +498,6 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) /* FIXME: is it okay here to ignore malloc fails? */ unsigned long *buffer = malloc(nUnits * sizeof(*buffer)); int *input = value; - int i; if (buffer) { @@ -514,7 +505,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) export = True; output = (char*) buffer; - for (i = 0; i < nUnits; i++) + for (int i = 0; i < nUnits; i++) { buffer[i] = input[i]; } @@ -644,7 +635,6 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) XlibAtom *atoms = malloc(nUnits * sizeof(*atoms)); Atom *input = value; const char *atomName = NULL; - int i; int j = 0; if (!atoms) @@ -659,7 +649,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) export = True; output = (char *) atoms; - for (i = 0; i < nUnits; i++) + for (int i = 0; i < nUnits; i++) { /* * Exporting the _NET_WM_PING property could @@ -703,7 +693,6 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) XlibWindow *wind = malloc(nUnits * sizeof(*wind)); ClientPtr pClient = wClient(pWin); WindowPtr pWindow; - int i; if (!wind) { @@ -717,7 +706,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) export = True; output = (char*) wind; - for (i = 0; i < nUnits; i++) + for (int i = 0; i < nUnits; i++) { pWindow = (WindowPtr)SecurityLookupWindow(input[i], pClient, DixDestroyAccess); @@ -774,15 +763,14 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) } else if (mode == PropModeReplace) { - int n; - char *data; + char * data = (char *) output; XDeleteProperty(nxagentDisplay, nxagentWindow(pWin), propertyX); - data = (char *) output; - while (nUnits > 0) { + int n; + if ((format >> 3) * nUnits + sizeof(xChangePropertyReq) < (MAX_REQUEST_SIZE << 2)) { @@ -1055,7 +1043,6 @@ void nxagentImportProperty(Window window, { Atom *atoms = malloc(nitems * sizeof(Atom)); Atom *input = (Atom*) buffer; - int i; if (atoms == NULL) { @@ -1070,7 +1057,7 @@ void nxagentImportProperty(Window window, import = True; output = (char *) atoms; - for (i = 0; i < nitems; i++) + for (int i = 0; i < nitems; i++) { atoms[i] = nxagentRemoteToLocalAtom(input[i]); @@ -1088,7 +1075,6 @@ void nxagentImportProperty(Window window, Window *input = (Window*) buffer; Window *wind = malloc(nitems * sizeof(Window)); WindowPtr pWindow; - int i; if (!wind) { @@ -1102,7 +1088,7 @@ void nxagentImportProperty(Window window, import = True; output = (char*) wind; - for (i = 0; i < nitems; i++) + for (int i = 0; i < nitems; i++) { pWindow = nxagentWindowPtr(input[i]); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index b5d133b42..147a3108d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -2143,8 +2143,6 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio Bool nxagentCloseScreen(ScreenPtr pScreen) { - int i; - #ifdef DEBUG fprintf(stderr, "running nxagentCloseScreen()\n"); #endif @@ -2157,7 +2155,7 @@ Bool nxagentCloseScreen(ScreenPtr pScreen) * them again. */ - for (i = 0; i < pScreen->numDepths; i++) + for (int i = 0; i < pScreen->numDepths; i++) { #ifdef DEBUG fprintf(stderr, "%s: freeing depth [%d] index [%d] vids [%p]\n", __func__, pScreen->allowedDepths[i].depth, i, (void*) pScreen->allowedDepths[i].vids); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 9f9b790f855f4a969b4ae6730e9cad8a9e743a3a Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 00:42:01 2019 +0200 fb: fix memory leak in fbOverlayFinishScreenInit commit 2aa935bc5cc1e2d5365a97b8c5bb3d33eb5fc758 Author: Tiago Vignatti <tiago.vignatti@nokia.com> Date: Fri Mar 25 22:10:55 2011 +0200 fb: fix memory leak in fbOverlayFinishScreenInit Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> --- nx-X11/programs/Xserver/fb/fboverlay.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/fb/fboverlay.c b/nx-X11/programs/Xserver/fb/fboverlay.c index 6e0bbf252..95101a731 100644 --- a/nx-X11/programs/Xserver/fb/fboverlay.c +++ b/nx-X11/programs/Xserver/fb/fboverlay.c @@ -410,16 +410,20 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen, if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &depth1, &defaultVisual, ((unsigned long)1<<(bpp1-1)) | - ((unsigned long)1<<(bpp2-1)), 8)) + ((unsigned long)1<<(bpp2-1)), 8)) { + free(pScrPriv); return FALSE; + } if (! miScreenInit(pScreen, 0, xsize, ysize, dpix, dpiy, 0, depth1, ndepths, depths, defaultVisual, nvisuals, visuals #ifdef FB_OLD_MISCREENINIT , (miBSFuncPtr) 0 #endif - )) + )) { + free(pScrPriv); return FALSE; + } /* MI thinks there's no frame buffer */ #ifdef MITSHM ShmRegisterFbFuncs(pScreen); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 234be0245324b01676aff764b756248f4e57b45d Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jun 19 23:10:40 2019 +0200 glyph.c: fix a read beyond end of heap buffer If compiled with -fsanitize=address this showed up when running startlxde: ==11551==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60d000018fbc at pc 0x7f270a9ed57b bp 0x7fff30ef3050 sp 0x7fff30ef2800 READ of size 204 at 0x60d000018fbc thread T0 #0 0x7f270a9ed57a (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xb857a) #1 0x559dafcd5c93 in FindGlyphRef ../../render/glyph.c:179 #2 0x559dafcd705d in AddGlyph /work/nx-libs/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c:71 #3 0x559dafccc0ff in ProcRenderAddGlyphs ../../mi/../render/render.c:1186 #4 0x559dafcbd5a5 in ProcRenderDispatch /work/nx-libs/nx-X11/programs/Xserver/hw/nxagent/NXrender.c:1689 #5 0x559dafcbc4ea in Dispatch /work/nx-libs/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c:476 #6 0x559dafc4e9b0 in main /work/nx-libs/nx-X11/programs/Xserver/dix/main.c:353 #7 0x7f2708e1d09a in __libc_start_main ../csu/libc-start.c:308 #8 0x559dafc4f5d9 in _start (/work/nx-libs/nx-X11/programs/Xserver/nxagent+0x6e5d9) 0x60d000018fbc is located 0 bytes to the right of 140-byte region [0x60d000018f30,0x60d000018fbc) allocated by thread T0 here: #0 0x7f270aa1e330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330) #1 0x559dafcd646c in AllocateGlyph ../../render/glyph.c:348 This happens when two glyphs are compared via memcmp and the smaller one happens to be identical to the beginning of the bigger one. Newer render implementations use a sha1 hash instead of memcmp so this patch will (hopefully) be obsolete once render gets updated. --- nx-X11/programs/Xserver/hw/nxagent/NXglyph.c | 61 ++++++++++++++++++++++++++++ nx-X11/programs/Xserver/render/glyph.c | 2 + 2 files changed, 63 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c index 1f82e73dc..72d8242bd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXglyph.c @@ -59,6 +59,67 @@ #endif +GlyphRefPtr +FindGlyphRef (GlyphHashPtr hash, CARD32 signature, Bool match, GlyphPtr compare) +{ + CARD32 elt, step, s; + GlyphPtr glyph; + GlyphRefPtr table, gr, del; + CARD32 tableSize = hash->hashSet->size; + + table = hash->table; + elt = signature % tableSize; + step = 0; + del = 0; + for (;;) + { + gr = &table[elt]; + s = gr->signature; + glyph = gr->glyph; + if (!glyph) + { + if (del) + gr = del; + break; + } + if (glyph == DeletedGlyph) + { + if (!del) + del = gr; + else if (gr == del) + break; + } +#ifdef NXAGENT_SERVER + else if (s == signature && match && glyph->size != compare->size) + { + /* + * if the glyphsize is different there's no need to do a memcmp + * because it will surely report difference. And even worse: + * it will read beyond the end of glyph under some + * circumstances, which can be detected when compiling with + * -fsanitize=address. + */ + } +#endif + else if (s == signature && + (!match || + memcmp (&compare->info, &glyph->info, compare->size) == 0)) + { + break; + } + if (!step) + { + step = signature % hash->hashSet->rehash; + if (!step) + step = 1; + } + elt += step; + if (elt >= tableSize) + elt -= tableSize; + } + return gr; +} + void AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id) { diff --git a/nx-X11/programs/Xserver/render/glyph.c b/nx-X11/programs/Xserver/render/glyph.c index a379b505f..93aed401b 100644 --- a/nx-X11/programs/Xserver/render/glyph.c +++ b/nx-X11/programs/Xserver/render/glyph.c @@ -144,6 +144,7 @@ GlyphInit (ScreenPtr pScreen) return TRUE; } +#ifndef NXAGENT_SERVER GlyphRefPtr FindGlyphRef (GlyphHashPtr hash, CARD32 signature, Bool match, GlyphPtr compare) { @@ -192,6 +193,7 @@ FindGlyphRef (GlyphHashPtr hash, CARD32 signature, Bool match, GlyphPtr compare) } return gr; } +#endif CARD32 HashGlyph (GlyphPtr glyph) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6f954bb7d6fe3e80cce70121b18f09f39f0a1ce8 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 00:13:25 2019 +0200 Quarks.c: add missing ) --- nx-X11/lib/src/Quarks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/lib/src/Quarks.c b/nx-X11/lib/src/Quarks.c index 132ec6f67..0e702d566 100644 --- a/nx-X11/lib/src/Quarks.c +++ b/nx-X11/lib/src/Quarks.c @@ -88,7 +88,7 @@ static XrmQuark nextUniq = -1; /* next quark from XrmUniqueQuark */ #define STRQUANTSIZE (sizeof(XrmString) * (QUANTUMMASK + 1)) #ifdef PERMQ #define QUANTSIZE (STRQUANTSIZE + \ - (sizeof(Bits) * ((QUANTUMMASK + 1) >> 3)) + (sizeof(Bits) * ((QUANTUMMASK + 1) >> 3))) #else #define QUANTSIZE STRQUANTSIZE #endif -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6da1066109241d8c84cdb2b4674f4dd2a15c1a9c Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jun 19 23:44:40 2019 +0200 Keyboard.c: fix three memory leaks ==12976==ERROR: LeakSanitizer: detected memory leaks Direct leak of 6 byte(s) in 1 object(s) allocated from: #0 0x7f510b3ac810 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3a810) #1 0x559ca29c5035 in nxagentKeyboardProc /home/uli/work/nx/ArcticaProject/nx-libs/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c:866 #2 0x7a29bff07 (<unknown module>) Direct leak of 1 byte(s) in 1 object(s) allocated from: #0 0x7f510b3ac810 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3a810) #1 0x559ca29c509a in nxagentKeyboardProc /home/uli/work/nx/ArcticaProject/nx-libs/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c:870 #2 0x7a29bff07 (<unknown module>) Direct leak of 1 byte(s) in 1 object(s) allocated from: #0 0x7f510b3ac810 in strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3a810) #1 0x559ca29c507f in nxagentKeyboardProc /home/uli/work/nx/ArcticaProject/nx-libs/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c:869 #2 0x7a29bff07 (<unknown module>) SUMMARY: AddressSanitizer: 8 byte(s) leaked in 3 allocation(s). --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index cff92ec48..b2ae7dfd1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -945,6 +945,10 @@ XkbError: { NXShadowInitKeymap(&(pDev->key->curKeySyms)); } + + free(rules); + free(variant); + free(options); } if (xkb) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit f55402572cc659888be7ace585bea8c8fcb7db32 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 00:26:47 2019 +0200 dix/dispatch: fix a small memory leak --- nx-X11/programs/Xserver/dix/dispatch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nx-X11/programs/Xserver/dix/dispatch.c b/nx-X11/programs/Xserver/dix/dispatch.c index 6b6dbcad9..d656da748 100644 --- a/nx-X11/programs/Xserver/dix/dispatch.c +++ b/nx-X11/programs/Xserver/dix/dispatch.c @@ -4150,7 +4150,10 @@ AddScreen(Bool (*pfnInit) (ScreenPtr /*pScreen */ , pScreen->devPrivates = (DevUnion *)calloc(sizeof(DevUnion), screenPrivateCount); if (!pScreen->devPrivates && screenPrivateCount) + { + free(pScreen); return -1; + } ret = init_screen(pScreen, i); if (ret != 0) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 213e63eed7f808633dc865af94a9ea4ee703f228 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 01:21:44 2019 +0200 Screen.c: fix two memleaks While at it create and use the freeDepths() helper function. --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 37 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 147a3108d..67151733f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -844,6 +844,19 @@ static int nxagentColorOffset(unsigned long mask) return count; } +void freeDepths(DepthPtr depths, int num) +{ + for (int i = 0; i < num; i++) + { + #ifdef DEBUG + fprintf(stderr, "%s: freeing depth [%d] index [%d] vids [%p]\n", __func__, depths[i].depth, i, (void*) depths[i].vids); + #endif + free(depths[i].vids); + depths[i].vids = NULL; + } + free(depths); +} + Bool nxagentOpenScreen(ScreenPtr pScreen, int argc, char *argv[]) { @@ -1335,6 +1348,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, if (!pFrameBufferBits) { + freeDepths(depths, numDepths); return FALSE; } @@ -1356,6 +1370,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, if (!fbScreenInit(pScreen, pFrameBufferBits, nxagentOption(RootWidth), nxagentOption(RootHeight), monitorResolution, monitorResolution, PixmapBytePad(nxagentOption(RootWidth), rootDepth), bitsPerPixel)) { + freeDepths(depths, numDepths); return FALSE; } @@ -1391,15 +1406,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, * by fbScreenInit with our own. */ - for (int i = 0; i < pScreen->numDepths; i++) - { - #ifdef DEBUG - fprintf(stderr, "%s: freeing depth [%d] index [%d] vids [%p]\n", __func__, pScreen->allowedDepths[i].depth, i, (void*) pScreen->allowedDepths[i].vids); - #endif - free(pScreen->allowedDepths[i].vids); - } - - free(pScreen -> allowedDepths); + freeDepths(pScreen->allowedDepths, pScreen->numDepths); pScreen -> allowedDepths = depths; pScreen -> numDepths = numDepths; pScreen -> rootDepth = rootDepth; @@ -2155,15 +2162,8 @@ Bool nxagentCloseScreen(ScreenPtr pScreen) * them again. */ - for (int i = 0; i < pScreen->numDepths; i++) - { - #ifdef DEBUG - fprintf(stderr, "%s: freeing depth [%d] index [%d] vids [%p]\n", __func__, pScreen->allowedDepths[i].depth, i, (void*) pScreen->allowedDepths[i].vids); - #endif - free(pScreen->allowedDepths[i].vids); - pScreen->allowedDepths[i].vids = NULL; - } - + freeDepths(pScreen->allowedDepths, pScreen->numDepths); + pScreen->allowedDepths = NULL; pScreen->numDepths = 0; /* @@ -2172,7 +2172,6 @@ Bool nxagentCloseScreen(ScreenPtr pScreen) free(((PixmapPtr)pScreen -> devPrivate) -> devPrivate.ptr); free(pScreen->devPrivate);pScreen->devPrivate = NULL; - free(pScreen->allowedDepths); pScreen->allowedDepths = NULL; free(pScreen->visuals); pScreen->visuals = NULL; fbCloseScreen(pScreen); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 78eff73e4a8cf6a428dd4bd5ed50e0515ec8794f Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 00:51:32 2019 +0200 render: Propagate allocation failure from createSourcePicture() commit 211d4c2d353b5e379716484055a3f58235ea65f4 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Dec 14 15:55:22 2011 +0000 render: Propagate allocation failure from createSourcePicture() All the callers were already checking for failure, except that createSourcePicture() itself was failing to check whether it successfully allocated the Picture. [ajax: Rebase, fix line wrap of preceding line] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com> --- nx-X11/programs/Xserver/hw/nxagent/NXpicture.c | 2 ++ nx-X11/programs/Xserver/render/picture.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c index e35d1e9bc..01821f474 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c @@ -318,6 +318,8 @@ static PicturePtr createSourcePicture(void) sizeof(nxagentPrivPictureRec); pPicture = (PicturePtr) calloc(1, totalPictureSize); + if (!pPicture) + return 0; if (pPicture != NULL) { diff --git a/nx-X11/programs/Xserver/render/picture.c b/nx-X11/programs/Xserver/render/picture.c index eba042903..c06ac3550 100644 --- a/nx-X11/programs/Xserver/render/picture.c +++ b/nx-X11/programs/Xserver/render/picture.c @@ -979,6 +979,8 @@ static PicturePtr createSourcePicture(void) { PicturePtr pPicture; pPicture = (PicturePtr) malloc(sizeof(PictureRec)); + if (!pPicture) + return 0; pPicture->pDrawable = 0; pPicture->pFormat = 0; pPicture->pNext = 0; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit e63d9de4565b97645956adf19d7f162ae0d471bd Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 00:59:16 2019 +0200 NXrender: fix another memleak --- nx-X11/programs/Xserver/hw/nxagent/NXrender.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c index fd9c0be82..190f746a4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c @@ -1004,7 +1004,11 @@ ProcRenderCompositeGlyphs (ClientPtr client) elementsBase = malloc(nlist * sizeof(XGlyphElt8)); if (!elementsBase) - return BadAlloc; + { + free(glyphsBase); + free(listsBase); + return BadAlloc; + } buffer = (CARD8 *) (stuff + 1); glyphs = glyphsBase; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 528e1e4ef520506733ac3eeef374fcca41214cd1 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 01:31:17 2019 +0200 NXpicture.c: code simplification --- nx-X11/programs/Xserver/hw/nxagent/NXpicture.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c index 01821f474..491af5b30 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXpicture.c @@ -303,21 +303,17 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error) static PicturePtr createSourcePicture(void) { - PicturePtr pPicture; - extern int nxagentPicturePrivateIndex; - unsigned int totalPictureSize; - /* * Compute size of entire PictureRect, plus privates. */ - totalPictureSize = sizeof(PictureRec) + + unsigned int totalPictureSize = sizeof(PictureRec) + picturePrivateCount * sizeof(DevUnion) + sizeof(nxagentPrivPictureRec); - pPicture = (PicturePtr) calloc(1, totalPictureSize); + PicturePtr pPicture = (PicturePtr) calloc(1, totalPictureSize); if (!pPicture) return 0; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit b4d3dc5bff6a8d3b09a61dbf8421a46fd23b82e8 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 19:14:10 2019 +0200 NXdixfonts.c: fix index out of bounds --- nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c index 50bf719c6..bfb208593 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c @@ -1216,7 +1216,7 @@ nxdoListFontsAndAliases(client, fss) if (c->savedName) { memcpy(tmp,c->savedName,c->savedNameLen>255?255:c->savedNameLen); - tmp[c->savedNameLen>255?256:c->savedNameLen]=0; + tmp[c->savedNameLen>255?255:c->savedNameLen]=0; if (nxagentFontLookUp(tmp)) break; else tmp[0]=0; @@ -1225,7 +1225,7 @@ nxdoListFontsAndAliases(client, fss) else { memcpy(tmp,name,namelen>255?255:namelen); - tmp[namelen>255?256:namelen]=0; + tmp[namelen>255?255:namelen]=0; if (nxagentFontLookUp(tmp)) break; else tmp[0]=0; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit fd7e1f989b757667e7d7a3f0d08c9ee4b21a3a7c Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 18:52:31 2019 +0200 Keyboard.c: rearrange code to make cppcheck happy Otherwise it will (falsely) report "Memory pointed to by 'sessionpath' is freed twice." --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index b2ae7dfd1..7330784de 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1696,7 +1696,10 @@ static char* getKeyboardFilePath(void) free(sessionpath); FatalError("malloc for keyboard file path failed."); } - free(sessionpath); + else + { + free(sessionpath); + } } else { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit bb08043a65ba7e600fafaa3c703915fcb8ad79d4 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 01:29:21 2019 +0200 Screen.c: fix two more memleaks of visuals --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 67151733f..6ec4b245f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1349,6 +1349,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, if (!pFrameBufferBits) { freeDepths(depths, numDepths); + free(visuals); return FALSE; } @@ -1371,6 +1372,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, monitorResolution, monitorResolution, PixmapBytePad(nxagentOption(RootWidth), rootDepth), bitsPerPixel)) { freeDepths(depths, numDepths); + free(visuals); return FALSE; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 3c0469971a5092781783b6a5c86b668047e475be Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 01:35:22 2019 +0200 os/access.c: add missing } --- nx-X11/programs/Xserver/os/access.c | 1 + 1 file changed, 1 insertion(+) diff --git a/nx-X11/programs/Xserver/os/access.c b/nx-X11/programs/Xserver/os/access.c index d8d035ade..df540e704 100644 --- a/nx-X11/programs/Xserver/os/access.c +++ b/nx-X11/programs/Xserver/os/access.c @@ -1348,6 +1348,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp) if (getpeerucred(fd, &peercred) < 0) { FreeLocalClientCreds(lcc); return -1; + } lcc->euid = ucred_geteuid(peercred); if (lcc->euid != -1) lcc->fieldsSet |= LCC_UID_SET; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit d48824195009b2497b4233c9d3f2a8f9c1e6a2d7 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 19:51:00 2019 +0200 compext/Png.c: late image_index allocation Move allocation of image_index close before first_use. This way we do not need to free it if previous step fail. And we cannot forget that free() call. While at it replace malloc+memset by calloc. --- nx-X11/programs/Xserver/hw/nxagent/compext/Png.c | 35 ++++++++++++------------ 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c b/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c index 0a258c5a3..e80f3879d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c +++ b/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c @@ -253,17 +253,6 @@ char *PngCompressData(XImage *image, int *compressed_size) NXColorTable color_table[NB_COLOR_MAX]; CARD8 *image_index; - image_index = (CARD8 *) malloc((image -> height) * (image -> width) * sizeof(CARD8)); - - /* - * TODO: Be sure the padded bytes are cleaned. - * It would be better to set to zero the bytes - * that are not aligned to the word boundary - * at the end of the procedure. - */ - - memset(image_index, 0, (image -> height) * (image -> width) * sizeof(CARD8)); - *compressed_size = 0; pngDataLen = 0; @@ -283,7 +272,6 @@ char *PngCompressData(XImage *image, int *compressed_size) bitsPerPixel); #endif - free(image_index); return NULL; } @@ -316,7 +304,6 @@ char *PngCompressData(XImage *image, int *compressed_size) fprintf(stderr, "******PngCompressData: PANIC! Failed creating the png_create_write_struct.\n"); #endif - free(image_index); return NULL; } @@ -329,7 +316,6 @@ char *PngCompressData(XImage *image, int *compressed_size) #endif png_destroy_write_struct(&png_ptr, NULL); - free(image_index); return NULL; } @@ -341,7 +327,6 @@ char *PngCompressData(XImage *image, int *compressed_size) #endif png_destroy_write_struct(&png_ptr, &info_ptr); - free(image_index); return NULL; } @@ -364,8 +349,6 @@ char *PngCompressData(XImage *image, int *compressed_size) PNG_DEST_SIZE(w, h)); #endif - free(image_index); - return NULL; } @@ -383,6 +366,24 @@ char *PngCompressData(XImage *image, int *compressed_size) return NULL; } + image_index = (CARD8 *) calloc(1, (image -> height) * (image -> width) * sizeof(CARD8)); + if (image_index == NULL) + { + #ifdef PANIC + fprintf(stderr, "******PngCompressData: PANIC! Could not alloc image_index.\n"); + #endif + + free(pngCompBuf); + return NULL; + } + + /* + * TODO: Be sure the padded bytes are cleaned. + * It would be better to set to zero the bytes + * that are not aligned to the word boundary + * at the end of the procedure. + */ + png_set_compression_level(png_ptr, PNG_Z_LEVEL); if (bitsPerPixel == 16) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit c8520ac0aabb475d92ea6b60e3113f2999c04eb8 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 23:14:09 2019 +0200 mi/miexpose.c: add missing free() --- nx-X11/programs/Xserver/mi/miexpose.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nx-X11/programs/Xserver/mi/miexpose.c b/nx-X11/programs/Xserver/mi/miexpose.c index 274a8d4ce..40272f962 100644 --- a/nx-X11/programs/Xserver/mi/miexpose.c +++ b/nx-X11/programs/Xserver/mi/miexpose.c @@ -757,7 +757,10 @@ int what; if (screenContext[i] == (GCPtr)NULL) { if (!ResType && !(ResType = CreateNewResourceType(tossGC))) + { + free(prect); return; + } screenContext[i] = CreateGC((DrawablePtr)pWin, (BITS32) 0, (XID *)NULL, &status); if (!screenContext[i]) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit e440e722d8639411722d8a2499df46fe18c45f31 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 19:53:39 2019 +0200 compext/Png.c: simplify srcBuf allocation --- nx-X11/programs/Xserver/hw/nxagent/compext/Png.c | 43 +++++++----------------- 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c b/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c index e80f3879d..77a1941ea 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c +++ b/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c @@ -481,47 +481,23 @@ char *PngCompressData(XImage *image, int *compressed_size) return NULL; } + int count; if (color_type == PNG_COLOR_TYPE_PALETTE) { - srcBuf = (CARD8 *) malloc(w * sizeof(CARD8)); - - if (srcBuf == NULL) - { - #ifdef PANIC - fprintf(stderr, "******PngCompressData: PANIC! Cannot allocate [%d] bytes.\n", - (int) (w * sizeof(CARD8))); - #endif - - free(image_index); - - return NULL; - } - - /* - * TODO: Be sure the padded bytes are cleaned. - * It would be better to set to zero the bytes - * that are not aligned to the word boundary - * at the end of the procedure. - */ - - memset(srcBuf, 0, w * sizeof(CARD8)); + count = w; } else { - srcBuf = (CARD8 *) malloc(w * 3 * sizeof(CARD8)); - - /* - * TODO: See above. - */ - - memset(srcBuf, 0, w * 3 * sizeof(CARD8)); + count = 3 * w; } + srcBuf = (CARD8 *) calloc(count, sizeof(CARD8)); + if (srcBuf == NULL) { #ifdef PANIC fprintf(stderr, "******PngCompressData: PANIC! Cannot allocate [%d] bytes.\n", - w * 3); + (int) (count * sizeof(CARD8))); #endif free(pngCompBuf); @@ -530,6 +506,13 @@ char *PngCompressData(XImage *image, int *compressed_size) return NULL; } + /* + * TODO: Be sure the padded bytes are cleaned. + * It would be better to set to zero the bytes + * that are not aligned to the word boundary + * at the end of the procedure. + */ + for (dy = 0; dy < h; dy++) { if (color_type == PNG_COLOR_TYPE_RGB) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 4962c5a8dee7bc2b903b9aafa27f4d0fd3c1d177 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 21 10:41:36 2019 +0200 XKB: Remove a bunch of mad ifdefs commit 534fc5140b039a8c98ab715d0a6740d513b41209 Author: Daniel Stone <daniel@fooishbar.org> Date: Sun Feb 3 23:30:22 2008 +1100 XKB: Remove a bunch of mad ifdefs We have SEEK_SET and size_t, seriously. Also use DebugF instead of ifdef DEBUG, and ditch a couple of random bits that were never used. --- nx-X11/programs/Xserver/xkb/XKBGAlloc.c | 8 +-- nx-X11/programs/Xserver/xkb/XKBMAlloc.c | 4 +- nx-X11/programs/Xserver/xkb/XKBMisc.c | 5 +- nx-X11/programs/Xserver/xkb/ddxBeep.c | 4 -- nx-X11/programs/Xserver/xkb/ddxCtrls.c | 23 --------- nx-X11/programs/Xserver/xkb/ddxList.c | 13 +---- nx-X11/programs/Xserver/xkb/ddxLoad.c | 80 +++++------------------------ nx-X11/programs/Xserver/xkb/maprules.c | 86 ++++++++++++-------------------- nx-X11/programs/Xserver/xkb/xkb.c | 2 - nx-X11/programs/Xserver/xkb/xkbAccessX.c | 8 +-- nx-X11/programs/Xserver/xkb/xkbEvents.c | 30 ++++------- nx-X11/programs/Xserver/xkb/xkbInit.c | 17 +------ nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c | 4 +- nx-X11/programs/Xserver/xkb/xkbUtils.c | 10 ---- nx-X11/programs/Xserver/xkb/xkmread.c | 16 +----- 15 files changed, 67 insertions(+), 243 deletions(-) diff --git a/nx-X11/programs/Xserver/xkb/XKBGAlloc.c b/nx-X11/programs/Xserver/xkb/XKBGAlloc.c index b5a7cc317..ac757232e 100644 --- a/nx-X11/programs/Xserver/xkb/XKBGAlloc.c +++ b/nx-X11/programs/Xserver/xkb/XKBGAlloc.c @@ -37,12 +37,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <xkbsrv.h> #include "xkbgeom.h" -#ifdef X_NOT_POSIX -#define Size_t unsigned int -#else -#define Size_t size_t -#endif - /***====================================================================***/ static void @@ -463,7 +457,7 @@ _XkbGeomAlloc( XPointer * old, unsigned short * num, unsigned short * total, int num_new, - Size_t sz_elem) + size_t sz_elem) { if (num_new<1) return Success; diff --git a/nx-X11/programs/Xserver/xkb/XKBMAlloc.c b/nx-X11/programs/Xserver/xkb/XKBMAlloc.c index 178d4153c..e3d9c9495 100644 --- a/nx-X11/programs/Xserver/xkb/XKBMAlloc.c +++ b/nx-X11/programs/Xserver/xkb/XKBMAlloc.c @@ -52,10 +52,8 @@ XkbClientMapPtr map; ((!XkbIsLegalKeycode(xkb->min_key_code))|| (!XkbIsLegalKeycode(xkb->max_key_code))|| (xkb->max_key_code<xkb->min_key_code))) { -#ifdef DEBUG -fprintf(stderr,"bad keycode (%d,%d) in XkbAllocClientMap\n", + DebugF("bad keycode (%d,%d) in XkbAllocClientMap\n", xkb->min_key_code,xkb->max_key_code); -#endif return BadValue; } diff --git a/nx-X11/programs/Xserver/xkb/XKBMisc.c b/nx-X11/programs/Xserver/xkb/XKBMisc.c index 2c5cf42c7..0c533773d 100644 --- a/nx-X11/programs/Xserver/xkb/XKBMisc.c +++ b/nx-X11/programs/Xserver/xkb/XKBMisc.c @@ -413,10 +413,7 @@ unsigned changed,tmp; if (((explicit&XkbExplicitAutoRepeatMask)==0)&&(xkb->ctrls)) { CARD8 old; old= xkb->ctrls->per_key_repeat[key/8]; -#ifdef RETURN_SHOULD_REPEAT - if (*XkbKeySymsPtr(xkb,key) != XK_Return) -#endif - xkb->ctrls->per_key_repeat[key/8]|= (1<<(key%8)); + xkb->ctrls->per_key_repeat[key/8]|= (1<<(key%8)); if (changes && (old!=xkb->ctrls->per_key_repeat[key/8])) changes->ctrls.changed_ctrls|= XkbPerKeyRepeatMask; } diff --git a/nx-X11/programs/Xserver/xkb/ddxBeep.c b/nx-X11/programs/Xserver/xkb/ddxBeep.c index 9f55ff3b8..cf5570b58 100644 --- a/nx-X11/programs/Xserver/xkb/ddxBeep.c +++ b/nx-X11/programs/Xserver/xkb/ddxBeep.c @@ -142,10 +142,6 @@ Atom name; next= 0; pitch= oldPitch= ctrl->bell_pitch; duration= oldDuration= ctrl->bell_duration; -#ifdef DEBUG - if (xkbDebugFlags>1) - ErrorF("beep: %d (count= %d)\n",xkbInfo->beepType,xkbInfo->beepCount); -#endif name= None; switch (xkbInfo->beepType) { default: diff --git a/nx-X11/programs/Xserver/xkb/ddxCtrls.c b/nx-X11/programs/Xserver/xkb/ddxCtrls.c index 783576a5a..33ae7d2d0 100644 --- a/nx-X11/programs/Xserver/xkb/ddxCtrls.c +++ b/nx-X11/programs/Xserver/xkb/ddxCtrls.c @@ -46,12 +46,6 @@ int realRepeat; realRepeat= ctrl->autoRepeat; if ((dev->kbdfeed)&&(XkbDDXUsesSoftRepeat(dev))) ctrl->autoRepeat= 0; -#ifdef DEBUG -if (xkbDebugFlags&0x4) { - ErrorF("XkbDDXKeybdCtrlProc: setting repeat to %d (real repeat is %d)\n", - ctrl->autoRepeat,realRepeat); -} -#endif if (dev->key && dev->key->xkbInfo && dev->key->xkbInfo->kbdProc) (*dev->key->xkbInfo->kbdProc)(dev,ctrl); ctrl->autoRepeat= realRepeat; @@ -92,23 +86,6 @@ unsigned changed, i; unsigned char *rep_old, *rep_new, *rep_fb; changed= new->enabled_ctrls^old->enabled_ctrls; -#ifdef NOTDEF - if (changed&XkbRepeatKeysMask) { - if (dev->kbdfeed) { - int realRepeat; - - if (new->enabled_ctrls&XkbRepeatKeysMask) - dev->kbdfeed->ctrl.autoRepeat= realRepeat= 1; - else dev->kbdfeed->ctrl.autoRepeat= realRepeat= 0; - - if (XkbDDXUsesSoftRepeat(dev)) - dev->kbdfeed->ctrl.autoRepeat= FALSE; - if (dev->kbdfeed->CtrlProc) - (*dev->kbdfeed->CtrlProc)(dev,&dev->kbdfeed->ctrl); - dev->kbdfeed->ctrl.autoRepeat= realRepeat; - } - } -#endif for (rep_old = old->per_key_repeat, rep_new = new->per_key_repeat, rep_fb = dev->kbdfeed->ctrl.autoRepeats, diff --git a/nx-X11/programs/Xserver/xkb/ddxList.c b/nx-X11/programs/Xserver/xkb/ddxList.c index cc95c8603..449828a59 100644 --- a/nx-X11/programs/Xserver/xkb/ddxList.c +++ b/nx-X11/programs/Xserver/xkb/ddxList.c @@ -41,14 +41,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <xkbsrv.h> #include <nx-X11/extensions/XI.h> -#ifndef PATH_MAX -#ifdef MAXPATHLEN -#define PATH_MAX MAXPATHLEN -#else -#define PATH_MAX 1024 -#endif -#endif - #ifdef WIN32 /* from ddxLoad.c */ extern const char* Win32TempDir(); @@ -210,9 +202,8 @@ char tmpname[PATH_MAX]; #ifndef WIN32 in= Popen(buf,"r"); #else -#ifdef DEBUG_CMD - ErrorF("xkb executes: %s\n",buf); -#endif + if (xkbDebugFlags) + DebugF("xkb executes: %s\n",buf); if (System(buf) < 0) ErrorF("Could not invoke keymap compiler\n"); else diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c index b770ba026..306a3530f 100644 --- a/nx-X11/programs/Xserver/xkb/ddxLoad.c +++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c @@ -55,14 +55,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #if defined(CSRG_BASED) || defined(linux) || defined(__GNU__) #include <paths.h> -#endif - -#ifndef PATH_MAX -#ifdef MAXPATHLEN -#define PATH_MAX MAXPATHLEN -#else -#define PATH_MAX 1024 -#endif #endif /* @@ -166,44 +158,19 @@ Win32System(const char *cmdline) #define System(x) Win32System(x) #endif -#ifdef MAKE_XKM_OUTPUT_DIR -/* Borrow trans_mkdir from Xtransutil.c to more safely make directories */ -# undef X11_t -# define TRANS_SERVER -# define PRMSG(lvl,x,a,b,c) \ - if (lvl <= 1) { LogMessage(X_ERROR,x,a,b,c); } else ((void)0) -# include <nx-X11/Xtrans/Xtransutil.c> -# ifndef XKM_OUTPUT_DIR_MODE -# define XKM_OUTPUT_DIR_MODE 0755 -# endif -#endif - static void OutputDirectory( char* outdir, size_t size) { #ifndef WIN32 - if (getuid() == 0 && (strlen(XKM_OUTPUT_DIR) < size) -#ifdef MAKE_XKM_OUTPUT_DIR - && (trans_mkdir(XKM_OUTPUT_DIR, XKM_OUTPUT_DIR_MODE) == 0) -#endif - ) + if (getuid() == 0 && (strlen(XKM_OUTPUT_DIR) < size)) { /* if server running as root it *may* be able to write */ /* FIXME: check whether directory is writable at all */ (void) strcpy (outdir, XKM_OUTPUT_DIR); } else -#endif -#ifdef _PATH_VARTMP - if ((strlen(_PATH_VARTMP) + 1) < size) - { - (void) strcpy (outdir, _PATH_VARTMP); - if (outdir[strlen(outdir) - 1] != '/') /* Hi IBM, Digital */ - (void) strcat (outdir, "/"); - } else -#endif -#ifdef WIN32 +#else if (strlen(Win32TempDir()) + 1 < size) { (void) strcpy(outdir, Win32TempDir()); @@ -264,15 +231,10 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; xkm_output_dir,outFile) == -1) cmd = NULL; } -#ifdef DEBUG if (xkbDebugFlags) { - ErrorF("XkbDDXCompileNamedKeymap compiling keymap using:\n"); - ErrorF(" \"cmd\"\n"); + DebugF("XkbDDXCompileNamedKeymap compiling keymap using:\n"); + DebugF(" \"cmd\"\n"); } -#endif -#ifdef DEBUG_CMD - ErrorF("xkb executes: %s\n",cmd); -#endif if (System(cmd)==0) { if (nameRtrn) { strncpy(nameRtrn,outFile,nameRtrnLen); @@ -284,9 +246,7 @@ char *cmd = NULL,file[PATH_MAX],xkm_output_dir[PATH_MAX],*map,*outFile; free(cmd); return True; } -#ifdef DEBUG - ErrorF("Error compiling keymap (%s)\n",names->keymap); -#endif + DebugF("Error compiling keymap (%s)\n",names->keymap); if (outFile!=NULL) _XkbFree(outFile); if (cmd!=NULL) @@ -399,12 +359,8 @@ char tmpname[PATH_MAX]; if (fclose(out)==0 && System(buf) >= 0) #endif { -#ifdef DEBUG_CMD - ErrorF("xkb executes: %s\n",buf); - ErrorF("xkbcomp input:\n"); - XkbWriteXKBKeymapForNames(stderr,names,NULL,xkb,want,need); - ErrorF("end xkbcomp input\n"); -#endif + if (xkbDebugFlags) + DebugF("xkb executes: %s\n",buf); if (nameRtrn) { strncpy(nameRtrn,keymap,nameRtrnLen); nameRtrn[nameRtrnLen-1]= '\0'; @@ -413,24 +369,20 @@ char tmpname[PATH_MAX]; free (buf); return True; } -#ifdef DEBUG else - ErrorF("Error compiling keymap (%s)\n",keymap); -#endif + DebugF("Error compiling keymap (%s)\n",keymap); #ifdef WIN32 /* remove the temporary file */ unlink(tmpname); #endif } -#ifdef DEBUG else { #ifndef WIN32 - ErrorF("Could not invoke keymap compiler\n"); + DebugF("Could not invoke keymap compiler\n"); #else - ErrorF("Could not open file %s\n", tmpname); + DebugF("Could not open file %s\n", tmpname); #endif } -#endif if (nameRtrn) nameRtrn[0]= '\0'; if (buf != NULL) @@ -505,17 +457,13 @@ unsigned missing; return 0; } else if (!XkbDDXCompileNamedKeymap(xkb,names,nameRtrn,nameRtrnLen)) { -#ifdef NOISY - ErrorF("Couldn't compile keymap file\n"); -#endif + DebugF("Couldn't compile keymap file\n"); return 0; } } else if (!XkbDDXCompileKeymapByNames(xkb,names,want,need, nameRtrn,nameRtrnLen)){ -#ifdef NOISY - ErrorF("Couldn't compile keymap file\n"); -#endif + DebugF("Couldn't compile keymap file\n"); return 0; } file= XkbDDXOpenConfigFile(nameRtrn,fileName,PATH_MAX); @@ -530,11 +478,9 @@ unsigned missing; (void) unlink (fileName); return 0; } -#ifdef DEBUG else if (xkbDebugFlags) { - ErrorF("Loaded %s, defined=0x%x\n",fileName,finfoRtrn->defined); + DebugF("Loaded %s, defined=0x%x\n",fileName,finfoRtrn->defined); } -#endif fclose(file); (void) unlink (fileName); return (need|want)&(~missing); diff --git a/nx-X11/programs/Xserver/xkb/maprules.c b/nx-X11/programs/Xserver/xkb/maprules.c index 295f1acf6..af6c112fe 100644 --- a/nx-X11/programs/Xserver/xkb/maprules.c +++ b/nx-X11/programs/Xserver/xkb/maprules.c @@ -48,16 +48,6 @@ #include "xkbstr.h" #include <xkbsrv.h> -#ifdef DEBUG -#define PR_DEBUG(s) fprintf(stderr,s) -#define PR_DEBUG1(s,a) fprintf(stderr,s,a) -#define PR_DEBUG2(s,a,b) fprintf(stderr,s,a,b) -#else -#define PR_DEBUG(s) -#define PR_DEBUG1(s,a) -#define PR_DEBUG2(s,a,b) -#endif - /***====================================================================***/ #define DFLT_LINE_SIZE 128 @@ -169,8 +159,8 @@ Bool endOfFile,spacePending,slashPending,inComment; } if (checkbang && ch=='!') { if (line->num_line!=0) { - PR_DEBUG("The '!' legal only at start of line\n"); - PR_DEBUG("Line containing '!' ignored\n"); + DebugF("The '!' legal only at start of line\n"); + DebugF("Line containing '!' ignored\n"); line->num_line= 0; inComment= 0; break; @@ -271,9 +261,7 @@ unsigned present, l_ndx_present, v_ndx_present; register int i; int len, ndx; _Xstrtokparams strtok_buf; -#ifdef DEBUG Bool found; -#endif l_ndx_present = v_ndx_present = present= 0; @@ -282,9 +270,7 @@ Bool found; bzero((char *)remap,sizeof(RemapSpec)); remap->number = len; while ((tok=_XStrtok(str," ",strtok_buf))!=NULL) { -#ifdef DEBUG found= False; -#endif str= NULL; if (strcmp(tok,"=")==0) continue; @@ -297,22 +283,20 @@ Bool found; *end != '\0' || ndx == -1) break; if (ndx < 1 || ndx > XkbNumKbdGroups) { - PR_DEBUG2("Illegal %s index: %d\n", cname[i], ndx); - PR_DEBUG1("Index must be in range 1..%d\n", + DebugF("Illegal %s index: %d\n", cname[i], ndx); + DebugF("Index must be in range 1..%d\n", XkbNumKbdGroups); break; } } else { ndx = 0; } -#ifdef DEBUG found= True; -#endif if (present&(1<<i)) { if ((i == LAYOUT && l_ndx_present&(1<<ndx)) || (i == VARIANT && v_ndx_present&(1<<ndx)) ) { - PR_DEBUG1("Component \"%s\" listed twice\n",tok); - PR_DEBUG("Second definition ignored\n"); + DebugF("Component \"%s\" listed twice\n",tok); + DebugF("Second definition ignored\n"); break; } } @@ -326,38 +310,34 @@ Bool found; break; } } -#ifdef DEBUG if (!found) { fprintf(stderr,"Unknown component \"%s\" ignored\n",tok); } -#endif } if ((present&PART_MASK)==0) { -#ifdef DEBUG unsigned mask= PART_MASK; - fprintf(stderr,"Mapping needs at least one of "); + ErrorF("Mapping needs at least one of "); for (i=0; (i<MAX_WORDS); i++) { if ((1L<<i)&mask) { mask&= ~(1L<<i); - if (mask) fprintf(stderr,"\"%s,\" ",cname[i]); - else fprintf(stderr,"or \"%s\"\n",cname[i]); + if (mask) DebugF("\"%s,\" ",cname[i]); + else DebugF("or \"%s\"\n",cname[i]); } } - fprintf(stderr,"Illegal mapping ignored\n"); -#endif + DebugF("Illegal mapping ignored\n"); remap->num_remap= 0; return; } if ((present&COMPONENT_MASK)==0) { - PR_DEBUG("Mapping needs at least one component\n"); - PR_DEBUG("Illegal mapping ignored\n"); + DebugF("Mapping needs at least one component\n"); + DebugF("Illegal mapping ignored\n"); remap->num_remap= 0; return; } if (((present&COMPONENT_MASK)&(1<<KEYMAP))&& ((present&COMPONENT_MASK)!=(1<<KEYMAP))) { - PR_DEBUG("Keymap cannot appear with other components\n"); - PR_DEBUG("Illegal mapping ignored\n"); + DebugF("Keymap cannot appear with other components\n"); + DebugF("Illegal mapping ignored\n"); remap->num_remap= 0; return; } @@ -432,8 +412,8 @@ Bool append = False; } if (remap->num_remap==0) { - PR_DEBUG("Must have a mapping before first line of data\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("Must have a mapping before first line of data\n"); + DebugF("Illegal line of data ignored\n"); return False; } bzero((char *)&tmp,sizeof(FileSpec)); @@ -445,8 +425,8 @@ Bool append = False; continue; } if (nread>remap->num_remap) { - PR_DEBUG("Too many words on a line\n"); - PR_DEBUG1("Extra word \"%s\" ignored\n",tok); + DebugF("Too many words on a line\n"); + DebugF("Extra word \"%s\" ignored\n",tok); continue; } tmp.name[remap->remap[nread].word]= tok; @@ -454,8 +434,8 @@ Bool append = False; append = True; } if (nread<remap->num_remap) { - PR_DEBUG1("Too few words on a line: %s\n", line->line); - PR_DEBUG("line ignored\n"); + DebugF("Too few words on a line: %s\n", line->line); + DebugF("line ignored\n"); return False; } @@ -901,9 +881,7 @@ XkbRF_AddRule(XkbRF_RulesPtr rules) } if (!rules->rules) { rules->sz_rules= rules->num_rules= 0; -#ifdef DEBUG - fprintf(stderr,"Allocation failure in XkbRF_AddRule\n"); -#endif + DebugF("Allocation failure in XkbRF_AddRule\n"); return NULL; } bzero((char *)&rules->rules[rules->num_rules],sizeof(XkbRF_RuleRec)); @@ -1020,7 +998,7 @@ XkbRF_AddVarDesc(XkbRF_DescribeVarsPtr vars) } if (!vars->desc) { vars->sz_desc= vars->num_desc= 0; - PR_DEBUG("Allocation failure in XkbRF_AddVarDesc\n"); + DebugF("Allocation failure in XkbRF_AddVarDesc\n"); return NULL; } vars->desc[vars->num_desc].name= NULL; @@ -1057,7 +1035,7 @@ XkbRF_AddVarToDescribe(XkbRF_RulesPtr rules,char *name) XkbRF_DescribeVarsRec); } if ((!rules->extra_names)||(!rules->extra)) { - PR_DEBUG("allocation error in extra parts\n"); + DebugF("allocation error in extra parts\n"); rules->sz_extra= rules->num_extra= 0; rules->extra_names= NULL; rules->extra= NULL; @@ -1100,7 +1078,7 @@ int len,headingtype,extra_ndx = 0; } if (extra_ndx<0) { XkbRF_DescribeVarsPtr var; - PR_DEBUG1("Extra heading \"%s\" encountered\n",tok); + DebugF("Extra heading \"%s\" encountered\n",tok); var= XkbRF_AddVarToDescribe(rules,tok); if (var) extra_ndx= var-rules->extra; @@ -1111,20 +1089,20 @@ int len,headingtype,extra_ndx = 0; } if (headingtype == HEAD_NONE) { - PR_DEBUG("Must have a heading before first line of data\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("Must have a heading before first line of data\n"); + DebugF("Illegal line of data ignored\n"); continue; } len = strlen(line.line); if ((tmp.name= strtok(line.line, " \t")) == NULL) { - PR_DEBUG("Huh? No token on line\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("Huh? No token on line\n"); + DebugF("Illegal line of data ignored\n"); continue; } if (strlen(tmp.name) == len) { - PR_DEBUG("No description found\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("No description found\n"); + DebugF("Illegal line of data ignored\n"); continue; } @@ -1132,8 +1110,8 @@ int len,headingtype,extra_ndx = 0; while ((*tok!='\n')&&isspace(*tok)) tok++; if (*tok == '\0') { - PR_DEBUG("No description found\n"); - PR_DEBUG("Illegal line of data ignored\n"); + DebugF("No description found\n"); + DebugF("Illegal line of data ignored\n"); continue; } tmp.desc= tok; diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c index 8d3fc6108..e6521c952 100644 --- a/nx-X11/programs/Xserver/xkb/xkb.c +++ b/nx-X11/programs/Xserver/xkb/xkb.c @@ -5677,10 +5677,8 @@ char * str; return status; } else if (length!=0) { -#ifdef DEBUG ErrorF("Internal Error! BadLength in ProcXkbGetDeviceInfo\n"); ErrorF(" Wrote %d fewer bytes than expected\n",length); -#endif return BadLength; } if (stuff->wanted&(~supported)) { diff --git a/nx-X11/programs/Xserver/xkb/xkbAccessX.c b/nx-X11/programs/Xserver/xkb/xkbAccessX.c index 5d9917d2b..3eafaa5b7 100644 --- a/nx-X11/programs/Xserver/xkb/xkbAccessX.c +++ b/nx-X11/programs/Xserver/xkb/xkbAccessX.c @@ -126,11 +126,9 @@ xEvent xE; xE.u.u.type = type; xE.u.u.detail = keyCode; xE.u.keyButtonPointer.time = GetTimeInMillis(); -#ifdef DEBUG if (xkbDebugFlags&0x8) { - ErrorF("AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up")); + DebugF("AXKE: Key %d %s\n",keyCode,(xE.u.u.type==KeyPress?"down":"up")); } -#endif if (!_XkbIsPressEvent(type) && isRepeat) XkbLastRepeatEvent= (void *)&xE; @@ -524,10 +522,8 @@ KeySym * sym = XkbKeySymsPtr(xkbi->desc,key); XkbRepeatKeysMask)) { if (BitIsOn(keybd->kbdfeed->ctrl.autoRepeats,key)) { -#ifdef DEBUG if (xkbDebugFlags&0x10) - ErrorF("Starting software autorepeat...\n"); -#endif + DebugF("Starting software autorepeat...\n"); xkbi->repeatKey = key; xkbi->repeatKeyTimer= TimerSet(xkbi->repeatKeyTimer, 0, ctrls->repeat_delay, diff --git a/nx-X11/programs/Xserver/xkb/xkbEvents.c b/nx-X11/programs/Xserver/xkb/xkbEvents.c index c7a0f9e87..6e8df3490 100644 --- a/nx-X11/programs/Xserver/xkb/xkbEvents.c +++ b/nx-X11/programs/Xserver/xkb/xkbEvents.c @@ -804,21 +804,19 @@ XkbSrvInfoPtr xkbi; xkbi= pXDev->key->xkbInfo; if ( pClient->xkbClientFlags & _XkbClientInitialized ) { -#ifdef DEBUG if ((xkbDebugFlags&0x10)&& ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease))) { - ErrorF("XKbFilterWriteEvents:\n"); - ErrorF(" Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state); - ErrorF(" XkbLastRepeatEvent!=xE (0x%x!=0x%x) %s\n", + DebugF("XKbFilterWriteEvents:\n"); + DebugF(" Event state= 0x%04x\n",xE[0].u.keyButtonPointer.state); + DebugF(" XkbLastRepeatEvent!=xE (0x%x!=0x%x) %s\n", XkbLastRepeatEvent,xE, ((XkbLastRepeatEvent!=(void *)xE)?"True":"False")); - ErrorF(" (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n", + DebugF(" (xkbClientEventsFlags&XWDA)==0 (0x%x) %s\n", pClient->xkbClientFlags, (_XkbWantsDetectableAutoRepeat(pClient)?"True":"False")); - ErrorF(" !IsRelease(%d) %s\n",xE[0].u.u.type, + DebugF(" !IsRelease(%d) %s\n",xE[0].u.u.type, (!_XkbIsReleaseEvent(xE[0].u.u.type))?"True":"False"); } -#endif /* DEBUG */ if ( (XkbLastRepeatEvent==(void *)xE) && (_XkbWantsDetectableAutoRepeat(pClient)) && (_XkbIsReleaseEvent(xE[0].u.u.type)) ) { @@ -853,13 +851,11 @@ XkbSrvInfoPtr xkbi; if (xE[0].u.u.type == ButtonPress && ((xE[0].u.keyButtonPointer.state >> 7) & button_mask) == button_mask && (xkbi->lockedPtrButtons & button_mask) == button_mask) { -#ifdef DEBUG /* If the MouseKeys is pressed, and the "real" mouse is also pressed * when the mouse is released, the server does not behave properly. * Faking a release of the button here solves the problem. */ - ErrorF("Faking release of button %d\n", xE[0].u.u.detail); -#endif + DebugF("Faking release of button %d\n", xE[0].u.u.detail); XkbDDXFakePointerButton(ButtonRelease, xE[0].u.u.detail); } } @@ -868,19 +864,17 @@ XkbSrvInfoPtr xkbi; for (i=0;i<nEvents;i++) { type= xE[i].u.u.type; -#ifdef DEBUG if ((xkbDebugFlags&0x4)&& ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease))) { XkbStatePtr s= &xkbi->state; - ErrorF("XKbFilterWriteEvents (non-XKB):\n"); - ErrorF("event= 0x%04x\n",xE[0].u.keyButtonPointer.state); - ErrorF("lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods, + DebugF("XKbFilterWriteEvents (non-XKB):\n"); + DebugF("event= 0x%04x\n",xE[0].u.keyButtonPointer.state); + DebugF("lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods, s->grab_mods); - ErrorF("compat lookup= 0x%02x, grab= 0x%02x\n", + DebugF("compat lookup= 0x%02x, grab= 0x%02x\n", s->compat_lookup_mods, s->compat_grab_mods); } -#endif if ( (type>=KeyPress)&&(type<=MotionNotify) ) { CARD16 old,new; @@ -900,9 +894,7 @@ XkbSrvInfoPtr xkbi; if (type == ButtonPress && ((xE[i].u.keyButtonPointer.state >> 7) & button_mask) == button_mask && (xkbi->lockedPtrButtons & button_mask) == button_mask) { -#ifdef DEBUG - ErrorF("Faking release of button %d\n", xE[i].u.u.detail); -#endif + DebugF("Faking release of button %d\n", xE[i].u.u.detail); XkbDDXFakePointerButton(ButtonRelease, xE[i].u.u.detail); } } diff --git a/nx-X11/programs/Xserver/xkb/xkbInit.c b/nx-X11/programs/Xserver/xkb/xkbInit.c index 2f7fa475d..f37e202d8 100644 --- a/nx-X11/programs/Xserver/xkb/xkbInit.c +++ b/nx-X11/programs/Xserver/xkb/xkbInit.c @@ -284,10 +284,6 @@ XkbSetRulesDflts(char *rulesFile,char *model,char *layout, /***====================================================================***/ -#if defined(luna) -#define XKB_DDX_PERMANENT_LOCK 1 -#endif - #include "xkbDflts.h" static Bool @@ -394,15 +390,6 @@ Atom unknown; names->indicators[LED_COMPOSE-1] = CREATE_ATOM("Compose"); #endif } -#ifdef DEBUG_RADIO_GROUPS - if (names->num_rg<1) { - names->radio_groups= (Atom *)_XkbCalloc(RG_COUNT, sizeof(Atom)); - if (names->radio_groups) { - names->num_rg = RG_COUNT; - names->radio_groups[RG_BOGUS_FUNCTION_GROUP]= CREATE_ATOM("BOGUS"); - } - } -#endif if (xkb->geom!=NULL) names->geometry= xkb->geom->name; else names->geometry= unknown; @@ -773,9 +760,7 @@ XkbSrvLedInfoPtr sli; sli= XkbFindSrvLedInfo(pXDev,XkbDfltXIClass,XkbDfltXIId,0); if (sli && xkbi) XkbCheckIndicatorMaps(xkbi->device,sli,XkbAllIndicatorsMask); -#ifdef DEBUG - else ErrorF("No indicator feedback in XkbFinishInit (shouldn't happen)!\n"); -#endif + else DebugF("No indicator feedback in XkbFinishInit (shouldn't happen)!\n"); return softRepeat; } diff --git a/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c b/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c index ede23556e..253b4654e 100644 --- a/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c +++ b/nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c @@ -52,11 +52,9 @@ unsigned ndx; xkbi= keyc->xkbInfo; key= xE->u.u.detail; -#ifdef DEBUG if (xkbDebugFlags&0x8) { - ErrorF("XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up")); + DebugF("XkbPKE: Key %d %s\n",key,(xE->u.u.type==KeyPress?"down":"up")); } -#endif if ( (xkbi->repeatKey==key) && (xE->u.u.type==KeyRelease) && ((xkbi->desc->ctrls->enabled_ctrls&XkbRepeatKeysMask)==0) ) { diff --git a/nx-X11/programs/Xserver/xkb/xkbUtils.c b/nx-X11/programs/Xserver/xkb/xkbUtils.c index a545f06eb..941bb4038 100644 --- a/nx-X11/programs/Xserver/xkb/xkbUtils.c +++ b/nx-X11/programs/Xserver/xkb/xkbUtils.c @@ -191,16 +191,6 @@ KeySym tsyms[XkbMaxSymsPerKey] = {NoSymbol},*syms; XkbMapChangesPtr mc; xkb= pXDev->key->xkbInfo->desc; -#ifdef NOTYET - if (first<xkb->min_key_code) { - if (first>=XkbMinLegalKeyCode) { - xkb->min_key_code= first; - /* 1/12/95 (ef) -- XXX! should zero out the new maps */ - changes->map.changed|= XkbKeycodesMask; -generate a NewKeyboard notify here? - } - } -#endif if (first+num-1>xkb->max_key_code) { /* 1/12/95 (ef) -- XXX! should allow XKB structures to grow */ num= xkb->max_key_code-first+1; diff --git a/nx-X11/programs/Xserver/xkb/xkmread.c b/nx-X11/programs/Xserver/xkb/xkmread.c index 4871f3a35..c8b2a4591 100644 --- a/nx-X11/programs/Xserver/xkb/xkmread.c +++ b/nx-X11/programs/Xserver/xkb/xkmread.c @@ -50,10 +50,6 @@ XkbInternAtom(Display *dpy,char *str,Bool only_if_exists) return MakeAtom(str,strlen(str),!only_if_exists); } -#ifndef SEEK_SET -#define SEEK_SET 0 -#endif - /***====================================================================***/ static XPointer @@ -547,10 +543,8 @@ FindTypeForKey(XkbDescPtr xkb,Atom name,unsigned width,KeySym *syms) register unsigned i; for (i=0;i<xkb->map->num_types;i++) { if (xkb->map->types[i].name==name) { -#ifdef DEBUG if (xkb->map->types[i].num_levels!=width) - fprintf(stderr,"Group width mismatch between key and type\n"); -#endif + DebugF("Group width mismatch between key and type\n"); return &xkb->map->types[i]; } } @@ -1072,10 +1066,8 @@ unsigned i,size_toc; ignored_result = fread(file_info,SIZEOF(xkmFileInfo),1,file); size_toc= file_info->num_toc; if (size_toc>max_toc) { -#ifdef DEBUG - fprintf(stderr,"Warning! Too many TOC entries; last %d ignored\n", + DebugF("Warning! Too many TOC entries; last %d ignored\n", size_toc-max_toc); -#endif size_toc= max_toc; } for (i=0;i<size_toc;i++) { @@ -1215,11 +1207,7 @@ unsigned which= need|want; if (result->xkb==NULL) result->xkb= XkbAllocKeyboard(); for (i=0;i<fileInfo.num_toc;i++) { -#ifdef SEEK_SET fseek(file,toc[i].offset,SEEK_SET); -#else - fseek(file,toc[i].offset,0); -#endif tmp= fread(&tmpTOC,SIZEOF(xkmSectionInfo),1,file); nRead= tmp*SIZEOF(xkmSectionInfo); if ((tmpTOC.type!=toc[i].type)||(tmpTOC.format!=toc[i].format)|| -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 956caeb8af1f14a52879d39c98caeb1e13edd546 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 19:54:44 2019 +0200 compext/Png.c: Nullify after free --- nx-X11/programs/Xserver/hw/nxagent/compext/Png.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c b/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c index 77a1941ea..5c3a27612 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c +++ b/nx-X11/programs/Xserver/hw/nxagent/compext/Png.c @@ -532,8 +532,8 @@ char *PngCompressData(XImage *image, int *compressed_size) dy, h); #endif - free(srcBuf); - free(image_index); + free(srcBuf); srcBuf = NULL; + free(image_index); image_index = NULL; if (setjmp(png_jmpbuf(png_ptr))) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 56dcc8a4b6a9ed3b7f55e0eeaeff9bc14737cdd5 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 21 10:10:21 2019 +0200 xkb: remove oldState from XkbHandleActions. Fixes this cppcheck finding: [nx-X11/programs/Xserver/xkb/xkbActions.c:1306]: (error) Uninitialized variable: oldState commit 35a4b8e7f4526a92d44cb16a783f21030cd1f6df Author: Peter Hutterer <peter.hutterer@who-t.net> Date: Tue May 5 16:51:59 2009 +1000 xkb: remove oldState from XkbHandleActions. I really don't know what the purpose of this variable is or was, aside from potentially clobbering up our key state since there's a path where it may be used uninitialised. Also, this means that xkbi->prev_state is now accessible from the DIX with meaningful data. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> --- nx-X11/programs/Xserver/xkb/xkbActions.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/xkb/xkbActions.c b/nx-X11/programs/Xserver/xkb/xkbActions.c index d2dda00f4..90bad93e0 100644 --- a/nx-X11/programs/Xserver/xkb/xkbActions.c +++ b/nx-X11/programs/Xserver/xkb/xkbActions.c @@ -1142,7 +1142,6 @@ XkbSrvInfoPtr xkbi; KeyClassPtr keyc; int changed,sendEvent; Bool genStateNotify; -XkbStateRec oldState; XkbAction act; XkbFilterPtr filter; Bool keyEvent; @@ -1157,7 +1156,7 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); xkbi= keyc->xkbInfo; key= xE->u.u.detail; if ((xkbi->flags&_XkbStateNotifyInProgress)==0) { - oldState= xkbi->state; + xkbi->prev_state = xkbi->state; xkbi->flags|= _XkbStateNotifyInProgress; genStateNotify= True; } @@ -1303,11 +1302,10 @@ xkbDeviceInfoPtr xkbPrivPtr = XKBDEVICEINFO(dev); else if (keyEvent) FixKeyState(xE,dev); - xkbi->prev_state= oldState; XkbComputeDerivedState(xkbi); keyc->prev_state= keyc->state; keyc->state= XkbStateFieldFromRec(&xkbi->state); - changed = XkbStateChangedFlags(&oldState,&xkbi->state); + changed = XkbStateChangedFlags(&xkbi->prev_state,&xkbi->state); if (genStateNotify) { if (changed) { xkbStateNotify sn; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 054e906f6059366150bb7426973542203c8a0e4c Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 21 10:57:09 2019 +0200 xkb: Use snprintf to measure string lengths instead of manual strlen math commit a4a2e814d5d0e6152307a301eda1d6fc1c555aaa Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Sun Feb 13 21:36:02 2011 -0800 xkb: Use snprintf to measure string lengths instead of manual strlen math Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> --- nx-X11/programs/Xserver/xkb/ddxLoad.c | 21 +++++++++++---------- nx-X11/programs/Xserver/xkb/maprules.c | 3 +-- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/nx-X11/programs/Xserver/xkb/ddxLoad.c b/nx-X11/programs/Xserver/xkb/ddxLoad.c index 306a3530f..bff69196f 100644 --- a/nx-X11/programs/Xserver/xkb/ddxLoad.c +++ b/nx-X11/programs/Xserver/xkb/ddxLoad.c @@ -404,15 +404,16 @@ FILE * file; &&(!isalpha(xkm_output_dir[0]) || xkm_output_dir[1]!=':') #endif ) { - if (strlen(XkbBaseDirectory)+strlen(xkm_output_dir) - +strlen(mapName)+6 <= PATH_MAX) - { - sprintf(buf,"%s/%s%s.xkm",XkbBaseDirectory, - xkm_output_dir,mapName); - } + if (snprintf(buf, PATH_MAX, "%s/%s%s.xkm", XkbBaseDirectory, + xkm_output_dir, mapName) >= PATH_MAX) + buf[0] = '\0'; + } + else + { + if (snprintf(buf, PATH_MAX, "%s%s.xkm", xkm_output_dir, mapName) + >= PATH_MAX) + buf[0] = '\0'; } - else if (strlen(xkm_output_dir)+strlen(mapName)+5 <= PATH_MAX) - sprintf(buf,"%s%s.xkm",xkm_output_dir,mapName); if (buf[0] != '\0') file= fopen(buf,"rb"); else file= NULL; @@ -505,9 +506,9 @@ XkbRF_RulesPtr rules; sprintf(buf,"rules/%s",rules_name); } else { - if (strlen(XkbBaseDirectory)+strlen(rules_name)+8 > PATH_MAX) + if (snprintf(buf, PATH_MAX, "%s/rules/%s", XkbBaseDirectory, rules_name) + >= PATH_MAX) return False; - sprintf(buf,"%s/rules/%s",XkbBaseDirectory,rules_name); } if ((file= fopen(buf,"r"))==NULL) return False; diff --git a/nx-X11/programs/Xserver/xkb/maprules.c b/nx-X11/programs/Xserver/xkb/maprules.c index af6c112fe..6bc7e4022 100644 --- a/nx-X11/programs/Xserver/xkb/maprules.c +++ b/nx-X11/programs/Xserver/xkb/maprules.c @@ -953,9 +953,8 @@ Bool ok; if ((!base)||(!rules)) return False; if (locale) { - if (strlen(base)+strlen(locale)+2 > PATH_MAX) + if (snprintf(buf, PATH_MAX, "%s-%s", base, locale) >= PATH_MAX) return False; - sprintf(buf,"%s-%s", base, locale); } else { if (strlen(base)+1 > PATH_MAX) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 31c3d27ea3d2546beb267ed3cc083e040908e246 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 21 11:13:46 2019 +0200 xkmread.c: fix compiler warning xkmread.c: In function ‘XkmReadFileSectionName’: xkmread.c:1181:25: warning: ‘tmpTOC.type’ may be used uninitialized in this function [-Wmaybe-uninitialized] XkbConfigText(tmpTOC.type,XkbMessage),0); --- nx-X11/programs/Xserver/xkb/xkmread.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nx-X11/programs/Xserver/xkb/xkmread.c b/nx-X11/programs/Xserver/xkb/xkmread.c index c8b2a4591..b24c43e03 100644 --- a/nx-X11/programs/Xserver/xkb/xkmread.c +++ b/nx-X11/programs/Xserver/xkb/xkmread.c @@ -1177,8 +1177,12 @@ char name[100]; return Xstrdup(name); break; default: + /* tmpTOC is unitilaoized here, so we use the one from toc for now. _XkbLibError(_XkbErrBadImplementation, XkbConfigText(tmpTOC.type,XkbMessage),0); + */ + _XkbLibError(_XkbErrBadImplementation, + XkbConfigText(toc->type,XkbMessage),0); break; } return NULL; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 2070891cb85c5229dc81661ecf424df57134833a Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 21 10:45:57 2019 +0200 xkbEvents.c: Fix "warning: unused variable `s'". commit 2391c409a2840d61fed93832650c0d6c82ebebdf Author: Eamon Walsh <ewalsh@tycho.nsa.gov> Date: Fri Jun 13 22:48:17 2008 -0400 Fix "warning: unused variable `s'". --- nx-X11/programs/Xserver/xkb/xkbEvents.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/xkb/xkbEvents.c b/nx-X11/programs/Xserver/xkb/xkbEvents.c index 6e8df3490..791673753 100644 --- a/nx-X11/programs/Xserver/xkb/xkbEvents.c +++ b/nx-X11/programs/Xserver/xkb/xkbEvents.c @@ -866,14 +866,13 @@ XkbSrvInfoPtr xkbi; type= xE[i].u.u.type; if ((xkbDebugFlags&0x4)&& ((xE[0].u.u.type==KeyPress)||(xE[0].u.u.type==KeyRelease))) { - XkbStatePtr s= &xkbi->state; DebugF("XKbFilterWriteEvents (non-XKB):\n"); DebugF("event= 0x%04x\n",xE[0].u.keyButtonPointer.state); - DebugF("lookup= 0x%02x, grab= 0x%02x\n",s->lookup_mods, - s->grab_mods); + DebugF("lookup= 0x%02x, grab= 0x%02x\n",xkbi->state.lookup_mods, + xkbi->state.grab_mods); DebugF("compat lookup= 0x%02x, grab= 0x%02x\n", - s->compat_lookup_mods, - s->compat_grab_mods); + xkbi->state.compat_lookup_mods, + xkbi->state.compat_grab_mods); } if ( (type>=KeyPress)&&(type<=MotionNotify) ) { CARD16 old,new; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 5be6d271ba4f4c48d0441cf0ed3d8909a6ffd774 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 21 11:22:28 2019 +0200 xkb: fix what looks to be a copy-paste error with first vs firstMM commit 758393951233d1b2520cf4cefd33ec4288a3880a Author: Dave Airlie <airlied@redhat.com> Date: Wed Sep 12 11:09:40 2018 +1000 xkb: fix what looks to be a copy-paste error with first vs firstMM Pointed out by coverity. Signed-off-by: Dave Airlie <airlied@redhat.com> --- nx-X11/programs/Xserver/xkb/xkb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/xkb/xkb.c b/nx-X11/programs/Xserver/xkb/xkb.c index e6521c952..238b0897e 100644 --- a/nx-X11/programs/Xserver/xkb/xkb.c +++ b/nx-X11/programs/Xserver/xkb/xkb.c @@ -2363,7 +2363,7 @@ ProcXkbSetMap(ClientPtr client) else first= last= 0; if (change.map.num_modmap_keys>0) { firstMM= change.map.first_modmap_key; - lastMM= first+change.map.num_modmap_keys-1; + lastMM= firstMM + change.map.num_modmap_keys - 1; } else firstMM= lastMM= 0; if ((last>0) && (lastMM>0)) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 2bb498a4c767b7d12db84e59b77020bcd70a057c Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 21 11:38:39 2019 +0200 Keyboard.c: fix another cppcheck finding [Keyboard.c:559]: (error) Shifting signed 32-bit value by 31 bits is undefined behaviour --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 7330784de..8ff4528a1 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -555,8 +555,9 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl) for (int i = 1; i <= 32; i++) { + unsigned int mask = (unsigned int)1 << (i - 1); values.led = i; - values.led_mode = (ctrl->leds & (1 << (i - 1))) ? LedModeOn : LedModeOff; + values.led_mode = (ctrl->leds & mask) ? LedModeOn : LedModeOff; XChangeKeyboardControl(nxagentDisplay, value_mask, &values); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 813acdd2df24a8e3f44152d90a26f1beef11b38c Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 21 11:01:59 2019 +0200 xkb: Silence some compiler warnings commit 83913de25d35709b3ab7b0ab124b73924145d2dd Author: Adam Jackson <ajax@redhat.com> Date: Thu Apr 5 12:59:11 2018 -0400 xkb: Silence some compiler warnings Of the form: ../xkb/XKBGAlloc.c: In function ‘SrvXkbAddGeomKeyAlias’: ../xkb/XKBGAlloc.c:591:13: warning: ‘strncpy’ specified bound 4 equals destination size [-Wstringop-truncation] strncpy(alias->real, realStr, XkbKeyNameLength); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is intentional; the code that reads from these fields never reads more than 4 bytes anyway. Rephrase things in terms of memcpy so that's clear. Obviously this is awful but in XKB awful is par. Signed-off-by: Adam Jackson <ajax@redhat.com> Acked-by: Keith Packard <keithp@keithp.com> --- nx-X11/programs/Xserver/xkb/XKBGAlloc.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/xkb/XKBGAlloc.c b/nx-X11/programs/Xserver/xkb/XKBGAlloc.c index ac757232e..bfbd0c325 100644 --- a/nx-X11/programs/Xserver/xkb/XKBGAlloc.c +++ b/nx-X11/programs/Xserver/xkb/XKBGAlloc.c @@ -702,7 +702,8 @@ register XkbKeyAliasPtr alias; for (i=0,alias=geom->key_aliases;i<geom->num_key_aliases;i++,alias++) { if (strncmp(alias->alias,aliasStr,XkbKeyNameLength)==0) { bzero(alias->real,XkbKeyNameLength); - strncpy(alias->real,realStr,XkbKeyNameLength); + memcpy(alias->real, realStr, + min(XkbKeyNameLength, strlen(realStr))); return alias; } } @@ -712,8 +713,8 @@ register XkbKeyAliasPtr alias; } alias= &geom->key_aliases[geom->num_key_aliases]; bzero(alias,sizeof(XkbKeyAliasRec)); - strncpy(alias->alias,aliasStr,XkbKeyNameLength); - strncpy(alias->real,realStr,XkbKeyNameLength); + memcpy(alias->alias, aliasStr, min(XkbKeyNameLength, strlen(aliasStr))); + memcpy(alias->real, realStr, min(XkbKeyNameLength, strlen(realStr))); geom->num_key_aliases++; return alias; } @@ -930,8 +931,8 @@ Bool found; if ((row->num_keys>=row->sz_keys)&&(_XkbAllocOverlayKeys(row,1)!=Success)) return NULL; key= &row->keys[row->num_keys]; - strncpy(key->under.name,under,XkbKeyNameLength); - strncpy(key->over.name,over,XkbKeyNameLength); + memcpy(key->under.name, under, min(XkbKeyNameLength, strlen(under))); + memcpy(key->over.name, over, min(XkbKeyNameLength, strlen(over))); row->num_keys++; return key; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit c8a5e33fcdde322f486d6c69e7e16fa346793fc9 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 20 12:51:23 2019 +0200 Suppress false positives in static analysis there's more work to do... The whole nx-X11/extras dir is no longer checked since we only have Mesa there and we do not want to check that mess... All the exceptions in static-analysis-suppressions have been manually checked. --- run-static-analysis.sh | 4 ++-- static-analysis-suppressions | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/run-static-analysis.sh b/run-static-analysis.sh index 0524c469a..a9368973b 100755 --- a/run-static-analysis.sh +++ b/run-static-analysis.sh @@ -6,9 +6,9 @@ if [[ "${STATIC_ANALYSIS}" == "yes" ]]; then echo 'Error: cppcheck is not installed.' >&2 exit 1 fi - CPPCHECK_OPTS='--error-exitcode=0 --force --quiet' + CPPCHECK_OPTS='--error-exitcode=0 --force --quiet --suppressions-list=./static-analysis-suppressions' # we exclude some external projects - CPPCHECK_EXCLUDES='-i ./nx-X11/extras/Mesa* -i ./nx-X11/extras/Mesa_* -i nx-X11/programs/Xserver/GL/mesa*' + CPPCHECK_EXCLUDES='-i ./nx-X11/extras/ -i nx-X11/programs/Xserver/GL/mesa* -i ./.pc -i ./nx-X11/.build-exports -i ./nx-X11/exports -i ./doc' echo "$(cppcheck --version):"; cppcheck $CPPCHECK_OPTS $CPPCHECK_EXCLUDES .; fi diff --git a/static-analysis-suppressions b/static-analysis-suppressions new file mode 100644 index 000000000..ebd6156e9 --- /dev/null +++ b/static-analysis-suppressions @@ -0,0 +1,26 @@ +memleak:nx-X11/programs/Xserver/dix/gc.c +memleak:nx-X11/lib/include/xtrans/Xtrans.c:982 +memleak:nx-X11/lib/include/xtrans/Xtrans.c:987 +memleak:nx-X11/lib/include/xtrans/Xtrans.c:1004 +memleak:nx-X11/lib/include/xtrans/Xtrans.c:1009 +uninitvar:nx-X11/lib/include/xtrans/Xtranssock.c:1107 +uninitvar:nx-X11/lib/include/xtrans/Xtranssock.c:1109 +uninitvar:nx-X11/lib/include/xtrans/Xtranssock.c:1146 +uninitvar:nx-X11/lib/include/xtrans/Xtranssock.c:1148 +memleak:nx-X11/lib/include/xtrans/Xtranssock.c:2446 +memleak:nx-X11/lib/include/xtrans/Xtranssock.c:2458 +nullPointer:nx-X11/programs/Xserver/Xext/security.c +nullPointerArithmetic:nx-X11/programs/Xserver/randr/rrcrtc.c +nullPointerArithmetic:nx-X11/programs/Xserver/randr/rroutput.c +nullPointerArithmetic:nx-X11/programs/Xserver/randr/rrprovider.c +nullPointerArithmetic:nx-X11/programs/Xserver/randr/rrscreen.c +memleak:nx-X11/programs/Xserver/render/render.c:2929 +memleak:nx-X11/programs/Xserver/render/render.c:2991 +memleak:nx-X11/programs/Xserver/render/render.c:3049 +memleak:nx-X11/programs/Xserver/render/render.c:3103 +memleak:nx-X11/programs/Xserver/render/render.c:3157 +memleak:nx-X11/programs/Xserver/render/render.c:3288 +doubleFree:nx-X11/programs/Xserver/hw/nxagent/Keyboard.c:1699 +uninitStructMember:nx-X11/programs/Xserver/mi/miwideline.c:190 +invalidFree:nxcomp/src/EncodeBuffer.cpp:84 +invalidFree:nxcomp/src/EncodeBuffer.cpp:106 -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 364035c00258c17924174dac7921b5a8e68e6459 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 21 11:39:03 2019 +0200 Keyboard.c: use existing define instead of hardcoced value --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 8ff4528a1..4952c0197 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -553,7 +553,7 @@ void nxagentChangeKeyboardControl(DeviceIntPtr pDev, KeybdCtrl *ctrl) value_mask = KBLed | KBLedMode; - for (int i = 1; i <= 32; i++) + for (int i = 1; i <= XkbNumIndicators; i++) { unsigned int mask = (unsigned int)1 << (i - 1); values.led = i; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit b91b3d807d3e049358027d53ec5e4574e16850b3 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 21 12:04:23 2019 +0200 record/set.c: silence cpp finding [nx-X11/programs/Xserver/record/set.c:361]: (warning) Possible null pointer dereference: stackIntervals stackIntervals is only NULL if nIntervals is 0, too. In that case memcpy will do nothing and so it is ok to pass NULL as source. But it is ugly nevertheless... --- nx-X11/programs/Xserver/record/set.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/record/set.c b/nx-X11/programs/Xserver/record/set.c index c3085c54d..3086f9670 100644 --- a/nx-X11/programs/Xserver/record/set.c +++ b/nx-X11/programs/Xserver/record/set.c @@ -357,7 +357,8 @@ IntervalListCreateSet(RecordSetInterval *pIntervals, int nIntervals, if (!prls) goto bailout; prls->baseSet.ops = &IntervalListSetOperations; } - memcpy(&prls[1], stackIntervals, nIntervals * sizeof(RecordSetInterval)); + if (nIntervals > 0) + memcpy(&prls[1], stackIntervals, nIntervals * sizeof(RecordSetInterval)); prls->nIntervals = nIntervals; bailout: if (stackIntervals) free(stackIntervals); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 3aabc92cf81f20b89dc49e8db3c56ad9fa08481b Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Jun 22 16:03:06 2019 +0200 rework xkb device private handling We can only free the xkbDevicePrivate because we do not know the details of any other (possible) extension. So let's limit to that one private for now and call the new xkbFreePrivates from dix (where such a function is completely missing). --- nx-X11/programs/Xserver/dix/devices.c | 9 +++++++++ nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 8 -------- nx-X11/programs/Xserver/hw/nxagent/Pointer.c | 8 -------- nx-X11/programs/Xserver/xkb/xkbActions.c | 14 ++++++++++++++ 4 files changed, 23 insertions(+), 16 deletions(-) diff --git a/nx-X11/programs/Xserver/dix/devices.c b/nx-X11/programs/Xserver/dix/devices.c index 8ad1cc371..3dee81a25 100644 --- a/nx-X11/programs/Xserver/dix/devices.c +++ b/nx-X11/programs/Xserver/dix/devices.c @@ -73,6 +73,8 @@ SOFTWARE. #include "swaprep.h" #include "dixevents.h" +extern void XkbFreePrivates(DeviceIntPtr device); + DeviceIntPtr AddInputDevice(DeviceProc deviceProc, Bool autoStart) { @@ -275,6 +277,13 @@ CloseDevice(register DeviceIntPtr dev) #endif free(l); } + +#ifdef XKB + XkbFreePrivates(dev); +#endif + + free(dev->devPrivates); + free(dev->sync.event); free(dev); } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 4952c0197..6fbc66481 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1034,14 +1034,6 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio fprintf(stderr, "nxagentKeyboardProc: Called for [DEVICE_CLOSE].\n"); #endif - for (int i = 0; i < pDev->nPrivates; i++) - { - free(pDev->devPrivates[i].ptr); - pDev->devPrivates[i].ptr = NULL; - } - free(pDev->devPrivates); - pDev->devPrivates = NULL; - break; } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pointer.c b/nx-X11/programs/Xserver/hw/nxagent/Pointer.c index 85d286b96..d344f34b0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pointer.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pointer.c @@ -166,14 +166,6 @@ int nxagentPointerProc(DeviceIntPtr pDev, int onoff) fprintf(stderr, "nxagentPointerProc: Called for [DEVICE_CLOSE].\n"); #endif - for (int i = 0; i < pDev->nPrivates; i++) - { - free(pDev->devPrivates[i].ptr); - pDev->devPrivates[i].ptr = NULL; - } - free(pDev->devPrivates); - pDev->devPrivates = NULL; - break; } diff --git a/nx-X11/programs/Xserver/xkb/xkbActions.c b/nx-X11/programs/Xserver/xkb/xkbActions.c index 90bad93e0..a39e5c8f2 100644 --- a/nx-X11/programs/Xserver/xkb/xkbActions.c +++ b/nx-X11/programs/Xserver/xkb/xkbActions.c @@ -81,6 +81,20 @@ XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc) proc,xkbUnwrapProc); } +void +XkbFreePrivates(DeviceIntPtr device) +{ + if (device && + device->devPrivates && + device->nPrivates > 0 && + xkbDevicePrivateIndex != -1 && + xkbDevicePrivateIndex < device->nPrivates) + { + free(device->devPrivates[xkbDevicePrivateIndex].ptr); + device->devPrivates[xkbDevicePrivateIndex].ptr = NULL; + } +} + #ifdef XINPUT extern void ProcessOtherEvent( xEvent * /* xE */, -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit fba18967f4ccc48ad6ad2b1713a9508b48c25957 Author: Mario Trangoni <mjtrangoni@gmail.com> Date: Sat Jun 22 18:26:14 2019 +0200 TravisCI: move from gcc 8.x to gcc 9.x Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com> --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ef3f9fcc8..744a00758 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ matrix: sources: - ubuntu-toolchain-r-test packages: - - g++-8 + - g++-9 # imake - xutils-dev # X11 libaries @@ -56,7 +56,7 @@ matrix: - x11-xkb-utils env: - - MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" + - MATRIX_EVAL="CC=gcc-9 && CXX=g++-9" - STATIC_ANALYSIS="no" - os: linux -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 4a440feaf5c4ff7ac8d944a7a9832444fca924d3 Merge: abf374136 3aabc92cf Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sun Jun 23 21:39:51 2019 +0200 Merge branch 'uli42-pr/fix_xkb_privates' into 3.6.x Attributes GH PR #818: https://github.com/ArcticaProject/nx-libs/pull/818 nx-X11/programs/Xserver/dix/devices.c | 9 +++++++++ nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 8 -------- nx-X11/programs/Xserver/hw/nxagent/Pointer.c | 8 -------- nx-X11/programs/Xserver/xkb/xkbActions.c | 14 ++++++++++++++ 4 files changed, 23 insertions(+), 16 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit abf3741362f4c200945db6403fcd54df6754d4af Merge: c0754a357 c8a5e33fc Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Jun 22 11:32:42 2019 +0200 Merge branch 'uli42-pr/various' into 3.6.x Attributes GH PR #815: https://github.com/ArcticaProject/nx-libs/pull/815 nx-X11/lib/src/Quarks.c | 2 +- nx-X11/programs/Xserver/GL/glx/glxext.c | 4 +- nx-X11/programs/Xserver/Xi/chgkbd.c | 2 - nx-X11/programs/Xserver/dix/devices.c | 13 +-- nx-X11/programs/Xserver/dix/dispatch.c | 3 + nx-X11/programs/Xserver/dix/events.c | 25 ++---- nx-X11/programs/Xserver/fb/fboverlay.c | 8 +- nx-X11/programs/Xserver/hw/nxagent/Events.c | 56 ++++++------ nx-X11/programs/Xserver/hw/nxagent/Extensions.c | 11 +-- nx-X11/programs/Xserver/hw/nxagent/Font.c | 78 ++++++---------- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 43 ++++++--- nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/NXevents.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/NXglyph.c | 69 ++++++++++++-- nx-X11/programs/Xserver/hw/nxagent/NXpicture.c | 22 ++--- nx-X11/programs/Xserver/hw/nxagent/NXrender.c | 6 +- nx-X11/programs/Xserver/hw/nxagent/NXshm.c | 6 +- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 22 ++--- nx-X11/programs/Xserver/hw/nxagent/Pointer.c | 11 ++- nx-X11/programs/Xserver/hw/nxagent/Rootless.c | 110 ++++++++++------------- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 64 ++++++++----- nx-X11/programs/Xserver/hw/nxagent/Window.c | 66 ++++++-------- nx-X11/programs/Xserver/hw/nxagent/Windows.h | 3 - nx-X11/programs/Xserver/hw/nxagent/compext/Png.c | 82 +++++++---------- nx-X11/programs/Xserver/include/globals.h | 1 - nx-X11/programs/Xserver/mi/micursor.c | 12 +-- nx-X11/programs/Xserver/mi/miexpose.c | 5 +- nx-X11/programs/Xserver/mi/migc.c | 6 +- nx-X11/programs/Xserver/mi/miinitext.c | 5 +- nx-X11/programs/Xserver/mi/miwindow.c | 1 + nx-X11/programs/Xserver/os/access.c | 1 + nx-X11/programs/Xserver/os/utils.c | 2 - nx-X11/programs/Xserver/record/set.c | 3 +- nx-X11/programs/Xserver/render/glyph.c | 2 + nx-X11/programs/Xserver/render/picture.c | 2 + nx-X11/programs/Xserver/xkb/XKBGAlloc.c | 19 ++-- nx-X11/programs/Xserver/xkb/XKBMAlloc.c | 4 +- nx-X11/programs/Xserver/xkb/XKBMisc.c | 5 +- nx-X11/programs/Xserver/xkb/ddxBeep.c | 4 - nx-X11/programs/Xserver/xkb/ddxCtrls.c | 23 ----- nx-X11/programs/Xserver/xkb/ddxList.c | 13 +-- nx-X11/programs/Xserver/xkb/ddxLoad.c | 101 +++++---------------- nx-X11/programs/Xserver/xkb/maprules.c | 89 +++++++----------- nx-X11/programs/Xserver/xkb/xkb.c | 4 +- nx-X11/programs/Xserver/xkb/xkbAccessX.c | 8 +- nx-X11/programs/Xserver/xkb/xkbActions.c | 6 +- nx-X11/programs/Xserver/xkb/xkbEvents.c | 37 +++----- nx-X11/programs/Xserver/xkb/xkbInit.c | 17 +--- nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c | 4 +- nx-X11/programs/Xserver/xkb/xkbUtils.c | 12 +-- nx-X11/programs/Xserver/xkb/xkmread.c | 20 ++--- run-static-analysis.sh | 4 +- static-analysis-suppressions | 26 ++++++ 54 files changed, 505 insertions(+), 647 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 5858ebc6da54fe24ba6dab61f1478c812bfa6fb2 Merge: 4a440feaf 1ffe92a6f Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sun Jun 23 22:21:24 2019 +0200 Merge branch 'mjtrangoni-add-gcc-9' into 3.6.x Attributes GH PR #820: https://github.com/ArcticaProject/nx-libs/pull/820 .travis.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit ca54fabed8e0f531b9a22691d8db1c323475107a Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jun 26 18:49:13 2019 +0200 Window.c: add some comments about fullscreen handling --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 78a5081f0..ec62bdd9d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -831,6 +831,11 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) } w = nxagentDefaultWindows[pScreen -> myNum]; + + /* + * override_redirect makes the window manager ignore the window and + * not add decorations, see ICCCM) + */ attributes.override_redirect = switchOn; valuemask = CWOverrideRedirect; XUnmapWindow(nxagentDisplay, w); @@ -1003,6 +1008,13 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) } } + /* + * FIXME: These are 0 most of the time nowadays. The effect is, + * that the window is moving a bit to right/bottom every time + * fullscreen mode is left. To fix this query the frame extents + * from the window manager via _NET_REQUEST_FRAME_EXTENTS + */ + if (nxagentOption(WMBorderWidth) > 0 && nxagentOption(WMTitleHeight) > 0) { nxagentChangeOption(X, nxagentOption(SavedX) - nxagentOption(WMBorderWidth)); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit c190fd1871d00168e2db6df9b91e8bc1ef69fbf5 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jun 26 18:49:36 2019 +0200 Window.c: rearrange code regarding window decorations sizes --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index ec62bdd9d..3e27ae566 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -1015,14 +1015,21 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) * from the window manager via _NET_REQUEST_FRAME_EXTENTS */ - if (nxagentOption(WMBorderWidth) > 0 && nxagentOption(WMTitleHeight) > 0) + if (nxagentOption(WMBorderWidth) > 0) { nxagentChangeOption(X, nxagentOption(SavedX) - nxagentOption(WMBorderWidth)); - nxagentChangeOption(Y, nxagentOption(SavedY) - nxagentOption(WMTitleHeight)); } else { nxagentChangeOption(X, nxagentOption(SavedX)); + } + + if (nxagentOption(WMTitleHeight) > 0) + { + nxagentChangeOption(Y, nxagentOption(SavedY) - nxagentOption(WMTitleHeight)); + } + else + { nxagentChangeOption(Y, nxagentOption(SavedY)); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit d32706888f83b91d6feab93067d1207c507335fa Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jun 26 18:50:44 2019 +0200 Screen.c: add nxagentIsParentOf helper --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 6ec4b245f..4e466b502 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -297,6 +297,28 @@ void nxagentSetPixmapFormats(ScreenInfo *screenInfo) } } +/* check if possible_parent is parent of candidate */ +Bool nxagentIsParentOf(Display *d, Window possible_parent, Window candidate) +{ + Window parent, root, *children = NULL; + unsigned int num_children; + + if (XQueryTree(d, candidate, &root, &parent, &children, &num_children)) + { + if (children) + XFree((char *)children); + + #ifdef TEST + fprintf(stderr, "%s: parent of full screen window [%p] root [%p] possible_parent [%p] candidate [%p]\n", __func__, parent, root, possible_parent, candidate); + #endif + return (parent == possible_parent); + } + else + { + return False; + } +} + void nxagentMinimizeFromFullScreen(ScreenPtr pScreen) { XUnmapWindow(nxagentDisplay, nxagentFullscreenWindow); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6657b8cc8c8702527c9e66aaf7d999fe9240f5c3 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Jun 26 19:04:41 2019 +0200 nxagentMaximizeToFullScreen: only reparent if necessary This fixes problems with kwin and compiz when using the switch-all-screens keystroke. The fullscreen would appear shortly and then vanish again. Fixes ArcticaProject/nx-libs#458 --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 77 +++++++++++++++++++++-------- 1 file changed, 56 insertions(+), 21 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 4e466b502..ebc5d6ce9 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -336,6 +336,14 @@ void nxagentMinimizeFromFullScreen(ScreenPtr pScreen) } } +/* + * This is the opposite function to nxagentMinimizeFromFullscreen. It + * will map the fullscreen window and unmap the icon window. It is + * only called if fullscreen mode was active when the minimize + * keystroke was pressed. + * Some window managers tend to do 'interesting' things with the + * icon window, which we try to counterfeit here. + */ void nxagentMaximizeToFullScreen(ScreenPtr pScreen) { if (nxagentIpaq) @@ -349,36 +357,51 @@ void nxagentMaximizeToFullScreen(ScreenPtr pScreen) /* XUnmapWindow(nxagentDisplay, nxagentIconWindow); */ + + Window root = RootWindow(nxagentDisplay, DefaultScreen(nxagentDisplay)); + /* -FIXME: We'll check for ReparentNotify and LeaveNotify events after XReparentWindow() - in order to avoid the session window is iconified. - We could avoid the session window is iconified when a LeaveNotify event is received, - so this check would be unnecessary. +FIXME: We'll check for ReparentNotify and LeaveNotify events after + XReparentWindow() in order to avoid the session window being + iconified. We could avoid the session window being iconified + when a LeaveNotify event is received, so this check would be + unnecessary. */ - struct timeval timeout; - int i; - XEvent e; - XReparentWindow(nxagentDisplay, nxagentFullscreenWindow, - RootWindow(nxagentDisplay, DefaultScreen(nxagentDisplay)), 0, 0); + /* only reparent if necessary. FIXME: also check if the desired coordinates match */ - for (i = 0; i < 100 && nxagentWMIsRunning; i++) + if (!nxagentIsParentOf(nxagentDisplay, root, nxagentFullscreenWindow)) { - #ifdef TEST - fprintf(stderr, "nxagentMaximizeToFullscreen: WARNING! Going to wait for the ReparentNotify event.\n"); - #endif + XReparentWindow(nxagentDisplay, nxagentFullscreenWindow, + root, 0, 0); - if (XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, ReparentNotify, &e)) + for (int i = 0; i < 100 && nxagentWMIsRunning; i++) { - break; - } + struct timeval timeout; + XEvent e; + + #ifdef TEST + fprintf(stderr, "nxagentMaximizeToFullscreen: WARNING! Going to wait for the ReparentNotify event [%d].\n", i); + #endif - XSync(nxagentDisplay, 0); + if (XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, ReparentNotify, &e)) + { + break; + } - timeout.tv_sec = 0; - timeout.tv_usec = 50 * 1000; + XSync(nxagentDisplay, 0); - nxagentWaitEvents(nxagentDisplay, &timeout); + timeout.tv_sec = 0; + timeout.tv_usec = 50 * 1000; + + nxagentWaitEvents(nxagentDisplay, &timeout); + } + } + else + { + #ifdef TEST + fprintf(stderr, "%s: FullscreenWindow already is child of root window - skipping reparenting,\n", __func__); + #endif } XMapRaised(nxagentDisplay, nxagentFullscreenWindow); @@ -386,7 +409,19 @@ FIXME: We'll check for ReparentNotify and LeaveNotify events after XReparentWind XIconifyWindow(nxagentDisplay, nxagentIconWindow, DefaultScreen(nxagentDisplay)); - while (XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, LeaveNotify, &e)); + /* swallow all LeaveNotify events for the FullscreenWindow; + Normally this does not swallow anything these days, but when + using fvwm you see one of these events here. */ + while (1) + { + XEvent e; + if (!XCheckTypedWindowEvent(nxagentDisplay, nxagentFullscreenWindow, LeaveNotify, &e)) + break; + #ifdef TEST + fprintf(stderr, "%d: swallowing LeaveNotify event\m", __func__); + #endif + } + /* XMapWindow(nxagentDisplay, nxagentIconWindow); */ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 1ffe92a6ff947713e5937fd272bf4f7b09a88ae5 Author: Mario Trangoni <mjtrangoni@gmail.com> Date: Sat Jun 22 18:44:25 2019 +0200 TravisCI: Print compiler version currently used Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com> --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 744a00758..687042e57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -117,5 +117,7 @@ before_install: script: # run static analysis tools - ./run-static-analysis.sh + # print compiler version + - ${CC} --version # build all packages - make -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 1ebf7851994b3312d63bcf9e8f4f137128169261 Merge: 5858ebc6d 032ed3511 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Jun 27 21:03:03 2019 +0200 Merge branch 'uli42-pr/fix_fullscreen' into 3.6.x Attributes GH PR #821: https://github.com/ArcticaProject/nx-libs/pull/821 nx-X11/programs/Xserver/hw/nxagent/Screen.c | 116 +++++++++++++++++++++------- nx-X11/programs/Xserver/hw/nxagent/Window.c | 25 +++++- 2 files changed, 110 insertions(+), 31 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 032ed3511bd6d2ef78c75e9296586ad5d469c0f1 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 27 20:38:10 2019 +0200 Screen.c: use XlibWindow so silence the compiler This is a bit weird, I'd expect far more places where the compiler could complain about Window vs Window64... But it does not. Screen.c:306:32: warning: passing argument 3 of ‘XQueryTree’ from incompatible pointer type [-Wincompatible-pointer-types] if (XQueryTree(d, candidate, &root, &parent, &children, &num_children)) ^~~~~ In file included from Screen.c:60: Agent.h:85:25: note: expected ‘Window64 *’ {aka ‘long unsigned int *’} but argument is of type ‘Window *’ {aka ‘unsigned int *’} #define Window Window64 ../../../../exports/include/nx-X11/Xlib.h:3041:5: note: in expansion of macro ‘Window’ Window* /* root_return */, --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 111fd96d4..44c89e03f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -298,9 +298,9 @@ void nxagentSetPixmapFormats(ScreenInfo *screenInfo) } /* check if possible_parent is parent of candidate */ -Bool nxagentIsParentOf(Display *d, Window possible_parent, Window candidate) +Bool nxagentIsParentOf(Display *d, XlibWindow possible_parent, XlibWindow candidate) { - Window parent, root, *children = NULL; + XlibWindow parent, root, *children = NULL; unsigned int num_children; if (XQueryTree(d, candidate, &root, &parent, &children, &num_children)) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit ea571387b2bed7738eb686a806b1416f239b556b Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 27 19:51:03 2019 +0200 Screen.c: simplify nxagentMinimizeFromFullscreen --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index ebc5d6ce9..54aa8f4e0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -319,6 +319,13 @@ Bool nxagentIsParentOf(Display *d, Window possible_parent, Window candidate) } } +/* + * Pressing the minimize keystroke while in fullscreen mode will call + * this function. It will unmap the fullscreen window and iconify the + * previously created icon window immediately. The window manager may + * decide how to show an iconified window. kwin e.g. shows it in the + * task bar. + */ void nxagentMinimizeFromFullScreen(ScreenPtr pScreen) { XUnmapWindow(nxagentDisplay, nxagentFullscreenWindow); @@ -326,14 +333,10 @@ void nxagentMinimizeFromFullScreen(ScreenPtr pScreen) if (nxagentIpaq) { XMapWindow(nxagentDisplay, nxagentIconWindow); - XIconifyWindow(nxagentDisplay, nxagentIconWindow, - DefaultScreen(nxagentDisplay)); } - else - { - XIconifyWindow(nxagentDisplay, nxagentIconWindow, + + XIconifyWindow(nxagentDisplay, nxagentIconWindow, DefaultScreen(nxagentDisplay)); - } } /* -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit d487d5879d10211c5aa536b84073cdf9c64c2fed Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 27 20:15:15 2019 +0200 Consistently use None instead of 0 for nxagentIconWindow everywhere --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Window.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 54aa8f4e0..111fd96d4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -2042,7 +2042,7 @@ N/A } else { - nxagentIconWindow = 0; + nxagentIconWindow = None; } /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 3e27ae566..0e5def294 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -2654,7 +2654,7 @@ void nxagentMapDefaultWindows(void) * Map the icon window. */ - if (nxagentIconWindow != 0) + if (nxagentIconWindow != None) { #ifdef TEST fprintf(stderr, "nxagentMapDefaultWindows: Mapping icon window id [%ld].\n", -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6bdf9c2faea6d245882db55174dffe5888659d35 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 27 21:44:31 2019 +0200 Drop Ipaq support Did we ever provide a binary? --- nx-X11/programs/Xserver/hw/nxagent/Args.c | 9 ------- nx-X11/programs/Xserver/hw/nxagent/Args.h | 1 - nx-X11/programs/Xserver/hw/nxagent/Events.c | 5 ---- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 8 ------ nx-X11/programs/Xserver/hw/nxagent/Screen.c | 37 ++++---------------------- nx-X11/programs/Xserver/hw/nxagent/Window.c | 6 ----- 6 files changed, 5 insertions(+), 61 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 607dab9bf..161403cd0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -153,7 +153,6 @@ Bool nxagentReportWindowIds = False; Bool nxagentReportPrivateWindowIds = False; Bool nxagentDoDirectColormaps = False; Window nxagentParentWindow = 0; -Bool nxagentIpaq = False; int nxagentLockDeferLevel = 0; @@ -618,14 +617,6 @@ int ddxProcessArgument(int argc, char *argv[], int i) nxagentChangeOption(AllScreens, True); } - else if (!strcmp(argv[i],"ipaq")) - { - nxagentChangeOption(Fullscreen, True); - - nxagentChangeOption(AllScreens, True); - - nxagentIpaq = True; - } else { if (nxagentUserGeometry.flag == 0) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.h b/nx-X11/programs/Xserver/hw/nxagent/Args.h index 8d6f29b06..c8f8907c3 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.h @@ -82,7 +82,6 @@ extern Bool nxagentDoDirectColormaps; extern Window nxagentParentWindow; extern int nxagentMaxAllowedReset; extern Bool nxagentResizeDesktopAtStartup; -extern Bool nxagentIpaq; extern int nxagentLockDeferLevel; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 9d9f5d204..ded6bd836 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -1214,11 +1214,6 @@ FIXME: Don't enqueue the KeyRelease event if the key was } } - if (nxagentIpaq && nxagentClients <= 0) - { - closeSession = TRUE; - } - if (nxagentOption(DesktopResize) == False && (X.xbutton.state & (ControlMask | Mod1Mask)) == (ControlMask | Mod1Mask)) { diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index 3e02d318d..662da6b04 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -44,7 +44,6 @@ #include <libxml/tree.h> extern Bool nxagentWMIsRunning; -extern Bool nxagentIpaq; extern char *nxagentKeystrokeFile; #ifdef NX_DEBUG_INPUT @@ -507,13 +506,6 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) * here. */ - if (X -> keycode == 130 && nxagentIpaq) - { - *result = doStartKbd; - - return True; - } - switch (stroke) { #ifdef DEBUG_TREE case KEYSTROKE_DEBUG_TREE: diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 44c89e03f..d1dc37dc2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -135,7 +135,6 @@ void nxagentFbRestoreArea(PixmapPtr pPixmap, WindowPtr pWin, int xSrc, int ySrc, #include "unistd.h" #endif -extern Bool nxagentIpaq; extern Pixmap nxagentIconPixmap; extern Pixmap nxagentIconShape; extern Bool useXpmIcon; @@ -329,12 +328,6 @@ Bool nxagentIsParentOf(Display *d, XlibWindow possible_parent, XlibWindow candid void nxagentMinimizeFromFullScreen(ScreenPtr pScreen) { XUnmapWindow(nxagentDisplay, nxagentFullscreenWindow); - - if (nxagentIpaq) - { - XMapWindow(nxagentDisplay, nxagentIconWindow); - } - XIconifyWindow(nxagentDisplay, nxagentIconWindow, DefaultScreen(nxagentDisplay)); } @@ -349,16 +342,8 @@ void nxagentMinimizeFromFullScreen(ScreenPtr pScreen) */ void nxagentMaximizeToFullScreen(ScreenPtr pScreen) { - if (nxagentIpaq) - { - XUnmapWindow(nxagentDisplay, nxagentIconWindow); - - XMapWindow(nxagentDisplay, nxagentFullscreenWindow); - } - else - { /* - XUnmapWindow(nxagentDisplay, nxagentIconWindow); + XUnmapWindow(nxagentDisplay, nxagentIconWindow); */ Window root = RootWindow(nxagentDisplay, DefaultScreen(nxagentDisplay)); @@ -407,10 +392,10 @@ FIXME: We'll check for ReparentNotify and LeaveNotify events after #endif } - XMapRaised(nxagentDisplay, nxagentFullscreenWindow); + XMapRaised(nxagentDisplay, nxagentFullscreenWindow); - XIconifyWindow(nxagentDisplay, nxagentIconWindow, - DefaultScreen(nxagentDisplay)); + XIconifyWindow(nxagentDisplay, nxagentIconWindow, + DefaultScreen(nxagentDisplay)); /* swallow all LeaveNotify events for the FullscreenWindow; Normally this does not swallow anything these days, but when @@ -426,9 +411,8 @@ FIXME: We'll check for ReparentNotify and LeaveNotify events after } /* - XMapWindow(nxagentDisplay, nxagentIconWindow); + XMapWindow(nxagentDisplay, nxagentIconWindow); */ - } } Window nxagentCreateIconWindow(void) @@ -1922,17 +1906,6 @@ N/A { nxagentFullscreenWindow = nxagentDefaultWindows[pScreen->myNum]; } - - if (nxagentIpaq) - { - XWindowChanges ch; - unsigned int ch_mask; - - ch.stack_mode = Below; - ch_mask = CWStackMode; - - XConfigureWindow(nxagentDisplay, nxagentFullscreenWindow, ch_mask, &ch); - } } if (nxagentOption(Fullscreen)) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 0e5def294..7d390872e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -2662,12 +2662,6 @@ void nxagentMapDefaultWindows(void) #endif XMapWindow(nxagentDisplay, nxagentIconWindow); - - if (nxagentIpaq != 0) - { - XIconifyWindow(nxagentDisplay, nxagentIconWindow, - DefaultScreen(nxagentDisplay)); - } } /* -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit c2ca013fbc3d8ea032e90a52cd83b3b092c7fa81 Merge: 1ebf78519 738686685 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Thu Jun 27 22:48:09 2019 +0200 Merge branch 'uli42-pr/drop_ipaq' into 3.6.x Attributes GH PR #822: https://github.com/ArcticaProject/nx-libs/pull/822 nx-X11/programs/Xserver/hw/nxagent/Args.c | 9 --- nx-X11/programs/Xserver/hw/nxagent/Args.h | 1 - nx-X11/programs/Xserver/hw/nxagent/Events.c | 80 +------------------------- nx-X11/programs/Xserver/hw/nxagent/Events.h | 1 - nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 8 --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 37 ++---------- nx-X11/programs/Xserver/hw/nxagent/Window.c | 6 -- 7 files changed, 6 insertions(+), 136 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 738686685d5da2602f2a4bb9e3b9dc37bb2dc828 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 27 21:50:53 2019 +0200 drop onscreen keyboard support With the removal of the Ipaq code there's no path anymore to open the onscreen keyboard. Also nxkbd is not available and we do not have tested that feature with any onscreen keyboard yet. So there's no point in integrating that code. Fixes ArcticaProject/nx-libs#405 --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 75 +---------------------------- nx-X11/programs/Xserver/hw/nxagent/Events.h | 1 - 2 files changed, 1 insertion(+), 75 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index ded6bd836..d8bf4df60 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -804,7 +804,6 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) ScreenPtr pScreen = NULL; Bool minimize = False; - Bool startKbd = False; Bool closeSession = False; Bool switchFullscreen = False; Bool switchAllScreens = False; @@ -941,7 +940,7 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) viewportLastKeyPressResult = result; } - if (result != doNothing && result != doStartKbd) + if (result != doNothing) { pScreen = nxagentScreen(X.xkey.window); } @@ -980,12 +979,6 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) break; } - case doStartKbd: - { - startKbd = TRUE; - - break; - } case doSwitchFullscreen: { switchFullscreen = TRUE; @@ -2171,72 +2164,6 @@ FIXME: Don't enqueue the KeyRelease event if the key was } } - if (startKbd) - { - if (xkbdRunning) - { - #ifdef NXAGENT_XKBD_DEBUG - fprintf(stderr, "Events: nxkbd now is NOT running: %d, %d\n", - X.xkey.keycode, escapecode); - #endif - - xkbdRunning = False; - - kill(pidkbd, 9); - } - else - { - char kbddisplay[6]; - char *kbdargs[6]; - - strcpy(kbddisplay,":"); - /* FIXME: why limit to 4? */ - strncat(kbddisplay, display, 4); - - kbdargs[0] = "nxkbd"; - kbdargs[1] = "-geometry"; - kbdargs[2] = "240x70+0+250"; - kbdargs[3] = "-display"; - kbdargs[4] = kbddisplay; - kbdargs[5] = NULL; - - switch (pidkbd = fork()) - { - case 0: - { - execvp(kbdargs[0], kbdargs); - - #ifdef NXAGENT_XKBD_DEBUG - fprintf(stderr, "Events: The execvp of nxkbd process failed.\n"); - #endif - - exit(1); - - break; - } - case -1: - { - #ifdef NXAGENT_XKBD_DEBUG - fprintf(stderr, "Events: Can't fork to run the nxkbd process.\n"); - #endif - - break; - } - default: - { - break; - } - } - - #ifdef NXAGENT_XKBD_DEBUG - fprintf(stderr, "Events: The nxkbd process now running with [%d][%d].\n", - X.xkey.keycode, escapecode); - #endif - - xkbdRunning = True; - } - } - #ifdef BLOCKS fprintf(stderr, "[End read]\n"); #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h index c0eb8780b..5df0e1f05 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h @@ -39,7 +39,6 @@ enum HandleEventResult doMinimize, doDebugTree, doCloseSession, - doStartKbd, doSwitchFullscreen, doSwitchAllScreens, doViewportMoveUp, -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 360cb5dd9c307be05dfeee93b5303e257b389f1c Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Aug 5 18:32:16 2019 +0200 release 3.5.99.21 --- ChangeLog | 551 ++++++++++++++++++++++- VERSION | 2 +- debian/changelog | 7 + nx-X11/extras/Mesa_6.4.2/progs/images/bw.rgb | Bin 206452 -> 206452 bytes nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 2 +- nx-libs.spec | 2 +- nxdialog/bin/nxdialog | 4 +- nxdialog/man/nxdialog.1 | 2 +- nxproxy/man/nxproxy.1 | 2 +- 9 files changed, 563 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9b13b83b..bab87ec6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,553 @@ -2019-04-17 11:04:51 +0200 Mike Gabriel (f1f744a41) +2019-08-05 18:32:16 +0200 Mike Gabriel (0166fc3a3) - * release 3.5.99.20 (HEAD -> 3.6.x, tag: 3.5.99.20) + * release 3.5.99.21 (HEAD -> 3.6.x, tag: 3.5.99.21) + +2019-06-27 22:48:09 +0200 Mike Gabriel (c2ca013fb) + + * Merge branch 'uli42-pr/drop_ipaq' into 3.6.x + +2019-06-27 21:50:53 +0200 Ulrich Sibiller (738686685) + + * drop onscreen keyboard support + +2019-06-27 21:44:31 +0200 Ulrich Sibiller (6bdf9c2fa) + + * Drop Ipaq support + +2019-06-27 21:03:03 +0200 Mike Gabriel (1ebf78519) + + * Merge branch 'uli42-pr/fix_fullscreen' into 3.6.x + +2019-06-27 20:38:10 +0200 Ulrich Sibiller (032ed3511) + + * Screen.c: use XlibWindow so silence the compiler + +2019-06-27 20:15:15 +0200 Ulrich Sibiller (d487d5879) + + * Consistently use None instead of 0 for nxagentIconWindow everywhere + +2019-06-27 19:51:03 +0200 Ulrich Sibiller (ea571387b) + + * Screen.c: simplify nxagentMinimizeFromFullscreen + +2019-06-26 19:04:41 +0200 Ulrich Sibiller (6657b8cc8) + + * nxagentMaximizeToFullScreen: only reparent if necessary + +2019-06-26 18:50:44 +0200 Ulrich Sibiller (d32706888) + + * Screen.c: add nxagentIsParentOf helper + +2019-06-26 18:49:36 +0200 Ulrich Sibiller (c190fd187) + + * Window.c: rearrange code regarding window decorations sizes + +2019-06-26 18:49:13 +0200 Ulrich Sibiller (ca54fabed) + + * Window.c: add some comments about fullscreen handling + +2019-06-23 22:21:24 +0200 Mike Gabriel (5858ebc6d) + + * Merge branch 'mjtrangoni-add-gcc-9' into 3.6.x + +2019-06-22 18:44:25 +0200 Mario Trangoni (1ffe92a6f) + + * TravisCI: Print compiler version currently used + +2019-06-22 18:26:14 +0200 Mario Trangoni (fba18967f) + + * TravisCI: move from gcc 8.x to gcc 9.x + +2019-06-23 21:39:51 +0200 Mike Gabriel (4a440feaf) + + * Merge branch 'uli42-pr/fix_xkb_privates' into 3.6.x + +2019-06-22 16:03:06 +0200 Ulrich Sibiller (3aabc92cf) + + * rework xkb device private handling + +2019-06-22 11:32:42 +0200 Mike Gabriel (abf374136) + + * Merge branch 'uli42-pr/various' into 3.6.x + +2019-06-20 12:51:23 +0200 Ulrich Sibiller (c8a5e33fc) + + * Suppress false positives in static analysis + +2019-06-21 12:04:23 +0200 Ulrich Sibiller (b91b3d807) + + * record/set.c: silence cpp finding + +2019-06-21 11:39:03 +0200 Ulrich Sibiller (364035c00) + + * Keyboard.c: use existing define instead of hardcoced value + +2019-06-21 11:38:39 +0200 Ulrich Sibiller (2bb498a4c) + + * Keyboard.c: fix another cppcheck finding + +2019-06-21 11:22:28 +0200 Ulrich Sibiller (5be6d271b) + + * xkb: fix what looks to be a copy-paste error with first vs firstMM + +2019-06-21 11:13:46 +0200 Ulrich Sibiller (31c3d27ea) + + * xkmread.c: fix compiler warning + +2019-06-21 11:01:59 +0200 Ulrich Sibiller (813acdd2d) + + * xkb: Silence some compiler warnings + +2019-06-21 10:57:09 +0200 Ulrich Sibiller (054e906f6) + + * xkb: Use snprintf to measure string lengths instead of manual + strlen math + +2019-06-21 10:45:57 +0200 Ulrich Sibiller (2070891cb) + + * xkbEvents.c: Fix "warning: unused variable `s'". + +2019-06-21 10:41:36 +0200 Ulrich Sibiller (4962c5a8d) + + * XKB: Remove a bunch of mad ifdefs + +2019-06-21 10:10:21 +0200 Ulrich Sibiller (56dcc8a4b) + + * xkb: remove oldState from XkbHandleActions. + +2019-06-20 23:14:09 +0200 Ulrich Sibiller (c8520ac0a) + + * mi/miexpose.c: add missing free() + +2019-06-20 19:54:44 +0200 Ulrich Sibiller (956caeb8a) + + * compext/Png.c: Nullify after free + +2019-06-20 19:53:39 +0200 Ulrich Sibiller (e440e722d) + + * compext/Png.c: simplify srcBuf allocation + +2019-06-20 19:51:00 +0200 Ulrich Sibiller (d48824195) + + * compext/Png.c: late image_index allocation + +2019-06-20 19:14:10 +0200 Ulrich Sibiller (b4d3dc5bf) + + * NXdixfonts.c: fix index out of bounds + +2019-06-20 18:52:31 +0200 Ulrich Sibiller (fd7e1f989) + + * Keyboard.c: rearrange code to make cppcheck happy + +2019-06-20 01:35:22 +0200 Ulrich Sibiller (3c0469971) + + * os/access.c: add missing } + +2019-06-20 01:31:17 +0200 Ulrich Sibiller (528e1e4ef) + + * NXpicture.c: code simplification + +2019-06-20 01:29:21 +0200 Ulrich Sibiller (bb08043a6) + + * Screen.c: fix two more memleaks of visuals + +2019-06-20 01:21:44 +0200 Ulrich Sibiller (213e63eed) + + * Screen.c: fix two memleaks + +2019-06-20 00:59:16 +0200 Ulrich Sibiller (e63d9de45) + + * NXrender: fix another memleak + +2019-06-20 00:51:32 +0200 Ulrich Sibiller (78eff73e4) + + * render: Propagate allocation failure from createSourcePicture() + +2019-06-20 00:42:01 +0200 Ulrich Sibiller (9f9b790f8) + + * fb: fix memory leak in fbOverlayFinishScreenInit + +2019-06-20 00:26:47 +0200 Ulrich Sibiller (f55402572) + + * dix/dispatch: fix a small memory leak + +2019-06-20 00:13:25 +0200 Ulrich Sibiller (6f954bb7d) + + * Quarks.c: add missing ) + +2019-06-19 23:44:40 +0200 Ulrich Sibiller (6da106610) + + * Keyboard.c: fix three memory leaks + +2019-06-19 23:10:40 +0200 Ulrich Sibiller (234be0245) + + * glyph.c: fix a read beyond end of heap buffer + +2019-06-19 01:12:26 +0200 Ulrich Sibiller (8205db425) + + * Font.c: code simplifications + +2019-05-25 19:38:14 +0200 Ulrich Sibiller (cb508b263) + + * various scope improvements + +2019-06-18 23:36:45 +0200 Ulrich Sibiller (bffdacc48) + + * glxext.c: fix another memory leak + +2019-06-18 19:10:38 +0200 Ulrich Sibiller (b5eb7c76e) + + * Screen.c: more debug output + +2019-06-18 19:04:12 +0200 Ulrich Sibiller (7e12c9ba5) + + * Extension.c: code simplifications + +2019-06-17 21:57:45 +0200 Ulrich Sibiller (17d5e62ba) + + * Events.c: use designated initializer in + nxagentDeactivatePointerGrab + +2019-06-18 18:57:17 +0200 Ulrich Sibiller (5cb497146) + + * mi/miinitext.c: fix memleaks: remove (double) glx initialization + +2019-06-17 23:37:51 +0200 Ulrich Sibiller (756442226) + + * Screen.c: fix another memory leak + +2019-06-17 20:25:09 +0200 Ulrich Sibiller (4dd1f3cbd) + + * Fix memleaks: Free devPrivates of devices on shutdown + +2019-06-17 18:15:05 +0200 Ulrich Sibiller (ca741177e) + + * CloseDevice: call XkbRemoveResourceClient before freeing key class + struct + +2019-06-17 17:31:32 +0200 Ulrich Sibiller (340de78e2) + + * Keyboard.c: nullify freed pointers + +2019-06-17 16:06:02 +0200 Ulrich Sibiller (3b06ad51d) + + * Screen.c: Fix: make sure RRCloseScreen is being called + +2019-06-14 00:14:17 +0200 Ulrich Sibiller (0f8dbbab2) + + * Screen.c: correctly free stuff in nxagentCloseScreen + +2019-06-13 22:56:45 +0200 Ulrich Sibiller (308824ba9) + + * xkb: initialize tsyms + +2019-06-12 19:25:57 +0200 Ulrich Sibiller (6d00a387f) + + * Rootless.c: improve TEST/WARN/DEBUG outout + +2019-06-12 00:16:48 +0200 Ulrich Sibiller (2b25eb3d2) + + * Pixmap.c: fix comment phrasing/spelling + +2019-05-30 11:38:10 +0200 Ulrich Sibiller (1bfafc127) + + * Window.c: add missing comment about nxagentConfiguredWindowList + +2019-05-30 00:30:46 +0200 Ulrich Sibiller (1a8de6352) + + * dix/window.c: fix compiler warning + +2019-05-01 10:40:47 +0200 Ulrich Sibiller (3900ba3f8) + + * NXshm.c: remove left-overs from patch + +2019-05-01 02:06:30 +0200 Ulrich Sibiller (b961e190b) + + * miwindow.c: add hint to Red Hat Bugzilla + fix + +2019-05-04 01:44:36 +0200 Ulrich Sibiller (28e42b3bd) + + * mi: Hush an almost certainly bogus warning + +2019-05-30 00:10:43 +0200 Ulrich Sibiller (9f5ddede9) + + * Window.c: Drop defines CWParent and CWStackingOrder + +2019-05-29 23:52:44 +0200 Ulrich Sibiller (a3e0376f9) + + * Window.c: remove leftover (commented) code + +2019-05-30 23:50:53 +0200 Ulrich Sibiller (d8f5e647c) + + * NXwindow.c: fix compiler warning + +2019-06-01 00:52:06 +0200 Ulrich Sibiller (a765857aa) + + * Remove the Must_have_memory hack. + +2019-06-11 12:24:44 +0200 Mike Gabriel (c0754a357) + + * Merge branch 'uli42-pr/use_selection_callback' into 3.6.x + +2019-06-10 14:25:53 +0200 Ulrich Sibiller (848dee5c4) + + * NXdispatch.c: use upstream version of ProcSetSelectionOwner + +2019-06-10 14:21:43 +0200 Ulrich Sibiller (09ba97b2d) + + * NXdispatch.c: Use Callback instead of a modified function + +2019-06-10 14:20:47 +0200 Ulrich Sibiller (2972f6af1) + + * Add nxagentSetSelectionCallback + +2019-06-10 14:18:06 +0200 Ulrich Sibiller (3fd7e5f93) + + * Add nxagentExternalClipboardEventTrap + +2019-06-11 12:10:25 +0200 Mike Gabriel (58cd35745) + + * Merge branch 'uli42-pr/drop_nxmiexpose' into 3.6.x + +2019-05-30 16:04:43 +0200 Ulrich Sibiller (073c6c17e) + + * NXmiexpose.c: drop file altogether + +2019-05-30 16:02:53 +0200 Ulrich Sibiller (6ce9fb5f2) + + * Window.c/NXmiexpose.c: remove hack for certain WM theme + +2019-05-25 17:29:17 +0200 Ulrich Sibiller (af1c4b9b7) + + * NXmiexpose.c: mark NX changes + +2019-05-01 01:22:39 +0200 Ulrich Sibiller (9e051eab0) + + * NXmiexpose.c: use upstream version of miPaintWindows() + +2019-05-04 01:47:50 +0200 Ulrich Sibiller (39ff69c72) + + * NXmiexpose.c: use upstream miHandleExposures() + +2019-06-11 12:05:42 +0200 Mike Gabriel (a25232734) + + * Merge branch 'uli42-pr/various_small_things' into 3.6.x + +2019-05-30 11:36:18 +0200 Ulrich Sibiller (2da476a67) + + * Window.c: comment on the purpose of some functions + +2019-06-10 15:32:38 +0200 Ulrich Sibiller (d38fb8137) + + * Events.c: add debug output + +2019-06-10 15:27:02 +0200 Ulrich Sibiller (9cb29cce2) + + * Clipboard.c: more debugging output + +2019-06-10 15:23:55 +0200 Ulrich Sibiller (9739c7009) + + * Clipboard.c: Scope improvements + +2019-06-10 15:21:45 +0200 Ulrich Sibiller (4b19c4975) + + * Clipboard.c: fix wrong variable being printed + +2019-06-10 12:09:16 +0200 Ulrich Sibiller (d9b1272fb) + + * Screen.c: more TEST output + +2019-06-10 12:06:31 +0200 Ulrich Sibiller (0e496e5d1) + + * Screen.c: use consistent spacing on pointer references + +2019-06-10 12:05:24 +0200 Ulrich Sibiller (8365ce463) + + * Screen.c: whitespace/formatting fixes + +2019-06-10 12:04:20 +0200 Ulrich Sibiller (d98eeec02) + + * Screen.c: report both created windows (and with the right name) + +2019-06-10 12:01:05 +0200 Ulrich Sibiller (61255ac1a) + + * Window.c: fix: report correct window on icon window creation + +2019-06-11 12:00:48 +0200 Mike Gabriel (92f41213e) + + * Merge branch 'uli42-pr/fix_broken_cursor_handling' into 3.6.x + +2019-05-27 15:42:11 +0200 Ulrich Sibiller (a736122f5) + + * os: fix BigReq ignoring when another request is pending + +2019-05-23 00:17:21 +0200 Ulrich Sibiller (49adb1e5c) + + * render/glyph.c: add missing usage_hint + +2019-05-22 22:22:36 +0200 Ulrich Sibiller (fd8427002) + + * Fix NXevents.c: Reactivate errornously commented function + +2019-06-11 11:31:05 +0200 Mike Gabriel (126cbe1ff) + + * Merge branch 'uli42-pr/remove_requestlog' into 3.6.x + +2019-05-27 20:35:25 +0200 Ulrich Sibiller (0eab060d1) + + * dix: remove unused requestLogIndex + +2019-05-21 10:57:22 +0200 Mike Gabriel (789d3a37e) + + * Merge branch 'uli42-pr/fix_xkb_crash' into 3.6.x + +2019-05-15 19:54:24 +0200 Ulrich Sibiller (20353e96a) + + * libNX_X11: add additional checks for dpy and xkb + +2019-05-15 19:42:29 +0200 Ulrich Sibiller (4df77fe73) + + * xkbUtils.c: Catch division by zero + +2019-05-17 15:51:36 +0200 Mike Gabriel (6981e9bb0) + + * Merge branch 'andschwa-xtestext1h' into 3.6.x + +2019-05-13 21:32:07 +0000 Andrew Schwartzmeyer (6a938063b) + + * Remove Debian build references to `xtestext1.h` + +2019-05-11 09:41:15 +0200 Mike Gabriel (226493690) + + * Merge branch 'uli42-pr/small_fixes' into 3.6.x + +2019-05-08 23:23:54 +0200 Ulrich Sibiller (fac36b24f) + + * nxagent: make nxagentX2go a Boolean + +2019-05-08 22:25:02 +0200 Ulrich Sibiller (1b9d735b0) + + * README.keystrokes: mention nxdialog + +2019-05-08 21:49:50 +0200 Ulrich Sibiller (79a2b7b24) + + * Remove useless "ignore" keystroke for Ctrl-Alt-Backspace + +2019-05-08 21:57:01 +0200 Ulrich Sibiller (a31d28014) + + * README.keystrokes: refine description + +2019-05-04 01:04:06 +0200 Ulrich Sibiller (0db8b0353) + + * NXdispatch.c: indent code to match environment + +2019-05-04 00:40:49 +0200 Ulrich Sibiller (f6845fbd9) + + * NXdispatch.c: add missing fixes + +2019-05-04 00:30:21 +0200 Ulrich Sibiller (3d254765c) + + * NXdispatch.c: add missing change + +2019-05-01 20:11:14 +0200 Ulrich Sibiller (0312a8cfe) + + * Rename libdamage to (correct) libdamageext + +2019-05-01 15:04:26 +0200 Ulrich Sibiller (f0ba303d4) + + * NXdamage.c: add missing upstream fixes + +2019-05-01 14:38:31 +0200 Ulrich Sibiller (249be6680) + + * NXwindow.c: add missing change + +2019-04-30 21:00:31 +0200 Ulrich Sibiller (34e9c6b0b) + + * Keyboard.c: clean/unify formatting + +2018-11-02 20:56:55 +0100 Ulrich Sibiller (0a211b6b6) + + * Keyboard.c: improve TEST and DEBUG output + +2019-04-29 15:37:10 +0200 Ulrich Sibiller (bee0f13ce) + + * nxagent: Remove own GetTimeInMillis() implementation + +2018-11-07 21:29:19 +0100 Ulrich Sibiller (b32a984f8) + + * Die XTESTEXT1, die! + +2019-04-29 22:02:47 +0200 Ulrich Sibiller (dece08252) + + * Reconnect.c: initialize stateFile path + +2019-04-29 22:02:24 +0200 Ulrich Sibiller (ff5740e03) + + * spelling fixes + +2019-05-10 16:37:20 +0200 Mike Gabriel (f6177d2ad) + + * Merge branch 'uli42-pr/short_font_code' into 3.6.x + +2019-04-23 20:09:25 +0200 Ulrich Sibiller (453edbd21) + + * Font.c: use __func__ in TEST prints + +2019-04-23 20:08:57 +0200 Ulrich Sibiller (0086b8c24) + + * Font.c: Avoid duplicate font paths + +2019-04-23 18:22:45 +0200 Ulrich Sibiller (78a16245a) + + * auto-determine system font path and add to list of font paths + +2019-04-23 19:34:57 +0200 Ulrich Sibiller (898f04e42) + + * Font.c: Loop over font paths + +2019-04-23 19:21:41 +0200 Ulrich Sibiller (dfb5602a6) + + * Font.c: Let dix check if a font path exists + +2019-04-23 19:19:04 +0200 Ulrich Sibiller (8029141e7) + + * Font.c: build the font paths at runtime + +2019-04-23 18:34:04 +0200 Ulrich Sibiller (bcb5c7962) + + * Drop Speedo font support + +2019-04-03 22:33:33 +0200 Ulrich Sibiller (dff2e0a01) + + * Font.c: factor out font checks + +2019-05-10 16:10:46 +0200 Mike Gabriel (d94e9ba24) + + * Merge branch 'uli42-pr/fix_flavour_change' into 3.6.x + +2019-05-08 23:21:30 +0200 Ulrich Sibiller (3c9ee1ff7) + + * nxagent: Determine nxagentProgName only once + +2019-04-23 08:42:43 +0200 Mike Gabriel (4ce890758) + + * Merge branch 'mjtrangoni-update-clang-8' into 3.6.x + +2019-04-22 17:26:33 +0200 Mario Trangoni (ee82317b5) + + * travis.yml: Update clang 7.0 => 8.0 + +2019-04-17 11:12:29 +0200 Mike Gabriel (c9cac948f) + + * roll-tarballs.sh: Fix script removal from nx-libs-lite tarballs. + +2019-04-17 11:07:36 +0200 Mike Gabriel (3dc2c9aac) + + * roll-tarballs.sh: Remove nxdialog/* in nx-libs-lite tarballs. + +2019-04-17 11:04:51 +0200 Mike Gabriel (e2b73ab90) + + * release 3.5.99.20 (tag: 3.5.99.20) 2019-04-17 10:52:00 +0200 Mike Gabriel (2a10438f7) diff --git a/VERSION b/VERSION index fa47e3d83..e8b891fd9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.5.99.20 +3.5.99.21 diff --git a/debian/changelog b/debian/changelog index 139b83274..15f0aac86 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +nx-libs (2:3.5.99.21-1) unstable; urgency=medium + + * Upstream-provided Debian package for nx-libs. + See upstream ChangeLog for recent changes. + + -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Mon, 05 Aug 2019 18:25:33 +0200 + nx-libs (2:3.5.99.20-0) unstable; urgency=medium * Upstream-provided Debian package for nx-libs. diff --git a/nx-X11/extras/Mesa_6.4.2/progs/images/bw.rgb b/nx-X11/extras/Mesa_6.4.2/progs/images/bw.rgb index f5de0f140..a451fc266 100644 Binary files a/nx-X11/extras/Mesa_6.4.2/progs/images/bw.rgb and b/nx-X11/extras/Mesa_6.4.2/progs/images/bw.rgb differ diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 6e67aa89b..6804032a2 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -23,7 +23,7 @@ .\" other dealings in this Software without prior written authorization .\" from The Open Group. .ds q \N'34' -.TH nxagent 1 "Apr 2019" "Version 3.5.99.20" "NX Agent (Xserver)" +.TH nxagent 1 "Aug 2019" "Version 3.5.99.21" "NX Agent (Xserver)" .SH NAME nxagent \- nested Xserver optimized for remote computing .SH SYNOPSIS diff --git a/nx-libs.spec b/nx-libs.spec index f9ebf422e..20606ff9a 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -10,7 +10,7 @@ %endif Name: nx-libs -Version: 3.5.99.20 +Version: 3.5.99.21 Release: 0.0build1%{?dist} Summary: NX X11 protocol compression libraries diff --git a/nxdialog/bin/nxdialog b/nxdialog/bin/nxdialog index f735dc45f..f39f0a55a 100755 --- a/nxdialog/bin/nxdialog +++ b/nxdialog/bin/nxdialog @@ -298,7 +298,7 @@ class NxDialogProgram(object): parser = argparse.ArgumentParser(description="Helper for nxagent to display dialogs") - # nxagent 3.5.99.20 only uses yesno, ok, pulldown and yesnosuspend + # nxagent 3.5.99.21 only uses yesno, ok, pulldown and yesnosuspend # yesno dialogs will always kill the session if "yes" is selected parser.add_argument("--dialog", dest="dialog_type", help='type of dialog to show, one of "yesno", \ @@ -316,7 +316,7 @@ class NxDialogProgram(object): parser.add_argument("--window", dest="window", help="id of window where to embed the \ pulldown dialog type") - # -class, -local, -allowmultiple are unused in nxlibs 3.5.99.20 + # -class, -local, -allowmultiple are unused in nxlibs 3.5.99.21 parser.add_argument("--class", dest="dlgclass", default="info", help="class of the message (info, warning, error) \ default: info) [currently unimplemented]") diff --git a/nxdialog/man/nxdialog.1 b/nxdialog/man/nxdialog.1 index 0bf9a71b8..3a839e4f6 100644 --- a/nxdialog/man/nxdialog.1 +++ b/nxdialog/man/nxdialog.1 @@ -5,7 +5,7 @@ \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac -.TH nxdialog 1 "Apr 2019" "Version 3.5.99.20" "NX Dialog" +.TH nxdialog 1 "Aug 2019" "Version 3.5.99.21" "NX Dialog" .SH NAME nxdialog \- NX Dialog Helper .SH SYNOPSIS diff --git a/nxproxy/man/nxproxy.1 b/nxproxy/man/nxproxy.1 index 05a33c67a..bd3891608 100644 --- a/nxproxy/man/nxproxy.1 +++ b/nxproxy/man/nxproxy.1 @@ -5,7 +5,7 @@ \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac -.TH nxproxy 1 "Apr 2019" "Version 3.5.99.20" "NX Proxy" +.TH nxproxy 1 "Aug 2019" "Version 3.5.99.21" "NX Proxy" .SH NAME nxproxy \- NX Proxy Tool .SH SYNOPSIS -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit b8411180ed1f3567ab5ca11d70834907fc54d711 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 18:16:20 2019 +0200 Display.c: safe some lines by calling SAFE_XFree and SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Display.c | 65 +++++++--------------------- 1 file changed, 16 insertions(+), 49 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 127874962..1c18ad1a3 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -71,6 +71,7 @@ is" without express or implied warranty. #include "Init.h" #include "Args.h" #include "Image.h" +#include "Utils.h" #define Pixmap XlibPixmap #include "Icons.h" @@ -1543,7 +1544,7 @@ void nxagentInitVisuals(void) nxagentNumVisuals * sizeof(XVisualInfo)); } - XFree(viList); + SAFE_XFree(viList); if (nxagentNumVisuals == 0 || nxagentVisuals == NULL) { @@ -1765,20 +1766,11 @@ void nxagentCloseDisplay(void) * traffic */ - free(nxagentDefaultColormaps); - nxagentDefaultColormaps = NULL; - - XFree(nxagentVisuals); - nxagentVisuals = NULL; - - free(nxagentDepths); - nxagentDepths = NULL; - - XFree(nxagentPixmapFormats); - nxagentPixmapFormats = NULL; - - XFree(nxagentRemotePixmapFormats); - nxagentRemotePixmapFormats = NULL; + SAFE_free(nxagentDefaultColormaps); + SAFE_free(nxagentDepths); + SAFE_XFree(nxagentVisuals); + SAFE_XFree(nxagentPixmapFormats); + SAFE_XFree(nxagentRemotePixmapFormats); nxagentFreeFontCache(); /* @@ -2017,11 +2009,7 @@ void nxagentBackupDisplayInfo(void) nxagentNumDefaultColormapsRecBackup = nxagentNumDefaultColormaps; nxagentVisualsRecBackup = nxagentVisuals; nxagentNumVisualsRecBackup = nxagentNumVisuals; - if (nxagentVisualHasBeenIgnored) - { - free(nxagentVisualHasBeenIgnored); - nxagentVisualHasBeenIgnored = NULL; - } + SAFE_free(nxagentVisualHasBeenIgnored); nxagentVisualHasBeenIgnored = malloc(nxagentNumVisuals * sizeof(Bool)); nxagentDefaultDepthRecBackup = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay)); nxagentDisplayWidthRecBackup = DisplayWidth(nxagentDisplay, DefaultScreen(nxagentDisplay)); @@ -2033,20 +2021,11 @@ void nxagentBackupDisplayInfo(void) void nxagentCleanupBackupDisplayInfo(void) { - free(nxagentDepthsRecBackup); - nxagentNumDepthsRecBackup = 0; + SAFE_free(nxagentDepthsRecBackup); + SAFE_free(nxagentVisualsRecBackup); + SAFE_free(nxagentVisualHasBeenIgnored); nxagentNumDefaultColormapsRecBackup = 0; - - free(nxagentVisualsRecBackup); - nxagentNumVisualsRecBackup = 0; - - if (nxagentVisualHasBeenIgnored) - { - free(nxagentVisualHasBeenIgnored); - nxagentVisualHasBeenIgnored = NULL; - } - nxagentDefaultDepthRecBackup = 0; nxagentDisplayWidthRecBackup = 0; nxagentDisplayHeightRecBackup = 0; @@ -2054,7 +2033,6 @@ void nxagentCleanupBackupDisplayInfo(void) if (nxagentDisplayBackup) { XCloseDisplay(nxagentDisplayBackup); - nxagentDisplayBackup = NULL; } @@ -2066,7 +2044,7 @@ void nxagentCleanupBackupDisplayInfo(void) } else { - free(nxagentBitmapGCBackup); + SAFE_free(nxagentBitmapGCBackup); } nxagentBitmapGCBackup = NULL; @@ -2569,7 +2547,7 @@ FIXME: Should the visual be ignored in this case? } } - XFree(viList); + SAFE_XFree(viList); if (compatible) { @@ -2585,7 +2563,7 @@ FIXME: Should the visual be ignored in this case? fprintf(stderr, "nxagentInitAndCheckVisuals: New visuals don't match with old visuals.\n"); #endif - free(newVisuals); + SAFE_free(newVisuals); } return compatible; @@ -2766,19 +2744,8 @@ Bool nxagentReconnectDisplay(void *p0) * will be reallocated in nxagentInitPixmapFormats(). */ - if (nxagentPixmapFormats != NULL) - { - XFree(nxagentPixmapFormats); - - nxagentPixmapFormats = NULL; - } - - if (nxagentRemotePixmapFormats != NULL) - { - XFree(nxagentRemotePixmapFormats); - - nxagentRemotePixmapFormats = NULL; - } + SAFE_XFree(nxagentPixmapFormats); + SAFE_XFree(nxagentRemotePixmapFormats); /* * Check if all the required pixmap -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit d8012d2a87ca4d1e7c3b0a04a58b4e4e0cc83abd Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 18:11:59 2019 +0200 Screen.c: safe some lines by calling SAFE_XFree --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 73 ++++++++++++----------------- 1 file changed, 29 insertions(+), 44 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index d1dc37dc2..62634de60 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -304,8 +304,7 @@ Bool nxagentIsParentOf(Display *d, XlibWindow possible_parent, XlibWindow candid if (XQueryTree(d, candidate, &root, &parent, &children, &num_children)) { - if (children) - XFree((char *)children); + SAFE_XFree(children); #ifdef TEST fprintf(stderr, "%s: parent of full screen window [%p] root [%p] possible_parent [%p] candidate [%p]\n", __func__, parent, root, possible_parent, candidate); @@ -490,11 +489,8 @@ Window nxagentCreateIconWindow(void) window_name, window_name, NULL , 0 , sizeHints, wmHints, NULL); - if (sizeHints) - XFree(sizeHints); - - if (wmHints) - XFree(wmHints); + SAFE_XFree(sizeHints); + SAFE_XFree(wmHints); /* * Enable events from the icon window. @@ -895,10 +891,9 @@ void freeDepths(DepthPtr depths, int num) #ifdef DEBUG fprintf(stderr, "%s: freeing depth [%d] index [%d] vids [%p]\n", __func__, depths[i].depth, i, (void*) depths[i].vids); #endif - free(depths[i].vids); - depths[i].vids = NULL; + SAFE_free(depths[i].vids); } - free(depths); + SAFE_free(depths); } Bool nxagentOpenScreen(ScreenPtr pScreen, @@ -1393,7 +1388,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, if (!pFrameBufferBits) { freeDepths(depths, numDepths); - free(visuals); + SAFE_free(visuals); return FALSE; } @@ -1416,7 +1411,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, monitorResolution, monitorResolution, PixmapBytePad(nxagentOption(RootWidth), rootDepth), bitsPerPixel)) { freeDepths(depths, numDepths); - free(visuals); + SAFE_free(visuals); return FALSE; } @@ -1457,7 +1452,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, pScreen -> numDepths = numDepths; pScreen -> rootDepth = rootDepth; - free(pScreen -> visuals); + SAFE_free(pScreen -> visuals); pScreen -> visuals = visuals; pScreen -> numVisuals = numVisuals; pScreen -> rootVisual = defaultVisual; @@ -1898,8 +1893,8 @@ N/A hint.res_class = strdup("NXAgent"); } XSetClassHint(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], &hint); - free(hint.res_name); - free(hint.res_class); + SAFE_free(hint.res_name); + SAFE_free(hint.res_class); } if (nxagentOption(Fullscreen)) @@ -1983,17 +1978,8 @@ N/A nxagentWindowName, argv , argc , sizeHints, wmHints, NULL); - if (sizeHints) - { - XFree(sizeHints); - sizeHints = NULL; - } - - if (wmHints) - { - XFree(wmHints); - wmHints = NULL; - } + SAFE_XFree(sizeHints); + SAFE_XFree(wmHints); /* * Clear the window but let it unmapped. We'll map it @@ -2205,9 +2191,9 @@ Bool nxagentCloseScreen(ScreenPtr pScreen) * Free the frame buffer. */ - free(((PixmapPtr)pScreen -> devPrivate) -> devPrivate.ptr); - free(pScreen->devPrivate);pScreen->devPrivate = NULL; - free(pScreen->visuals); pScreen->visuals = NULL; + SAFE_free(((PixmapPtr)pScreen -> devPrivate) -> devPrivate.ptr); + SAFE_free(pScreen->devPrivate); + SAFE_free(pScreen->visuals); fbCloseScreen(pScreen); @@ -3167,7 +3153,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr length = nxagentImageLength(width, height, ZPixmap, 0, nxagentMasterDepth); - free(tBuffer); + SAFE_free(tBuffer); tBuffer = malloc(length); @@ -3224,7 +3210,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr RegionUnion(&nxagentShadowUpdateRegion, &nxagentShadowUpdateRegion, &updateRegion); } - free(tBuffer); + SAFE_free(tBuffer); RegionUninit(&updateRegion); } @@ -3442,7 +3428,7 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height, cBuffer = (unsigned char *) *buffer; *buffer = (char *) icBuffer; - free(cBuffer); + SAFE_free(cBuffer); } #ifdef NXAGENT_ARTSD @@ -3625,7 +3611,7 @@ FIXME: The port information is not used at the moment and produces a strlen(local_buf), local_buf, 1); } - free(local_buf); + SAFE_free(local_buf); } } } @@ -4049,7 +4035,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) #endif number = 1; - free(screeninfo); + SAFE_free(screeninfo); if (!(screeninfo = malloc(sizeof(XineramaScreenInfo)))) { return FALSE; @@ -4318,8 +4304,7 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen) } /* release allocated memory */ - free(screeninfo); - screeninfo = NULL; + SAFE_free(screeninfo); #ifdef DEBUG for (i = 0; i < pScrPriv->numCrtcs; i++) { @@ -4434,7 +4419,7 @@ void nxagentSaveAreas(PixmapPtr pPixmap, RegionPtr prgnSave, int xorg, int yorg, XSetClipRectangles(nxagentDisplay, gc, 0, 0, pRects, nRects, Unsorted); - free((char *) pRects); + SAFE_free(pRects); extents = *RegionExtents(&cleanRegion); @@ -4580,7 +4565,7 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg, XSetClipRectangles(nxagentDisplay, gc, 0, 0, pRects, nRects, Unsorted); - free(pRects); + SAFE_free(pRects); extents = *RegionExtents(clipRegion); @@ -4660,7 +4645,7 @@ void nxagentSetWMNormalHints(int screen, int width, int height) XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[screen], sizeHints); - XFree(sizeHints); + SAFE_XFree(sizeHints); } /* @@ -4679,7 +4664,7 @@ void nxagentSetWMNormalHintsMaxsize(ScreenPtr pScreen, int maxwidth, int maxheig sizeHints->max_height = maxheight; XSetWMNormalHints(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], sizeHints); - XFree(sizeHints); + SAFE_XFree(sizeHints); } } @@ -4820,7 +4805,7 @@ FIXME fprintf(stderr, "nxagentShowPixmap: XGetImage failed.\n"); #endif - free(data); + SAFE_free(data); return; } @@ -4853,7 +4838,7 @@ FIXME XDestroyImage(image); } - free(data); + SAFE_free(data); /* FIXME @@ -4905,7 +4890,7 @@ void nxagentFbRestoreArea(PixmapPtr pPixmap, WindowPtr pWin, int xSrc, int ySrc, fprintf(stderr, "nxagentFbRestoreArea: XGetImage failed.\n"); #endif - free(data); + SAFE_free(data); return; } @@ -4965,7 +4950,7 @@ FIXME /* FIXME - free(data); + SAFE_free(data); */ } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 1330167fa2026e4d2ad1d470ebfde9977d131ab3 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Jul 23 20:08:16 2019 +0200 Utils.h: add SAFE_free macro --- nx-X11/programs/Xserver/hw/nxagent/Utils.h | 1 + 1 file changed, 1 insertion(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Utils.h b/nx-X11/programs/Xserver/hw/nxagent/Utils.h index c0ad03345..0aebda839 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Utils.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Utils.h @@ -45,5 +45,6 @@ static inline const char * validateString(const char *str) { } #define SAFE_XFree(what) do {if (what) {XFree(what); what = NULL;}} while (0) +#define SAFE_free(what) do {free(what); what = NULL;} while (0) #endif /* __Utils_H__ */ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit ebc2ea79f7343c4ced8277b80178091a3226ea72 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 18:10:12 2019 +0200 Events.c: safe some lines by calling SAFE_XFree --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 35 ++++++----------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index d8bf4df60..74781f638 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -329,7 +329,7 @@ void nxagentRemoteWindowID(Window window, Bool newline) else if (winName) { fprintf(stderr, " \"%s\" ", winName); - XFree(winName); + SAFE_XFree(winName); } #else @@ -477,10 +477,7 @@ void nxagentRemoteWindowsTree(Window window, int level) nxagentRemoteWindowsTree(childList[i], level + 1); } - if (childList) - { - XFree((char *) childList); - } + SAFE_XFree((char *) childList); } #endif @@ -3128,10 +3125,7 @@ int nxagentCheckWindowConfiguration(XConfigureEvent* X) #endif } - if (children_return) - { - XFree(children_return); - } + SAFE_XFree(children_return); #if 0 fprintf(stderr, "nxagentCheckWindowConfiguration: Trees match: %s\n", @@ -3513,11 +3507,7 @@ int nxagentHandleReparentNotify(XEvent* X) result = XQueryTree(nxagentDisplay, w, &root_return, &parent_return, &children_return, &nchildren_return); - if (children_return) - { - XFree(children_return); - children_return = NULL; - } + SAFE_XFree(children_return); if (!result) { @@ -3555,11 +3545,7 @@ int nxagentHandleReparentNotify(XEvent* X) #endif } - if (children_return) - { - XFree(children_return); - children_return = NULL; - } + SAFE_XFree(children_return); } else { @@ -3623,11 +3609,7 @@ int nxagentHandleReparentNotify(XEvent* X) result = XQueryTree(nxagentDisplay, w, &rootReturn, &parentReturn, &childrenReturn, &nchildrenReturn); - if (childrenReturn) - { - XFree(childrenReturn); - childrenReturn = NULL; - } + SAFE_XFree(childrenReturn); if (parentReturn == rootReturn || parentReturn == 0 || result == 0) { @@ -4024,10 +4006,7 @@ void nxagentHandleCollectPropertyEvent(XEvent *X) #endif } - if (pszReturnData != NULL) - { - XFree(pszReturnData); - } + SAFE_XFree(pszReturnData); return; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit a4700c9d0cde2003a8bf8dafdb3e9357d510206b Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 21:27:10 2019 +0200 Font.c: use SAFE_XFree and SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Font.c | 63 +++++++++++++------------------ 1 file changed, 26 insertions(+), 37 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index fb441d431..7370bc56d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -188,11 +188,11 @@ void nxagentFreeFontCache(void) nxagentFreeFont(CACHE_FSTRUCT(i)); } - free(CACHE_NAME(i)); - free(CACHE_ENTRY(i)); + SAFE_free(CACHE_NAME(i)); + SAFE_free(CACHE_ENTRY(i)); } - free(CACHE_ENTRY_PTR); + SAFE_free(CACHE_ENTRY_PTR); CACHE_ENTRY_PTR = NULL; CACHE_INDEX = 0; CACHE_SIZE = 0; @@ -324,8 +324,7 @@ void nxagentListRemoteAddName(const char *name, int status) if (nxagentRemoteFontList.list[pos]->name == NULL) { fprintf(stderr, "Font: remote list name memory allocation failed!.\n"); - free(nxagentRemoteFontList.list[pos]); - nxagentRemoteFontList.list[pos] = NULL; + SAFE_free(nxagentRemoteFontList.list[pos]); return; } } @@ -351,18 +350,14 @@ static void nxagentFreeRemoteFontList(nxagentFontList *listRec) { if (listRec -> list[l]) { - free(listRec -> list[l] -> name); - listRec -> list[l] -> name = NULL; - - free(listRec -> list[l]); - listRec -> list[l] = NULL; + SAFE_free(listRec -> list[l] -> name); + SAFE_free(listRec -> list[l]); } } listRec -> length = listRec -> listSize = 0; - free(listRec -> list); - listRec -> list = NULL; + SAFE_free(listRec -> list); return; } @@ -434,7 +429,7 @@ Bool nxagentFontLookUp(const char *name) { result = nxagentFontFind(scalable, &i); - free(scalable); + SAFE_free(scalable); } } @@ -448,7 +443,7 @@ Bool nxagentFontLookUp(const char *name) { result = nxagentFontFind(scalable, &i); - free(scalable); + SAFE_free(scalable); } } @@ -813,7 +808,7 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP for (j = 0; j < numSearchFields; j++) { - free(searchFields[j]); + SAFE_free(searchFields[j]); } } } @@ -830,7 +825,7 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP for (j = 0; j < numFontFields; j++) { - free(fontNameFields[j]); + SAFE_free(fontNameFields[j]); } return fontStruct; @@ -890,10 +885,8 @@ static void nxagentCollectFailedFont(FontPtr fpt, XID id) if (nxagentFailedToReconnectFonts.font == NULL || nxagentFailedToReconnectFonts.id == NULL) { - free(nxagentFailedToReconnectFonts.font); - nxagentFailedToReconnectFonts.font = NULL; - free(nxagentFailedToReconnectFonts.id); - nxagentFailedToReconnectFonts.id = NULL; + SAFE_free(nxagentFailedToReconnectFonts.font); + SAFE_free(nxagentFailedToReconnectFonts.id); FatalError("Font: font not reconnected memory allocation failed!.\n"); } @@ -1050,7 +1043,7 @@ static void nxagentCleanCacheAfterReconnect(void) { if(CACHE_FSTRUCT(i) == NULL) { - XFree(CACHE_NAME(i)); + SAFE_XFree(CACHE_NAME(i)); real_size--; } } @@ -1223,11 +1216,8 @@ static void nxagentFailedFontReconnect(FontPtr pFont, XID param1, void * param2) static void nxagentFreeFailedToReconnectFonts(void) { - free(nxagentFailedToReconnectFonts.font); - nxagentFailedToReconnectFonts.font = NULL; - - free(nxagentFailedToReconnectFonts.id); - nxagentFailedToReconnectFonts.id = NULL; + SAFE_free(nxagentFailedToReconnectFonts.font); + SAFE_free(nxagentFailedToReconnectFonts.id); nxagentFailedToReconnectFonts.size = 0; nxagentFailedToReconnectFonts.index = 0; @@ -1321,7 +1311,7 @@ Bool nxagentReconnectFailedFonts(void *p0) nxagentListRemoteFonts("*", nxagentMaxFontNames); XFreeFontPath(fontPaths); - free(newFontPaths); + SAFE_free(newFontPaths); return False; } @@ -1332,7 +1322,7 @@ Bool nxagentReconnectFailedFonts(void *p0) XSetFontPath(nxagentDisplay, fontPaths, nPaths); XFreeFontPath(fontPaths); - free(newFontPaths); + SAFE_free(newFontPaths); nxagentCleanCacheAfterReconnect(); @@ -1442,7 +1432,7 @@ void nxagentVerifySingleFontPath(char **dest, const char *fontDir) if (rc == -1) return; - free(*dest); + SAFE_free(*dest); *dest = tmppath; tmppath = NULL; } @@ -1554,7 +1544,7 @@ XFontStruct* nxagentLoadQueryFont(register Display *dpy, char *name, FontPtr pFo fprintf(stderr, "nxagentLoadQueryFont: WARNING! Font not found '%s'.\n", name); #endif - free(fs); + SAFE_free(fs); return (XFontStruct *) NULL; } @@ -1588,7 +1578,7 @@ XFontStruct* nxagentLoadQueryFont(register Display *dpy, char *name, FontPtr pFo fprintf(stderr, "nxagentLoadQueryFont: WARNING! Failed allocation of XFontProp."); #endif - free((char *) fs); + SAFE_free(fs); return (XFontStruct *) NULL; } @@ -1622,18 +1612,17 @@ XFontStruct* nxagentLoadQueryFont(register Display *dpy, char *name, FontPtr pFo int nxagentFreeFont(XFontStruct *fs) { - if (fs -> per_char) + if (fs->per_char) { #ifdef USE_XF86BIGFONT _XF86BigfontFreeFontMetrics(fs); #else - free ((char *) fs->per_char); + SAFE_free(fs->per_char); #endif } - free (fs->properties); - - XFree(fs); + SAFE_free(fs->properties); + SAFE_XFree(fs); return 1; } @@ -1769,7 +1758,7 @@ char *nxagentMakeScalableFontName(const char *fontName, int scalableResolution) MakeScalableFontNameError: - free(scalableFontName); + SAFE_free(scalableFontName); #ifdef DEBUG fprintf(stderr, "nxagentMakeScalableFontName: Invalid font name.\n"); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit d0a6c98cb2465203e852f466127442cd79dc2662 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 21:32:58 2019 +0200 Window.c: use SAFE_free and SAFE_XFree --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 40 ++++++++++++----------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 7d390872e..357c6efbd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -63,6 +63,7 @@ #include "Init.h" #include "Composite.h" #include "Events.h" +#include "Utils.h" #include <nx/NX.h> #include "compext/Compext.h" @@ -1482,10 +1483,7 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) fprintf(stderr, "nxagentConfigureWindow: Failed QueryTree request.\n "); } - if (children_return) - { - XFree(children_return); - } + SAFE_XFree(children_return); } #endif } @@ -3183,7 +3181,7 @@ static void nxagentReconnectWindow(void * param0, XID param1, void * data_buffer &hints); #ifdef _XSERVER64 - free(data64); + SAFE_free(data64); #endif } } @@ -3430,7 +3428,7 @@ Bool nxagentCheckWindowIntegrity(WindowPtr pWin) XDestroyImage(image); } - free(data); + SAFE_free(data); } else { @@ -3519,14 +3517,14 @@ void nxagentFlushConfigureWindow(void) if (index == nxagentConfiguredWindowList) { - free(index); + SAFE_free(index); break; } else { ConfiguredWindowStruct *tmp = index; index = index -> prev; - free(tmp); + SAFE_free(tmp); } } @@ -3676,16 +3674,14 @@ void nxagentDeleteConfiguredWindow(WindowPtr pWin) { if (index -> prev == NULL && index -> next == NULL) { - free(nxagentConfiguredWindowList); - nxagentConfiguredWindowList = NULL; - + SAFE_free(nxagentConfiguredWindowList); return; } else if (index -> prev == NULL) { tmp = nxagentConfiguredWindowList; index = nxagentConfiguredWindowList = tmp -> next; - free(tmp); + SAFE_free(tmp); nxagentConfiguredWindowList -> prev = NULL; continue; @@ -3694,7 +3690,7 @@ void nxagentDeleteConfiguredWindow(WindowPtr pWin) { tmp = index; index = index -> prev; - free(tmp); + SAFE_free(tmp); index -> next = NULL; return; @@ -3705,7 +3701,7 @@ void nxagentDeleteConfiguredWindow(WindowPtr pWin) index = index -> next; previous -> next = index; index -> prev = previous; - free(tmp); + SAFE_free(tmp); continue; } @@ -3747,16 +3743,14 @@ void nxagentDeleteStaticResizedWindow(unsigned long sequence) { if (index -> prev == NULL && index -> next == NULL) { - free(nxagentStaticResizedWindowList); - nxagentStaticResizedWindowList = NULL; - + SAFE_free(nxagentStaticResizedWindowList); return; } else if (index -> prev == NULL) { tmp = nxagentStaticResizedWindowList; index = nxagentStaticResizedWindowList = tmp -> next; - free(tmp); + SAFE_free(tmp); nxagentStaticResizedWindowList -> prev = NULL; continue; @@ -3765,7 +3759,7 @@ void nxagentDeleteStaticResizedWindow(unsigned long sequence) { tmp = index; index = index -> prev; - free(tmp); + SAFE_free(tmp); index -> next = NULL; return; @@ -3776,7 +3770,7 @@ void nxagentDeleteStaticResizedWindow(unsigned long sequence) index = index -> next; previous -> next = index; index -> prev = previous; - free(tmp); + SAFE_free(tmp); continue; } @@ -3909,8 +3903,7 @@ int nxagentRemoveItemBSPixmapList(unsigned long pixmapId) if ((nxagentBSPixmapList[i] != NULL) && (nxagentBSPixmapList[i] -> storingPixmapId == pixmapId)) { - free(nxagentBSPixmapList[i]); - nxagentBSPixmapList[i] = NULL; + SAFE_free(nxagentBSPixmapList[i]); if (i < BSPIXMAPLIMIT - 1) { @@ -3948,8 +3941,7 @@ int nxagentEmptyBSPixmapList(void) { for (int i = 0; i < BSPIXMAPLIMIT; i++) { - free(nxagentBSPixmapList[i]); - nxagentBSPixmapList[i] = NULL; + SAFE_free(nxagentBSPixmapList[i]); } return 1; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 4a826d30f911dbf4552b92192dbbb2d91d34e33f Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 21:29:31 2019 +0200 Rootless.c: use SAFE_free and SAFE_XFree --- nx-X11/programs/Xserver/hw/nxagent/Rootless.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c index c2611c194..6908799b6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Rootless.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Rootless.c @@ -281,10 +281,7 @@ Bool nxagentRootlessTreesMatch(void) } } - if (children_return) - { - XFree(children_return); - } + SAFE_XFree(children_return); return treesMatch; } @@ -332,7 +329,7 @@ void nxagentRootlessRestack(unsigned long children[], unsigned int nchildren) if (!ntoplevel) { - free(toplevel); + SAFE_free(toplevel); return; } @@ -397,7 +394,7 @@ void nxagentRootlessRestack(unsigned long children[], unsigned int nchildren) #endif - free(toplevel); + SAFE_free(toplevel); return; } @@ -818,7 +815,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value) if (freeMem) { - free(output); + SAFE_free(output); } return export; @@ -1131,7 +1128,7 @@ void nxagentImportProperty(Window window, if (freeMem) { - free(output); + SAFE_free(output); } return; @@ -1183,7 +1180,7 @@ void nxagentRemovePropertyFromList(void) nxagentPropertyList.last = NULL; } - free(tmp); + SAFE_free(tmp); } } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit fd4fa4e9646bb3f5a9091dc571b158a861b6127e Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 21:34:42 2019 +0200 Keyboard.c: use SAFE_XFree and SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 70 +++++++++++++-------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 6fbc66481..b7ed38ca3 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -58,6 +58,7 @@ is" without express or implied warranty. #include "Options.h" #include "Error.h" #include "Init.h" +#include "Utils.h" #include "compext/Compext.h" @@ -657,7 +658,7 @@ N/A { keymap[i] = keymap64[i]; } - XFree(keymap64); + SAFE_XFree(keymap64); } #else /* #ifdef _XSERVER64 */ @@ -762,7 +763,7 @@ XkbError: #ifdef TEST fprintf(stderr, "%s: changing nxagentKeyboard from [null/null] to [clone].\n", __func__); #endif - free(nxagentKeyboard); + SAFE_free(nxagentKeyboard); nxagentKeyboard = strdup("clone"); } @@ -809,7 +810,7 @@ XkbError: layout = strdup(strsep(&tmp, sep)); variant = strdup(strsep(&tmp, sep)); options = strdup(strsep(&tmp, sep)); - free(rmlvo); + SAFE_free(rmlvo); } else { @@ -864,11 +865,11 @@ XkbError: /* Only setup keycode conversion if we are NOT in clone mode */ if (nxagentKeyboard && (strcmp(nxagentKeyboard, "clone") == 0)) { - free(rules); rules = strdup(nxagentRemoteRules); - free(model); model = strdup(nxagentRemoteModel); - free(layout); layout = strdup(nxagentRemoteLayout); - free(variant); variant = strdup(nxagentRemoteVariant); - free(options); options = strdup(nxagentRemoteOptions); + SAFE_free(rules); rules = strdup(nxagentRemoteRules); + SAFE_free(model); model = strdup(nxagentRemoteModel); + SAFE_free(layout); layout = strdup(nxagentRemoteLayout); + SAFE_free(variant); variant = strdup(nxagentRemoteVariant); + SAFE_free(options); options = strdup(nxagentRemoteOptions); /* * when cloning we do not want X2Go to set the keyboard * via a keyboard file generated by nxagent. The defined @@ -947,9 +948,9 @@ XkbError: NXShadowInitKeymap(&(pDev->key->curKeySyms)); } - free(rules); - free(variant); - free(options); + SAFE_free(rules); + SAFE_free(variant); + SAFE_free(options); } if (xkb) @@ -958,8 +959,8 @@ XkbError: xkb = NULL; } - free(model); - free(layout); + SAFE_free(model); + SAFE_free(layout); #endif #ifdef WATCH @@ -980,9 +981,9 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio #endif #ifdef _XSERVER64 - free(keymap); + SAFE_free(keymap); #else - XFree(keymap); + SAFE_XFree(keymap); #endif break; case DEVICE_ON: @@ -1182,7 +1183,7 @@ int nxagentResetKeyboard(void) nxagentFreeKeyboardDeviceData(devBackup); - free(devBackup); + SAFE_free(devBackup); return 1; } @@ -1315,18 +1316,15 @@ static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev) } #endif - free(dev->key->curKeySyms.map); - free(dev->key->modifierKeyMap); - free(dev->key); - - dev->key = NULL; + SAFE_free(dev->key->curKeySyms.map); + SAFE_free(dev->key->modifierKeyMap); + SAFE_free(dev->key); } if (dev->focus) { - free(dev->focus->trace); - free(dev->focus); - dev->focus = NULL; + SAFE_free(dev->focus->trace); + SAFE_free(dev->focus); } if (dev->kbdfeed) @@ -1338,7 +1336,7 @@ static int nxagentFreeKeyboardDeviceData(DeviceIntPtr dev) if (k->xkb_sli) XkbFreeSrvLedInfo(k->xkb_sli); #endif - free(k); + SAFE_free(k); } dev->kbdfeed = NULL; } @@ -1571,11 +1569,11 @@ void nxagentTuneXkbWrapper(void) void nxagentXkbClearNames(void) { - free(nxagentRemoteRules); nxagentRemoteRules = NULL; - free(nxagentRemoteModel); nxagentRemoteModel = NULL; - free(nxagentRemoteLayout); nxagentRemoteLayout = NULL; - free(nxagentRemoteVariant); nxagentRemoteVariant = NULL; - free(nxagentRemoteOptions); nxagentRemoteOptions = NULL; + SAFE_free(nxagentRemoteRules); + SAFE_free(nxagentRemoteModel); + SAFE_free(nxagentRemoteLayout); + SAFE_free(nxagentRemoteVariant); + SAFE_free(nxagentRemoteOptions); } static void nxagentXkbGetNames(void) @@ -1618,7 +1616,7 @@ static void nxagentXkbGetNames(void) { if (data) { - XFree(data); + SAFE_XFree(data); return; } } @@ -1655,7 +1653,7 @@ static void nxagentXkbGetNames(void) name += strlen(name) + 1; } - XFree(data); + SAFE_XFree(data); return; } @@ -1686,12 +1684,12 @@ static char* getKeyboardFilePath(void) { if ((asprintf(&keyboard_file_path, "%s/keyboard", sessionpath) == -1)) { - free(sessionpath); + SAFE_free(sessionpath); FatalError("malloc for keyboard file path failed."); } else { - free(sessionpath); + SAFE_free(sessionpath); } } else @@ -1720,7 +1718,7 @@ static void nxagentWriteKeyboardDir(void) { fprintf(stderr, "Info: keyboard blocking directory created: '%s'\n", keyboard_file_path); } - free(keyboard_file_path); + SAFE_free(keyboard_file_path); } } @@ -1748,7 +1746,7 @@ static void nxagentWriteKeyboardFile(char *rules, char *model, char *layout, cha int save_err = errno; fprintf(stderr, "Error: keyboard file not created: %s\n", strerror(save_err)); } - free(keyboard_file_path); + SAFE_free(keyboard_file_path); } } } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 156533439445173e488d648354a94103f578cfa0 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 21:33:54 2019 +0200 Cursor.c: use SAFE_XFree --- nx-X11/programs/Xserver/hw/nxagent/Cursor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Cursor.c b/nx-X11/programs/Xserver/hw/nxagent/Cursor.c index a67115cec..75382d4e8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Cursor.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Cursor.c @@ -61,6 +61,7 @@ is" without express or implied warranty. #include "Events.h" #include "Render.h" #include "Client.h" +#include "Utils.h" #include "windowstr.h" #include "resource.h" @@ -211,7 +212,7 @@ Bool nxagentRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) XPutImage(nxagentDisplay, source, nxagentBitmapGC, image, 0, 0, 0, 0, pCursor->bits->width, pCursor->bits->height); - XFree(image); + SAFE_XFree(image); image = XCreateImage(nxagentDisplay, nxagentDefaultVisual(pScreen), @@ -229,7 +230,7 @@ Bool nxagentRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) XPutImage(nxagentDisplay, mask, nxagentBitmapGC, image, 0, 0, 0, 0, pCursor->bits->width, pCursor->bits->height); - XFree(image); + SAFE_XFree(image); fg_color.red = pCursor->foreRed; fg_color.green = pCursor->foreGreen; @@ -264,14 +265,12 @@ Bool nxagentUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) if (nxagentCursorUsesRender(pCursor, pScreen)) { PicturePtr pPicture = nxagentCursorPicture(pCursor, pScreen); - FreePicture(pPicture, pPicture -> id); } if (nxagentCursor(pCursor, pScreen) != None) { XFreeCursor(nxagentDisplay, nxagentCursor(pCursor, pScreen)); - nxagentCursor(pCursor, pScreen) = None; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 34bd0942baf5fedc038ded7507b130446edd611a Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 21:44:25 2019 +0200 Reconnect.c: use SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index b78c01e30..47f636316 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -53,6 +53,7 @@ #include "Splash.h" #include "Error.h" #include "Keystroke.h" +#include "Utils.h" #ifdef XKB #include "XKBsrv.h" @@ -448,8 +449,7 @@ Bool nxagentReconnectSession(void) return 0; } - free(nxagentKeyboard); - nxagentKeyboard = NULL; + SAFE_free(nxagentKeyboard); } nxagentSaveOptions(); @@ -464,7 +464,7 @@ Bool nxagentReconnectSession(void) fprintf(stderr, "nxagentReconnect: changing nxagentKeyboard from [null/null] to [clone].\n"); #endif - free(nxagentKeyboard); + SAFE_free(nxagentKeyboard); nxagentKeyboard = strdup("clone"); } @@ -635,8 +635,7 @@ Bool nxagentReconnectSession(void) nxagentXkbState.Initialized = 0; - free(nxagentOldKeyboard); - nxagentOldKeyboard = NULL; + SAFE_free(nxagentOldKeyboard); nxagentInitPointerMap(); @@ -760,8 +759,7 @@ nxagentReconnectError: nxagentDisconnectDisplay(); } - free(nxagentOldKeyboard); - nxagentOldKeyboard = NULL; + SAFE_free(nxagentOldKeyboard); return 0; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 8b74ff1c11f42943fbfdf247446676536d16f480 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 21:45:25 2019 +0200 Pixmap.c: use SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c index 653426ebb..58fea6c05 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c @@ -49,6 +49,7 @@ #include "Events.h" #include "Holder.h" #include "Args.h" +#include "Utils.h" #include "compext/Compext.h" #include <nx/NXpack.h> @@ -501,7 +502,7 @@ Bool nxagentDestroyPixmap(PixmapPtr pPixmap) FreeResource(pPixmapPriv -> mid, RT_NONE); } - free(pPixmap); + SAFE_free(pPixmap); return True; } @@ -1092,7 +1093,7 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap) { FatalError("XGetImage: Failed.\n"); - free(data); + SAFE_free(data); return False; } @@ -1168,7 +1169,7 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap) XDestroyImage(image); } - free(data); + SAFE_free(data); } else { @@ -1265,7 +1266,7 @@ void nxagentSynchronizeShmPixmap(DrawablePtr pDrawable, int xPict, int yPict, nxagentPutImage(pDrawable, pGC, depth, xPict, yPict, width, height, 0, format, data); - free(data); + SAFE_free(data); } #ifdef WARNING else @@ -1413,7 +1414,7 @@ FIXME: If the pixmap has a different depth from the window, the fprintf(stderr, "nxagentPixmapOnShadowDisplay: XCreateImage failed.\n"); #endif - free(data); + SAFE_free(data); return False; } @@ -1572,7 +1573,7 @@ Bool nxagentFbOnShadowDisplay(void) fprintf(stderr, "nxagentFbOnShadowDisplay: XCreateImage failed.\n"); #endif - free(data); + SAFE_free(data); return False; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 458538010837633483409700f42a81d4650f2169 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 21:50:19 2019 +0200 Render.c: use SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Render.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c index 9d91b1ff1..ebc1fe287 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Render.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c @@ -45,6 +45,7 @@ #include "Drawable.h" #include "Trap.h" #include "Args.h" +#include "Utils.h" #define Atom XlibAtom #define Pixmap XlibPixmap @@ -2528,7 +2529,7 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi, if (normalizedImages != images) { - free(normalizedImages); + SAFE_free(normalizedImages); } #ifdef DEBUG @@ -2636,7 +2637,7 @@ FIXME: Is this useful or just a waste of bandwidth? nparams); #endif - free(szFilter); + SAFE_free(szFilter); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 633d040971ad470e8cd74d31fc203d1312ec5550 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 22:19:15 2019 +0200 Args.c: use SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Args.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 161403cd0..1d8beca3d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -195,7 +195,7 @@ int ddxProcessArgument(int argc, char *argv[], int i) { char *basec = strdup(argv[0]); nxagentProgName = strdup(basename(basec)); - free(basec); + SAFE_free(basec); /* * Check if we are running as X2Go Agent @@ -270,7 +270,7 @@ int ddxProcessArgument(int argc, char *argv[], int i) { nxagentParseOptionString(envOptions); - free(envOptions); + SAFE_free(envOptions); } for (j = 0; j < argc; j++) @@ -378,8 +378,7 @@ int ddxProcessArgument(int argc, char *argv[], int i) { if (++i < argc) { - free(nxagentOptionsFilenameOrString); - nxagentOptionsFilenameOrString = NULL; + SAFE_free(nxagentOptionsFilenameOrString); if (-1 == asprintf(&nxagentOptionsFilenameOrString, "%s", argv[i])) { @@ -716,8 +715,7 @@ int ddxProcessArgument(int argc, char *argv[], int i) { if (++i < argc) { - free(nxagentKeyboard); - nxagentKeyboard = NULL; + SAFE_free(nxagentKeyboard); nxagentKeyboard = strdup(argv[i]); if (nxagentKeyboard == NULL) @@ -1574,7 +1572,7 @@ static void nxagentParseSingleOption(char *name, char *value) ddxProcessArgument(argc, argv, 0); - free(argv[0]); + SAFE_free(argv[0]); } static void nxagentParseOptionString(char *string) @@ -1761,7 +1759,7 @@ void nxagentProcessOptionsFile(char * filename) nxagentProcessOptionsFileExit: - free(data); + SAFE_free(data); if (file) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 122fbd3e1b49b4eca142052350336694dae17585 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 22:17:25 2019 +0200 Error.c: use SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Error.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Error.c b/nx-X11/programs/Xserver/hw/nxagent/Error.c index bc58ef849..0d4ef3107 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Error.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Error.c @@ -42,6 +42,7 @@ #include "Error.h" #include "Args.h" +#include "Utils.h" /* * Set here the required log level. @@ -425,7 +426,7 @@ char *nxagentGetRootPath(void) "home directory '%s'.\n", homeEnv); #endif - free(homeEnv); + SAFE_free(homeEnv); return NULL; } @@ -436,7 +437,7 @@ char *nxagentGetRootPath(void) snprintf(nxagentRootDir, DEFAULT_STRING_LENGTH, "%s/.nx", homeEnv); - free(homeEnv); + SAFE_free(homeEnv); /* * Create the NX root directory. @@ -534,14 +535,14 @@ char *nxagentGetSessionPath(void) nxagentSessionDir); #endif - free(rootPath); + SAFE_free(rootPath); return NULL; } snprintf(nxagentSessionDir, DEFAULT_STRING_LENGTH, "%s/C-%s", rootPath, nxagentSessionId); - free(rootPath); + SAFE_free(rootPath); if ((stat(nxagentSessionDir, &dirStat) == -1) && (errno == ENOENT)) { @@ -595,14 +596,14 @@ void nxagentGetClientsPath(void) fprintf(stderr, "nxagentGetClientsPath: PANIC! Invalid value for the NX clients Log File Path ''.\n"); #endif - free(sessionPath); + SAFE_free(sessionPath); return; } snprintf(nxagentClientsLogName, NXAGENTCLIENTSLOGNAMELENGTH, "%s/clients", sessionPath); - free(sessionPath); + SAFE_free(sessionPath); } return; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit dde4e7636bb48360696b1886978c7c4626dd40f3 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 21:53:20 2019 +0200 Image.c: use SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Image.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c index a5e19724b..a7bacaf85 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Image.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c @@ -455,7 +455,7 @@ FIXME: Here the split trap is always set and so the caching of if (nxagentUnpackAlpha[resource] != NULL) { - free(nxagentUnpackAlpha[resource] -> data); + SAFE_free(nxagentUnpackAlpha[resource] -> data); } else if ((nxagentUnpackAlpha[resource] = malloc(sizeof(UnpackAlphaRec))) == NULL) { @@ -463,7 +463,7 @@ FIXME: Here the split trap is always set and so the caching of fprintf(stderr, "nxagentSetUnpackAlpha: PANIC! Can't allocate data for the alpha structure.\n"); #endif - free(data); + SAFE_free(data); return; } @@ -483,7 +483,7 @@ FIXME: Here the split trap is always set and so the caching of resource, size); #endif - free(data); + SAFE_free(data); } } @@ -1567,20 +1567,20 @@ nxagentPutSubImageEnd: nxagentImageStatistics.totalEncoded, nxagentImageStatistics.totalAdded); #endif - free(packedChecksum); + SAFE_free(packedChecksum); if (packedImage != NULL) { if (packedImage -> data != NULL && packedImage -> data != plainImage -> data) { - free(packedImage -> data); + SAFE_free(packedImage -> data); } - free(packedImage); + SAFE_free(packedImage); } - free(plainImage); + SAFE_free(plainImage); } void nxagentGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, @@ -1634,11 +1634,8 @@ void nxagentResetAlphaCache(void) { if (nxagentUnpackAlpha[i]) { - free(nxagentUnpackAlpha[i] -> data); - - free(nxagentUnpackAlpha[i]); - - nxagentUnpackAlpha[i] = NULL; + SAFE_free(nxagentUnpackAlpha[i] -> data); + SAFE_free(nxagentUnpackAlpha[i]); } } } @@ -1716,7 +1713,7 @@ int nxagentScaleImage(int x, int y, unsigned xRatio, unsigned yRatio, if (newImage -> data == NULL) { - free(newImage); + SAFE_free(newImage); #ifdef PANIC fprintf(stderr, "nxagentScaleImage: PANIC! Failed to create the target image data.\n"); @@ -1784,8 +1781,8 @@ int nxagentScaleImage(int x, int y, unsigned xRatio, unsigned yRatio, } } - free((char *) image -> obdata); - free((char *) image); + SAFE_free(image -> obdata); + SAFE_free(image); *pImage = newImage; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit a9819436d8014e61c2d557bcd62124fe593be096 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 22:22:31 2019 +0200 Drawable.c: use SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Drawable.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c index 88f3da3a9..7574ec7b0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c @@ -42,6 +42,7 @@ #include "Pixels.h" #include "Reconnect.h" #include "GCOps.h" +#include "Utils.h" #include "compext/Compext.h" @@ -365,7 +366,7 @@ int nxagentSynchronizeDrawableData(DrawablePtr pDrawable, unsigned int breakMask success = nxagentSynchronizeRegion(pDrawable, NullRegion, breakMask, owner); nxagentSynchronizeDrawableDataEnd: - free(data); + SAFE_free(data); return success; } @@ -861,7 +862,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned #endif } - free(cmpData); + SAFE_free(cmpData); } } else @@ -1058,7 +1059,7 @@ nxagentSynchronizeRegionFree: nxagentFreeRegion(pDrawable, clipRegion); } - free(data); + SAFE_free(data); RegionUninit(&exposeRegion); @@ -2158,7 +2159,7 @@ unsigned long nxagentGetColor(DrawablePtr pDrawable, int xPixel, int yPixel) fprintf(stderr, "nxagentGetColor: WARNING! Failed to create the XImage.\n"); #endif - free(data); + SAFE_free(data); return -1; } @@ -2384,7 +2385,7 @@ void nxagentFillRemoteRegion(DrawablePtr pDrawable, RegionPtr pRegion) XFillRectangles(nxagentDisplay, nxagentDrawable(pDrawable), nxagentGC(pGC), pRects, nrects); - free(pRects); + SAFE_free(pRects); } } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 43e300ecdd7d960012f278fc8ee178cae4c81728 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 22:20:47 2019 +0200 Colormap.c: use SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Colormap.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Colormap.c b/nx-X11/programs/Xserver/hw/nxagent/Colormap.c index 401f05b94..33b0738ec 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Colormap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Colormap.c @@ -54,6 +54,7 @@ is" without express or implied warranty. #include "Visual.h" #include "Windows.h" #include "Args.h" +#include "Utils.h" #define PANIC #define WARNING @@ -120,7 +121,7 @@ Bool nxagentCreateColormap(ColormapPtr pCmap) pCmap->red[i].co.local.green = colors[i].red; pCmap->red[i].co.local.blue = colors[i].red; } - free(colors); + SAFE_free(colors); break; case StaticColor: /* read only */ @@ -133,7 +134,7 @@ Bool nxagentCreateColormap(ColormapPtr pCmap) pCmap->red[i].co.local.green = colors[i].green; pCmap->red[i].co.local.blue = colors[i].blue; } - free(colors); + SAFE_free(colors); break; case TrueColor: /* read only */ @@ -157,7 +158,7 @@ Bool nxagentCreateColormap(ColormapPtr pCmap) pCmap->green[i].co.local.green = colors[i].green; pCmap->blue[i].co.local.blue = colors[i].blue; } - free(colors); + SAFE_free(colors); break; case GrayScale: /* read and write */ @@ -176,7 +177,7 @@ Bool nxagentCreateColormap(ColormapPtr pCmap) void nxagentDestroyColormap(ColormapPtr pCmap) { XFreeColormap(nxagentDisplay, nxagentColormap(pCmap)); - free(pCmap->devPriv); + SAFE_free(pCmap->devPriv); } #define SEARCH_PREDICATE \ @@ -254,10 +255,10 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen) numWindows = 0; } - free(icws.cmapIDs); + SAFE_free(icws.cmapIDs); if (!nxagentSameInstalledColormapWindows(icws.windows, icws.numWindows)) { - free(nxagentOldInstalledColormapWindows); + SAFE_free(nxagentOldInstalledColormapWindows); #ifdef _XSERVER64 { @@ -268,7 +269,7 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen) windows[i] = icws.windows[i]; XSetWMColormapWindows(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], windows, numWindows); - free(windows); + SAFE_free(windows); } #else XSetWMColormapWindows(nxagentDisplay, nxagentDefaultWindows[pScreen->myNum], @@ -317,12 +318,12 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen) #endif /* DUMB_WINDOW_MANAGERS */ } else - free(icws.windows); + SAFE_free(icws.windows); } void nxagentSetScreenSaverColormapWindow(ScreenPtr pScreen) { - free(nxagentOldInstalledColormapWindows); + SAFE_free(nxagentOldInstalledColormapWindows); #ifdef _XSERVER64 { @@ -454,7 +455,7 @@ void nxagentStoreColors(ColormapPtr pCmap, int nColors, xColorItem *pColors) pColors64[i].flags = pColors[i].flags; } XStoreColors(nxagentDisplay, nxagentColormap(pCmap), pColors64, nColors); - free(pColors64); + SAFE_free(pColors64); } #else XStoreColors(nxagentDisplay, nxagentColormap(pCmap), -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6378d5ade724a43fb21a38f843f2496a367e517f Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 22:24:37 2019 +0200 GC.c: use SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/GC.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/GC.c b/nx-X11/programs/Xserver/hw/nxagent/GC.c index 2fac2f100..df9c4ad0a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/GC.c +++ b/nx-X11/programs/Xserver/hw/nxagent/GC.c @@ -61,6 +61,7 @@ is" without express or implied warranty. #include "Trap.h" #include "Screen.h" #include "Pixels.h" +#include "Utils.h" #include "../../fb/fb.h" @@ -694,7 +695,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects) XSetClipRectangles(nxagentDisplay, nxagentGC(pGC), pGC -> clipOrg.x, pGC -> clipOrg.y, pRects, nRects, Unsorted); - free((char *) pRects); + SAFE_free(pRects); } break; @@ -778,7 +779,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects) pGC->clientClip = (void *) RegionFromRects(nRects, (xRectangle *)pValue, type); - free(pValue); + SAFE_free(pValue); pValue = pGC->clientClip; @@ -912,9 +913,8 @@ static void nxagentFreeGCRec(struct nxagentGCRec *t) (void *) t, (void *) t -> gc); #endif - free(t -> gc); - - free(t); + SAFE_free(t -> gc); + SAFE_free(t); } static void nxagentRestoreGCRec(struct nxagentGCRec *t) @@ -924,11 +924,11 @@ static void nxagentRestoreGCRec(struct nxagentGCRec *t) (void*)t, (void*)t -> gc); #endif - free(nxagentGC(t -> pGC)); + SAFE_free(nxagentGC(t -> pGC)); nxagentGC(t -> pGC) = t -> gc; - free(t); + SAFE_free(t); } static void nxagentAddGCToList(GCPtr pGC) @@ -1303,7 +1303,7 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects) XSetClipRectangles(nxagentDisplay, nxagentGC(pGC), pGC -> clipOrg.x, pGC -> clipOrg.y, pRects, nRects, Unsorted); - free((char *) pRects); + SAFE_free(pRects); } else { @@ -1374,7 +1374,7 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects) pGC->clientClip = (void *) RegionFromRects(nRects, (xRectangle *)pValue, type); - free(pValue); + SAFE_free(pValue); pValue = pGC->clientClip; type = CT_REGION; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 7d25771da3eed13a2779792fa53fdac01d567bd4 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 22:26:46 2019 +0200 Keystroke.c: use SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index 662da6b04..d524e9e0b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -294,7 +294,7 @@ void nxagentInitKeystrokes(Bool force) if (force) { if (map != default_map) { - free(map); + SAFE_free(map); map = default_map; } fprintf(stderr, "Info: re-reading keystrokes configuration\n"); @@ -414,7 +414,7 @@ void nxagentInitKeystrokes(Bool force) #endif filename = NULL; } - free(homepath); + SAFE_free(homepath); if (map == default_map) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 4421f787ddf102889ee65cd310cc50369540dbc8 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Jul 23 20:10:43 2019 +0200 Atoms.c: use SAFE_XFree and SAFE_free macros --- nx-X11/programs/Xserver/hw/nxagent/Atoms.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c index c36c38e2f..2ee67b9bb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c @@ -43,6 +43,7 @@ #include "Screen.h" #include "Options.h" #include "Agent.h" +#include "Utils.h" /* * Set here the required log level. @@ -53,11 +54,6 @@ #undef TEST #undef DEBUG -#ifdef DEBUG -/* for validateString() */ -#include "Utils.h" -#endif - /* * These values should be moved in * the option repository. @@ -482,8 +478,8 @@ static int nxagentInitAtomMap(char **atomNameList, int count, Atom *atomsRet) fprintf(stderr, "nxagentInitAtomMap: WARNING! XInternAtoms request failed.\n"); #endif - free(atom_list); - free(name_list); + SAFE_free(atom_list); + SAFE_free(name_list); return 0; } @@ -523,8 +519,8 @@ static int nxagentInitAtomMap(char **atomNameList, int count, Atom *atomsRet) } } - free(atom_list); - free(name_list); + SAFE_free(atom_list); + SAFE_free(name_list); nxagentPrintAtomMapInfo("nxagentInitAtomMap: Exiting"); @@ -794,7 +790,7 @@ Atom nxagentRemoteToLocalAtom(Atom remote) #ifdef TEST fprintf(stderr, "%s: remote [%d (%s)] -> local [%d]\n", __func__, remote, string, local); #endif - XFree(string); + SAFE_XFree(string); return local; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 8080ad26a72f8e72fb4c405f5e8a8d1b82c1e30d Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Jul 22 22:25:40 2019 +0200 GCOps.c: use SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/GCOps.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c index beb9ef05f..6ab46c424 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/GCOps.c +++ b/nx-X11/programs/Xserver/hw/nxagent/GCOps.c @@ -57,6 +57,7 @@ is" without express or implied warranty. #include "Holder.h" #include "Args.h" #include "Screen.h" +#include "Utils.h" #include "compext/Compext.h" @@ -787,7 +788,7 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, srcx, srcy, width, height); #endif - free(data); + SAFE_free(data); /* * If the source is a shared memory pixmap, the @@ -1007,7 +1008,7 @@ RegionPtr nxagentCopyPlane(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, srcx, srcy, width, height); #endif - free(data); + SAFE_free(data); /* * If the source is a shared memory pixmap, the @@ -1545,7 +1546,7 @@ void nxagentFillPolygon(DrawablePtr pDrawable, GCPtr pGC, int shape, RESET_GC_TRAP(); } - free(newPoints); + SAFE_free(newPoints); } void nxagentPolyFillRect(DrawablePtr pDrawable, GCPtr pGC, -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit c260ae425475597120a65ad413d4341f7698a469 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 28 22:07:00 2019 +0200 Events.c: refactor nxagentHandleKeypress --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index d8bf4df60..666302606 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2225,8 +2225,6 @@ FIXME: Don't enqueue the KeyRelease event if the key was int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result) { - xEvent x; - if (nxagentXkbState.Initialized == 0) { if (X -> xkey.keycode == nxagentCapsLockKeycode) @@ -2258,15 +2256,15 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result) nxagentXkbState.Num = (~nxagentXkbState.Num & 1); } + nxagentLastServerTime = X -> xkey.time; + nxagentLastEventTime = nxagentLastKeyPressTime = GetTimeInMillis(); - - memset(&x, 0, sizeof(xEvent)); + + xEvent x = {0}; x.u.u.type = KeyPress; x.u.u.detail = nxagentConvertKeycode(X -> xkey.keycode); x.u.keyButtonPointer.time = nxagentLastKeyPressTime; - nxagentLastServerTime = X -> xkey.time; - mieqEnqueue(&x); CriticalOutputPending = 1; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit ceeb53f0c591b2a0b69343208282cfc2c7872509 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 28 22:10:23 2019 +0200 Keystroke.c: fix wrong return code The effect of this was that special keystrokes where detected and passed to the nxagent. E.g. pressing ctrl-alt-f for Fullscreen also produced an "f" in the current input window inside the nxagent. --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index 662da6b04..966b4f842 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -480,6 +480,9 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X) return ret; } +/* + * returns True if a special keystroke has been pressed. *result will contain the action. + */ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) { enum nxagentSpecialKeystroke stroke = find_keystroke(X); @@ -629,5 +632,5 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) case KEYSTROKE_MAX: break; } - return (*result == doNothing); + return (*result != doNothing); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 504b1400eaf0fe5f2b0544857021484213825b01 Author: Ulrich Sibiller <uli42@gmx.de> Date: Tue Jul 23 20:12:31 2019 +0200 Clipboard.c: use SAFE_free --- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c index 9c518801b..024d685ba 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Clipboard.c @@ -1783,8 +1783,7 @@ int nxagentInitClipboard(WindowPtr pWin) fprintf(stderr, "%s: Got called.\n", __func__); #endif - free(lastSelectionOwner); - lastSelectionOwner = NULL; + SAFE_free(lastSelectionOwner); lastSelectionOwner = (SelectionOwner *) malloc(nxagentMaxSelections * sizeof(SelectionOwner)); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit b3d41485dea64fb6b3e287356dcf31aa59a56032 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 28 22:09:23 2019 +0200 Events.c: add more comments and TEST output --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 666302606..846254e92 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -1113,8 +1113,8 @@ FIXME: If we don't flush the queue here, it could happen /* FIXME: Don't enqueue the KeyRelease event if the key was not already pressed. This workaround avoids a fake - KeyPress is enqueued by the XKEYBOARD extension. - Another solution would be to let the events are + KeyPress being enqueued by the XKEYBOARD extension. + Another solution would be to let the events enqueued and to remove the KeyPress afterwards. */ if (BitIsOn(inputInfo.keyboard -> key -> down, @@ -1153,6 +1153,9 @@ FIXME: Don't enqueue the KeyRelease event if the key was nxagentXkbNumTrap = 0; } + /* Calculate the time elapsed between this and the last event we + received. Add this delta to time we recorded for the last + KeyPress event we passed on to our clients. */ memset(&x, 0, sizeof(xEvent)); x.u.u.type = KeyRelease; x.u.u.detail = nxagentConvertKeycode(X.xkey.keycode); @@ -1168,8 +1171,14 @@ FIXME: Don't enqueue the KeyRelease event if the key was x.u.keyButtonPointer.time = nxagentLastEventTime; } - if (!(nxagentCheckSpecialKeystroke(&X.xkey, &result)) && sendKey == 1) + /* do not send a KeyRelease for a special keystroke since we + also did not send a KeyPress event in that case */ + if (!(nxagentCheckSpecialKeystroke(&X.xkey, &result)) && (sendKey == 1)) { + #ifdef TEST + fprintf(stderr, "%s: passing KeyRelease event to clients\n", __func__); + #endif + mieqEnqueue(&x); CriticalOutputPending = 1; @@ -1181,6 +1190,12 @@ FIXME: Don't enqueue the KeyRelease event if the key was NXShadowEvent(nxagentDisplay, X); } } + else + { + #ifdef TEST + fprintf(stderr, "%s: NOT passing KeyRelease event to clients\n", __func__); + #endif + } break; } @@ -2244,6 +2259,9 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result) if (nxagentCheckSpecialKeystroke(&X -> xkey, result)) { + #ifdef TEST + fprintf(stderr, "%s: NOT passing KeyPress event to clients\n", __func__); + #endif return 1; } @@ -2265,6 +2283,10 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result) x.u.u.detail = nxagentConvertKeycode(X -> xkey.keycode); x.u.keyButtonPointer.time = nxagentLastKeyPressTime; + #ifdef TEST + fprintf(stderr, "%s: passing KeyPress event to clients\n", __func__); + #endif + mieqEnqueue(&x); CriticalOutputPending = 1; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 7f4b50deb5a41bc88227ce925ecbb3fe713705c2 Merge: 360cb5dd9 ceeb53f0c Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Aug 16 11:50:10 2019 +0200 Merge branch 'uli42-pr/no_keystroke_passthrough' into 3.6.x Attributes GH PR #823: https://github.com/ArcticaProject/nx-libs/pull/823 nx-X11/programs/Xserver/hw/nxagent/Events.c | 36 ++++++++++++++++++++------ nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 5 +++- 2 files changed, 32 insertions(+), 9 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit f24767b3ccfa3f659846f78f32dd13e49dfb1752 Merge: 7f4b50deb 62573abf0 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Fri Aug 16 11:52:35 2019 +0200 Merge branch 'uli42-pr/improve_wait_events' into 3.6.x Attributes GH PR #828: https://github.com/ArcticaProject/nx-libs/pull/828 nx-X11/programs/Xserver/hw/nxagent/Client.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Events.c | 43 ++++++++++++++------------- nx-X11/programs/Xserver/hw/nxagent/Events.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Handlers.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 6 +--- nx-X11/programs/Xserver/hw/nxagent/Split.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Window.c | 6 +--- nxcomp/src/Loop.cpp | 4 +++ 8 files changed, 32 insertions(+), 35 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 62573abf00fb6fd6fcc642088a570400d88197d0 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat May 5 18:56:35 2018 +0200 nxagent: simplify nxagentWaitEvents() no more need to pass down a struct, we now only pass the milliseconds and let the function do the rest. --- nx-X11/programs/Xserver/hw/nxagent/Client.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Events.c | 43 ++++++++++++++------------- nx-X11/programs/Xserver/hw/nxagent/Events.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Handlers.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 6 +--- nx-X11/programs/Xserver/hw/nxagent/Split.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Window.c | 6 +--- nxcomp/src/Loop.cpp | 4 +++ 8 files changed, 32 insertions(+), 35 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.c b/nx-X11/programs/Xserver/hw/nxagent/Client.c index 206b6d8e3..6ea0c4fcf 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Client.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Client.c @@ -400,7 +400,7 @@ void nxagentWaitWakeupBySplit(ClientPtr client) fprintf(stderr, "++++++nxagentWaitWakeupBySplit: Yielding control to the NX transport.\n"); #endif - nxagentWaitEvents(nxagentDisplay, NULL); + nxagentWaitEvents(nxagentDisplay, 0); } } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 846254e92..3e62d9097 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -3309,7 +3309,6 @@ int nxagentHandleConfigureNotify(XEvent* X) ScreenPtr pScreen = nxagentScreen(X -> xconfigure.window); Bool doRandR = False; - struct timeval timeout; if (X -> xconfigure.window == nxagentDefaultWindows[pScreen -> myNum]) { @@ -3345,10 +3344,7 @@ int nxagentHandleConfigureNotify(XEvent* X) { newEvents = False; - timeout.tv_sec = 0; - timeout.tv_usec = 500 * 1000; - - nxagentWaitEvents(nxagentDisplay, &timeout); + nxagentWaitEvents(nxagentDisplay, 500); /* * This should also flush the NX link for us. @@ -3827,7 +3823,7 @@ int nxagentWaitForResource(GetResourceFuncPtr pGetResource, PredicateFuncPtr pPr while ((resource = (*pGetResource)(nxagentDisplay)) == -1) { - if (nxagentWaitEvents(nxagentDisplay, NULL) == -1) + if (nxagentWaitEvents(nxagentDisplay, 0) == -1) { return -1; } @@ -4511,14 +4507,11 @@ int nxagentPendingEvents(Display *dpy) } /* - * Blocks until an event becomes - * available. + * Blocks until an event becomes available. */ -int nxagentWaitEvents(Display *dpy, struct timeval *tm) +int nxagentWaitEvents(Display *dpy, useconds_t msec) { - XEvent ev; - #ifdef DEBUG fprintf(stderr, "nxagentWaitEvents called.\n"); #endif @@ -4526,33 +4519,41 @@ int nxagentWaitEvents(Display *dpy, struct timeval *tm) NXFlushDisplay(dpy, NXFlushLink); /* - * If the transport is not running we - * have to rely on Xlib to wait for an - * event. In this case the timeout is - * ignored. + * If the transport is not running we have to rely on Xlib to wait + * for an event. In this case the timeout is ignored. */ if (NXTransRunning(NX_FD_ANY) == 1) { - NXTransContinue(tm); + if (msec > 0) + { + struct timeval tm = { + .tv_sec = 0, + .tv_usec = msec * 1000 + }; + NXTransContinue(&tm); + } + else + { + NXTransContinue(NULL); + } } else { + XEvent ev; XPeekEvent(dpy, &ev); } /* - * Check if we encountered a display - * error. If we did, wait for the + * Check if we encountered a display error. If we did, wait for the * time requested by the caller. */ if (NXDisplayError(dpy) == 1) { - if (tm != NULL) + if (msec > 0) { - usleep(tm -> tv_sec * 1000 * 1000 + - tm -> tv_usec); + usleep(msec * 1000); } return -1; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h index 5df0e1f05..8bc798945 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h @@ -232,6 +232,6 @@ Bool nxagentPendingEvents(Display *dpy); #define nxagentCheckEvents(display, event, predicate, argument) \ XCheckIfEventNoFlush((display), (event), (predicate), (argument)) -int nxagentWaitEvents(Display *, struct timeval *); +int nxagentWaitEvents(Display *, useconds_t msec); #endif /* __Events_H__ */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c index c9aea9cdd..7311889b7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c @@ -1255,7 +1255,7 @@ void nxagentDispatchHandler(ClientPtr client, int in, int out) while (nxagentTokens.pending == TOKENS_PENDING_LIMIT) { - if (nxagentWaitEvents(nxagentDisplay, NULL) == -1) + if (nxagentWaitEvents(nxagentDisplay, 0) == -1) { nxagentTokens.pending = 0; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index d1dc37dc2..5cdb50f90 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -365,7 +365,6 @@ FIXME: We'll check for ReparentNotify and LeaveNotify events after for (int i = 0; i < 100 && nxagentWMIsRunning; i++) { - struct timeval timeout; XEvent e; #ifdef TEST @@ -379,10 +378,7 @@ FIXME: We'll check for ReparentNotify and LeaveNotify events after XSync(nxagentDisplay, 0); - timeout.tv_sec = 0; - timeout.tv_usec = 50 * 1000; - - nxagentWaitEvents(nxagentDisplay, &timeout); + nxagentWaitEvents(nxagentDisplay, 50); } } else diff --git a/nx-X11/programs/Xserver/hw/nxagent/Split.c b/nx-X11/programs/Xserver/hw/nxagent/Split.c index 11221ea99..d58d70bfd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Split.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Split.c @@ -804,7 +804,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable) fprintf(stderr, "nxagentWaitDrawable: Yielding control to the NX transport.\n"); #endif - nxagentWaitEvents(nxagentDisplay, NULL); + nxagentWaitEvents(nxagentDisplay, 0); } } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 7d390872e..1095d0797 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -849,7 +849,6 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) * Change to fullscreen mode. */ - struct timeval timeout; int i; XEvent e; @@ -874,10 +873,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) XSync(nxagentDisplay, 0); - timeout.tv_sec = 0; - timeout.tv_usec = 50 * 1000; - - nxagentWaitEvents(nxagentDisplay, &timeout); + nxagentWaitEvents(nxagentDisplay, 50); } if (i < 100) diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp index ddffcd1ca..bb8a89d64 100644 --- a/nxcomp/src/Loop.cpp +++ b/nxcomp/src/Loop.cpp @@ -1565,6 +1565,10 @@ int NXTransRunning(int fd) return (control != NULL); } +// +// FIXME: why timeval? Passing milliseconds would be more convenient, +// the timeval struct/T_timestamp could be built on demand. +// int NXTransContinue(struct timeval *selectTs) { if (control != NULL) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit c610d706b44a48fbae633ead3e241ce57c31ccc6 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Aug 10 23:56:22 2019 +0200 NXwindow.c: simplify window background code --- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index f2b10fe45..f67295c43 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -249,18 +249,14 @@ InitRootWindow(WindowPtr pWin) pWin->optional->cursor = rootCursor; rootCursor->refcnt++; -#ifdef NXAGENT_SPLASH - if (blackRoot) - pWin->background.pixel = pScreen->blackPixel; - else - pWin->background.pixel = pScreen->whitePixel; - backFlag |= CWBackPixel; -#else +#ifndef NXAGENT_SPLASH if (!blackRoot && !whiteRoot) { MakeRootTile(pWin); backFlag |= CWBackPixmap; } - else { + else +#else + { if (blackRoot) pWin->background.pixel = pScreen->blackPixel; else -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit d7d205c0d83844cb23e75d09c2b683f15fff72a9 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Aug 10 23:42:45 2019 +0200 nxagent: fix main window being garbled without inner windows Fixes ArcticaProject/nx-libs#733 --- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index 0851daf97..f2b10fe45 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -255,8 +255,6 @@ InitRootWindow(WindowPtr pWin) else pWin->background.pixel = pScreen->whitePixel; backFlag |= CWBackPixel; - - MakeRootTile(pWin); #else if (!blackRoot && !whiteRoot) { MakeRootTile(pWin); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit a539aaa6aaa7a29023ef4c3d116fc2e1a11c82c1 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Aug 11 00:21:44 2019 +0200 dix: add whiteroot flag Before there was no way of getting a white background despite having the approriate code. Backport of this commit: commit cb0a565d2b2cf8823abbd77b4426cc2237731dc1 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 18 17:04:48 2006 +0300 dix: add whiteroot flag Add a -wr option to use a white root window, and use a BackPixel rather than BackPixmap for both white and black root windows. Fixes ArcticaProject/nx-libs#832 --- nx-X11/programs/Xserver/hw/nxagent/Init.c | 3 ++- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 6 ++++-- nx-X11/programs/Xserver/os/utils.c | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index 1e24a618e..2a0bceaf5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -413,7 +413,8 @@ FIXME: These variables, if not removed at all because have probably * background. */ - blackRoot = TRUE; + if (!whiteRoot) + blackRoot = TRUE; nxagentInitKeystrokes(False); diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 6804032a2..34ac7d7d0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -142,8 +142,10 @@ to authenticate access. See also the \fIxdm\fP(1) and disables backing store support on all screens. .TP 8 .B \-br -sets the default root window to solid black instead of the standard root weave -pattern. +sets the default root window to solid black (default). +.TP 8 +.B \-wr +sets the default root window to solid white. .TP 8 .B \-c turns off key-click. diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c index 5634bb621..4d81ff927 100644 --- a/nx-X11/programs/Xserver/os/utils.c +++ b/nx-X11/programs/Xserver/os/utils.c @@ -634,6 +634,7 @@ void UseMsg(void) ErrorF("v video blanking for screen-saver\n"); ErrorF("-v screen-saver without video blanking\n"); ErrorF("-wm WhenMapped default backing-store\n"); + ErrorF("-wr create root window with white background\n"); ErrorF("-maxbigreqsize set maximal bigrequest size \n"); #ifdef PANORAMIX ErrorF("+xinerama Enable XINERAMA (PanoramiX) extension\n"); @@ -996,6 +997,8 @@ ProcessCommandLine(int argc, char *argv[]) defaultScreenSaverBlanking = DontPreferBlanking; else if ( strcmp( argv[i], "-wm") == 0) defaultBackingStore = WhenMapped; + else if ( strcmp( argv[i], "-wr") == 0) + whiteRoot = TRUE; else if ( strcmp( argv[i], "-maxbigreqsize") == 0) { if(++i < argc) { long reqSizeArg = atol(argv[i]); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit be508a447be199b24a3bb856adb64a6fbd016e9e Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Aug 15 22:04:07 2019 +0200 Splash.c: nxagentRemoveSplashWindow: drop unused parameter --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 4 ++-- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Splash.h | 3 +-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 339994e6c..7020a679e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -380,7 +380,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio if (!nxagentWMPassed && (nxagentWMtimeout < currentDispatch)) { - nxagentRemoveSplashWindow(NULL); + nxagentRemoveSplashWindow(); } nxagentClients = nClients; @@ -590,7 +590,7 @@ ProcReparentWindow(register ClientPtr client) if (!nxagentWMPassed) { - nxagentRemoveSplashWindow(pWin); + nxagentRemoveSplashWindow(); } pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client, diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index b78c01e30..c56d74236 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -681,7 +681,7 @@ Bool nxagentReconnectSession(void) #endif saveAgentState("RUNNING"); - nxagentRemoveSplashWindow(NULL); + nxagentRemoveSplashWindow(); /* * We let the proxy flush the link on our behalf diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 5cdb50f90..2355e5b61 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -3122,7 +3122,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr { if (!nxagentWMPassed) { - nxagentRemoveSplashWindow(NULL); + nxagentRemoveSplashWindow(); } NXShadowExportChanges(&numRects, &ptBox); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index e983048eb..74322648a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -378,7 +378,7 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) #endif } -void nxagentRemoveSplashWindow(WindowPtr pWin) +void nxagentRemoveSplashWindow(void) { if (nxagentReconnectTrap) return; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.h b/nx-X11/programs/Xserver/hw/nxagent/Splash.h index 2057390fc..52adbc340 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h @@ -48,7 +48,6 @@ extern Window nxagentSplashWindow; extern int nxagentWMPassed; extern void nxagentShowSplashWindow(Window); - -extern void nxagentRemoveSplashWindow(WindowPtr pWin); +extern void nxagentRemoveSplashWindow(); #endif /* __Splash_H__ */ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 470e0bd4d998e9c84e6f58736c7eb510c6223efd Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Aug 11 01:47:16 2019 +0200 Splash.c: do not wait in nxagent mode The splash window is only shown in x2go mode. In nxagent mode the splash window was also shown, but empty (and thus invisible). And the code waited for the splash window to disappear. Fix this by skipping _all_ the splash stuff in nxagent mode. --- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 5 ++++- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 15 ++++++--------- nx-X11/programs/Xserver/hw/nxagent/Window.c | 17 ++++++++++------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index f67295c43..3cd8d0ce9 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -138,11 +138,14 @@ extern void nxagentSetVersionProperty(WindowPtr pWin); void nxagentClearSplash(WindowPtr pW) { + if (!pW) + return; + ScreenPtr pScreen = pW->drawable.pScreen; if (pW->backgroundState == BackgroundPixmap) { - (*pScreen->DestroyPixmap)(pW->background.pixmap); + (*pScreen->DestroyPixmap)(pW->background.pixmap); } pW->backgroundState = BackgroundPixel; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index bc86fed36..e2e88674b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -85,6 +85,12 @@ int nxagentShowSplashWindow(Window parentWindow) XSetWindowAttributes attributes; GC gc; + /* + * Show splash window only when running as X2Go Agent + */ + if(!nxagentX2go) + return False; + #ifdef TEST fprintf(stderr, "nxagentShowSplashWindow: Got called.\n"); #endif @@ -175,15 +181,6 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) XPoint rect[4]; int w, h, c, w2, h2; - /* - * Show only X2GO Logo when running as X2Go Agent - */ - if(! nxagentX2go) - { - nxagentPixmapLogo = 0L; - return; - } - #ifdef DEBUG fprintf(stderr, "nxagentPaintLogo: Got called.\n"); #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 1095d0797..c666f9ad4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -669,15 +669,18 @@ Bool nxagentDestroyWindow(WindowPtr pWin) nxagentSplashCount); #endif - if (nxagentSplashCount == 1) + if (nxagentRootTileWindow) { - XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window); - } + if (nxagentSplashCount == 1) + { + XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window); + } - if (pWin == nxagentRootTileWindow) - { - nxagentWindowPriv(nxagentRootTileWindow)->window = None; - nxagentRootTileWindow = None; + if (pWin == nxagentRootTileWindow) + { + nxagentWindowPriv(nxagentRootTileWindow)->window = None; + nxagentRootTileWindow = None; + } } pWindowPriv->window = None; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 612cbcc4348f2400c1c0b52e33cb9fe2c760d3fc Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Aug 11 01:59:42 2019 +0200 Splash.c: code cleanup --- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 44 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 387c859ae..e983048eb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -64,7 +64,7 @@ int nxagentLogoRed; int nxagentLogoBlack; int nxagentLogoGray; -void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); +static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); /* * From Screen.c. @@ -92,14 +92,14 @@ void nxagentShowSplashWindow(Window parentWindow) return; #ifdef TEST - fprintf(stderr, "nxagentShowSplashWindow: Got called.\n"); + fprintf(stderr, "%s: Got called.\n", __func__); #endif #ifdef NXAGENT_TIMESTAMP { extern unsigned long startTime; - fprintf(stderr, "nxagentShowSplashWindow: Initializing splash start at [%d] milliseconds.\n", + fprintf(stderr, "%s: Initializing splash start at [%d] milliseconds.\n", __func__, GetTimeInMillis() - startTime); } #endif @@ -139,7 +139,7 @@ void nxagentShowSplashWindow(Window parentWindow) getAttributes.height = nxagentOption(RootHeight); #ifdef TEST - fprintf(stderr, "nxagentShowSplashWindow: Going to create new splash window.\n"); + fprintf(stderr, "%s: Going to create new splash window.\n", __func__); #endif nxagentSplashWindow = @@ -152,7 +152,7 @@ void nxagentShowSplashWindow(Window parentWindow) BlackPixel (nxagentDisplay, 0)); #ifdef TEST - fprintf(stderr, "nxagentShowSplashWindow: Created new splash window with id [%ld].\n", + fprintf(stderr, "%s: Created new splash window with id [%ld].\n", __func__, nxagentSplashWindow); #endif @@ -168,7 +168,7 @@ void nxagentShowSplashWindow(Window parentWindow) #ifdef NXAGENT_TIMESTAMP { extern unsigned long startTime; - fprintf(stderr, "nxagentShowSplashWindow: Splash ends [%d] milliseconds.\n", + fprintf(stderr, "%s: Splash ends [%d] milliseconds.\n", __func__, GetTimeInMillis() - startTime); } #endif @@ -176,26 +176,25 @@ void nxagentShowSplashWindow(Window parentWindow) void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) { - XPoint rect[4]; - int w, h, c, w2, h2; - #ifdef DEBUG - fprintf(stderr, "nxagentPaintLogo: Got called.\n"); + fprintf(stderr, "%s: Got called.\n", __func__); #endif #ifdef NXAGENT_LOGO_DEBUG - fprintf(stderr, "nxagentPaintLogo: begin\n"); - fprintf(stderr, "nxagentPaintLogo: gen params are: w=%d h=%d d=%d r=%x w=%x b=%x\n",width, height, + fprintf(stderr, "%s: begin\n", __func__); + fprintf(stderr, "%s: gen params are: w=%d h=%d d=%d r=%x w=%x b=%x\n", __func__, + width, height, nxagentLogoDepth, nxagentLogoRed, nxagentLogoWhite, nxagentLogoBlack); #endif - w = width/scale; - h = height/scale; + int w = width/scale; + int h = height/scale; - w2 = w/2; - h2 = h/2; + int w2 = w/2; + int h2 = h/2; + int c; if (height > width) { c = w/30; @@ -205,6 +204,7 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) c = w/48; } + XPoint rect[4]; rect[0].x = 0; rect[0].y = 0; rect[1].x = 0; rect[1].y = h; rect[2].x = w; rect[2].y = h; @@ -225,7 +225,7 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); #ifdef NXAGENT_LOGO_DEBUG - fprintf(stderr, "filled first poly\n"); + fprintf(stderr, "%s: filled first poly\n", __func__); #endif XSetForeground(nxagentDisplay, gc, nxagentLogoRed); @@ -374,16 +374,17 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) XSetWindowBackgroundPixmap(nxagentDisplay, win, nxagentPixmapLogo); #ifdef NXAGENT_LOGO_DEBUG - fprintf(stderr, "nxagentPaintLogo: end\n"); + fprintf(stderr, "%s: end\n", __func__); #endif } void nxagentRemoveSplashWindow(WindowPtr pWin) { - if (nxagentReconnectTrap) return; + if (nxagentReconnectTrap) + return; #ifdef TEST - fprintf(stderr, "nxagentRemoveSplashWindow: Destroying the splash window.\n"); + fprintf(stderr, "%s: Destroying the splash window.\n", __func__); #endif if (!nxagentWMPassed) @@ -402,7 +403,7 @@ void nxagentRemoveSplashWindow(WindowPtr pWin) nxagentRefreshWindows(screenInfo.screens[0]->root); #ifdef TEST - fprintf(stderr, "nxagentRemoveSplashWindow: setting the ownership of %s (%d) on window 0x%lx\n", + fprintf(stderr, "%s: setting the ownership of %s (%d) on window 0x%lx\n", __func__ "NX_CUT_BUFFER_SERVER", (int)serverCutProperty, nxagentWindow(screenInfo.screens[0]->root)); #endif @@ -413,7 +414,6 @@ void nxagentRemoveSplashWindow(WindowPtr pWin) if (nxagentPixmapLogo) { XFreePixmap(nxagentDisplay, nxagentPixmapLogo); - nxagentPixmapLogo = (Pixmap) 0; } } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 3c92d88973f18ff89b9d039ff51370650a2d0ef4 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Aug 11 01:51:37 2019 +0200 Splash.c: drop return code of nxagentShowSplashWindow nobody was checking it. --- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 6 ++---- nx-X11/programs/Xserver/hw/nxagent/Splash.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index e2e88674b..387c859ae 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -78,7 +78,7 @@ extern Atom nxagentWMStart; extern Atom serverCutProperty; -int nxagentShowSplashWindow(Window parentWindow) +void nxagentShowSplashWindow(Window parentWindow) { XWindowAttributes getAttributes; XWindowChanges values; @@ -89,7 +89,7 @@ int nxagentShowSplashWindow(Window parentWindow) * Show splash window only when running as X2Go Agent */ if(!nxagentX2go) - return False; + return; #ifdef TEST fprintf(stderr, "nxagentShowSplashWindow: Got called.\n"); @@ -172,8 +172,6 @@ int nxagentShowSplashWindow(Window parentWindow) GetTimeInMillis() - startTime); } #endif - - return True; } void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.h b/nx-X11/programs/Xserver/hw/nxagent/Splash.h index 444f1eed0..2057390fc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h @@ -47,7 +47,7 @@ extern Window nxagentSplashWindow; extern int nxagentWMPassed; -extern int nxagentShowSplashWindow(Window); +extern void nxagentShowSplashWindow(Window); extern void nxagentRemoveSplashWindow(WindowPtr pWin); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 074821a84041de09abb8b2aac5ec6559bb546d0c Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Aug 15 22:33:35 2019 +0200 Splash.c: make Splash logo work with white background (-wr) mode, too --- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 53 +++++++++++++++++------------ 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 91f599cc6..2945717c4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -58,10 +58,10 @@ * Colors used to paint the splash screen. */ -#define nxagentLogoWhite 0xffffff -#define nxagentLogoRed 0xff0000 -#define nxagentLogoBlack 0x000000 -#define nxagentLogoGray 0x222222 +#define nxagentLogoWhite 0xffffff +#define nxagentLogoBlack 0x000000 +#define nxagentLogoDarkGray 0x222222 +#define nxagentLogoLightGray 0xbbbbbb static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); @@ -183,9 +183,9 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) #ifdef NXAGENT_LOGO_DEBUG fprintf(stderr, "%s: begin\n", __func__); - fprintf(stderr, "%s: gen params are: w=%d h=%d d=%d r=%x w=%x b=%x\n", __func__, + fprintf(stderr, "%s: gen params are: w=%d h=%d d=%d w=%x b=%x g1=%x g2=%x \n", __func__, width, height, depth, - nxagentLogoRed, nxagentLogoWhite, nxagentLogoBlack); + nxagentLogoWhite, nxagentLogoBlack, nxagentLogoDarkGray, nxagentLogoLightGray); #endif int w = width/scale; @@ -204,43 +204,52 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) c = w/48; } - XPoint rect[4]; - rect[0].x = 0; rect[0].y = 0; - rect[1].x = 0; rect[1].y = h; - rect[2].x = w; rect[2].y = h; - rect[3].x = w; rect[3].y = 0; - XSetFunction(nxagentDisplay, gc, GXcopy); XSetFillStyle(nxagentDisplay, gc, FillSolid); - XSetForeground(nxagentDisplay, gc, nxagentLogoBlack); - XSetBackground(nxagentDisplay, gc, nxagentLogoRed); - - nxagentPixmapLogo = XCreatePixmap(nxagentDisplay, win, width, height, nxagentLogoDepth); + nxagentPixmapLogo = XCreatePixmap(nxagentDisplay, win, width, height, depth); if (!nxagentPixmapLogo) { return; } + if (blackRoot) + { + XSetForeground(nxagentDisplay, gc, nxagentLogoBlack); + XSetBackground(nxagentDisplay, gc, nxagentLogoWhite); + } + else + { + XSetForeground(nxagentDisplay, gc, nxagentLogoWhite); + XSetBackground(nxagentDisplay, gc, nxagentLogoBlack); + } + + XPoint rect[4]; + rect[0].x = 0; rect[0].y = 0; + rect[1].x = 0; rect[1].y = h; + rect[2].x = w; rect[2].y = h; + rect[3].x = w; rect[3].y = 0; + + /* paint background */ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); #ifdef NXAGENT_LOGO_DEBUG fprintf(stderr, "%s: filled first poly\n", __func__); #endif - XSetForeground(nxagentDisplay, gc, nxagentLogoRed); - XSetBackground(nxagentDisplay, gc, nxagentLogoWhite); - /* * Draw X2GO Logo */ + if (blackRoot) + XSetForeground(nxagentDisplay, gc, nxagentLogoDarkGray); + else + XSetForeground(nxagentDisplay, gc, nxagentLogoLightGray); + /* - * Begin 'X'. + * Start 'X'. */ - XSetForeground(nxagentDisplay, gc, nxagentLogoGray); - XSetBackground(nxagentDisplay, gc, nxagentLogoWhite); rect[0].x = w2-7*c; rect[0].y = h2-5*c; rect[1].x = w2-8*c; rect[1].y = h2-5*c; rect[2].x = w2-4*c; rect[2].y = h2+3*c; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit afebb8211b6f6d47e8a17d21f64ec3ffc8ea82e3 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Aug 15 22:10:45 2019 +0200 Splash.c: remove global variables for colors Make them defines. Also determine the screen depth dynamically. --- nx-X11/programs/Xserver/hw/nxagent/Display.c | 16 ---------------- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 16 ++++++++-------- nx-X11/programs/Xserver/hw/nxagent/Splash.h | 6 ------ 3 files changed, 8 insertions(+), 30 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 127874962..4bce82783 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -1386,15 +1386,6 @@ FIXME: Use of nxagentParentWindow is strongly deprecated. nxagentChangeOption(BorderWidth, 1); } - nxagentLogoDepth = DefaultDepth(nxagentDisplay, - DefaultScreen(nxagentDisplay) - ); - - nxagentLogoBlack = 0x000000; - nxagentLogoRed = 0xff0000; - nxagentLogoWhite = 0xffffff; - nxagentLogoGray = 0x222222; - #ifdef WATCH fprintf(stderr, "nxagentOpenDisplay: Watchpoint 5.1.\n"); @@ -2860,13 +2851,6 @@ Bool nxagentReconnectDisplay(void *p0) nxagentConfineWindow); #endif - nxagentLogoDepth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay)); - - nxagentLogoBlack = 0x000000; - nxagentLogoRed = 0xff0000; - nxagentLogoWhite = 0xffffff; - nxagentLogoGray = 0x222222; - useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape); /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 74322648a..91f599cc6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -58,11 +58,10 @@ * Colors used to paint the splash screen. */ -int nxagentLogoDepth; -int nxagentLogoWhite; -int nxagentLogoRed; -int nxagentLogoBlack; -int nxagentLogoGray; +#define nxagentLogoWhite 0xffffff +#define nxagentLogoRed 0xff0000 +#define nxagentLogoBlack 0x000000 +#define nxagentLogoGray 0x222222 static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); @@ -176,6 +175,8 @@ void nxagentShowSplashWindow(Window parentWindow) void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) { + int depth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay)); + #ifdef DEBUG fprintf(stderr, "%s: Got called.\n", __func__); #endif @@ -183,9 +184,8 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) #ifdef NXAGENT_LOGO_DEBUG fprintf(stderr, "%s: begin\n", __func__); fprintf(stderr, "%s: gen params are: w=%d h=%d d=%d r=%x w=%x b=%x\n", __func__, - width, height, - nxagentLogoDepth, nxagentLogoRed, - nxagentLogoWhite, nxagentLogoBlack); + width, height, depth, + nxagentLogoRed, nxagentLogoWhite, nxagentLogoBlack); #endif int w = width/scale; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.h b/nx-X11/programs/Xserver/hw/nxagent/Splash.h index 52adbc340..5f7547e57 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h @@ -37,12 +37,6 @@ extern int XdmcpTimeOutRtx; extern int XdmcpStartTime; extern int nxagentXdmcpUp; -extern int nxagentLogoDepth; -extern int nxagentLogoWhite; -extern int nxagentLogoRed; -extern int nxagentLogoBlack; -extern int nxagentLogoGray; - extern Window nxagentSplashWindow; extern int nxagentWMPassed; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 8fcaafab426686f1e67d4535b391534d210f482c Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Aug 15 22:06:14 2019 +0200 nxagent: drop nxagentRootTileWindow We either use a solid black or a white background and no backround pixmap. So nxagentRootTileWindow is always empty and we can drop all stuff around it. remove nxagentSplashCount, too, since it is no longer checked anywhere. --- nx-X11/programs/Xserver/dix/window.c | 2 - nx-X11/programs/Xserver/hw/nxagent/Events.c | 15 ----- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 86 ++------------------------- nx-X11/programs/Xserver/hw/nxagent/Window.c | 51 ---------------- 4 files changed, 4 insertions(+), 150 deletions(-) diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c index 79045767f..ee146d783 100644 --- a/nx-X11/programs/Xserver/dix/window.c +++ b/nx-X11/programs/Xserver/dix/window.c @@ -305,7 +305,6 @@ SetWindowToDefaults(register WindowPtr pWin) #endif } -#ifndef NXAGENT_SERVER static void MakeRootTile(WindowPtr pWin) { @@ -348,7 +347,6 @@ MakeRootTile(WindowPtr pWin) FreeScratchGC(pGC); } -#endif /* NXAGENT_SERVER */ WindowPtr AllocateWindow(ScreenPtr pScreen) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 3e62d9097..fda84cf9b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -124,7 +124,6 @@ extern Bool nxagentOnce; extern WindowPtr nxagentRootTileWindow; -extern int nxagentSplashCount; extern int nxagentLastClipboardClient; @@ -2453,20 +2452,6 @@ FIXME: This can be maybe optimized by consuming the } } - if (nxagentRootTileWindow != NULL) - { - if (nxagentWindowPriv(nxagentRootTileWindow) -> window == nxagentWindowPriv(pWin) -> window && - nxagentSplashCount == 1 && X -> xexpose.count == 0) - { - #ifdef DEBUG - fprintf(stderr, "nxagentHandleExposeEvent: Clearing root tile window id [%u].\n", - nxagentWindowPriv(nxagentRootTileWindow) -> window); - #endif - - XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window); - } - } - RegionUninit(&sum); } diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index 3cd8d0ce9..3dcb552e5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -114,10 +114,6 @@ Equipment Corporation. #include "Drawable.h" #include "Colormap.h" -/* prototypes (only MakeRootTile() required here) */ - -static void MakeRootTile(WindowPtr pWin); - #include "../../dix/window.c" extern Bool nxagentWMIsRunning; @@ -132,72 +128,8 @@ extern Bool nxagentScreenTrap; #undef TEST #undef DEBUG -WindowPtr nxagentRootTileWindow; - extern void nxagentSetVersionProperty(WindowPtr pWin); -void nxagentClearSplash(WindowPtr pW) -{ - if (!pW) - return; - - ScreenPtr pScreen = pW->drawable.pScreen; - - if (pW->backgroundState == BackgroundPixmap) - { - (*pScreen->DestroyPixmap)(pW->background.pixmap); - } - - pW->backgroundState = BackgroundPixel; - pW->background.pixel = nxagentLogoBlack; - - (*pScreen->ChangeWindowAttributes)(pW, CWBackPixmap|CWBackPixel); -} - -static void -MakeRootTile(WindowPtr pWin) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - GCPtr pGC; - unsigned char back[128]; - int len = BitmapBytePad(sizeof(long)); - register unsigned char *from, *to; - register int i, j; - - pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4, - pScreen->rootDepth, 0); - - pWin->backgroundState = BackgroundPixmap; - pGC = GetScratchGC(pScreen->rootDepth, pScreen); - if (!pWin->background.pixmap || !pGC) - FatalError("could not create root tile"); - - { - CARD32 attributes[2]; - - attributes[0] = pScreen->whitePixel; - attributes[1] = pScreen->blackPixel; - - (void)ChangeGC(pGC, GCForeground | GCBackground, attributes); - } - - ValidateGC((DrawablePtr)pWin->background.pixmap, pGC); - - from = (screenInfo.bitmapBitOrder == LSBFirst) ? _back_lsb : _back_msb; - to = back; - - for (i = 4; i > 0; i--, from++) - for (j = len; j > 0; j--) - *to++ = *from; - - (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap, pGC, 1, - 0, 0, len, 4, 0, XYBitmap, (char *)back); - - FreeScratchGC(pGC); - - nxagentRootTileWindow = pWin; -} - void InitRootWindow(WindowPtr pWin) { @@ -252,21 +184,11 @@ InitRootWindow(WindowPtr pWin) pWin->optional->cursor = rootCursor; rootCursor->refcnt++; -#ifndef NXAGENT_SPLASH - if (!blackRoot && !whiteRoot) { - MakeRootTile(pWin); - backFlag |= CWBackPixmap; - } + if (blackRoot) + pWin->background.pixel = pScreen->blackPixel; else -#else - { - if (blackRoot) - pWin->background.pixel = pScreen->blackPixel; - else - pWin->background.pixel = pScreen->whitePixel; - backFlag |= CWBackPixel; - } -#endif + pWin->background.pixel = pScreen->whitePixel; + backFlag |= CWBackPixel; pWin->backingStore = defaultBackingStore; pWin->forcedBS = (defaultBackingStore != NotUseful); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index c666f9ad4..6b186ab27 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -118,12 +118,6 @@ extern WindowPtr nxagentRootTileWindow; extern Bool nxagentReportPrivateWindowIds; -/* - * Also referenced in Events.c. - */ - -int nxagentSplashCount = 0; - #define RECTLIMIT 25 #define BSPIXMAPLIMIT 128 @@ -155,12 +149,6 @@ Bool nxagentIsIconic(WindowPtr); int GetWindowProperty(WindowPtr, Atom, long, long, Bool, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**); -/* - * From NXwindow.c. - */ - -void nxagentClearSplash(WindowPtr pWin); - /* * Other local functions. */ @@ -268,16 +256,6 @@ Bool nxagentCreateWindow(WindowPtr pWin) return True; } - nxagentSplashCount++; - - if (nxagentSplashCount == 2) - { - nxagentClearSplash(nxagentRootTileWindow); - } - #ifdef NXAGENT_LOGO_DEBUG - fprintf(stderr, "nxagentCreateWindow: nxagentSplashCount [%d]\n", nxagentSplashCount); - #endif - if (pWin->drawable.class == InputOnly) { mask = CWEventMask; @@ -487,14 +465,6 @@ Bool nxagentCreateWindow(WindowPtr pWin) nxagentWindowPriv(pWin)->siblingAbove = None; nxagentWindowPriv(pWin)->pPicture = NULL; - if (nxagentRootTileWindow) - { - if (nxagentWindowPriv(pWin)->window != nxagentWindowPriv(nxagentRootTileWindow)->window) - { - XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow)->window); - } - } - if (pWin->nextSib) { nxagentWindowPriv(pWin->nextSib)->siblingAbove = nxagentWindow(pWin); @@ -662,27 +632,6 @@ Bool nxagentDestroyWindow(WindowPtr pWin) nxagentRootlessDelTopLevelWindow(pWin); } - nxagentSplashCount--; - - #ifdef DEBUG - fprintf(stderr, "nxagentDestroyWindow: The splash counter is now [%d].\n", - nxagentSplashCount); - #endif - - if (nxagentRootTileWindow) - { - if (nxagentSplashCount == 1) - { - XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window); - } - - if (pWin == nxagentRootTileWindow) - { - nxagentWindowPriv(nxagentRootTileWindow)->window = None; - nxagentRootTileWindow = None; - } - } - pWindowPriv->window = None; if (pWin -> optional) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 24f392c4a7f7f1a838f67eb7ea8fd947fe233f30 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 12:46:21 2019 +0200 nxagent: rename nxagentWMStart to nxagentReadyAtom This better reflects its purpose: Tell listeners we are ready. --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 4 ++-- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index e27d37056..b089ef303 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -146,7 +146,7 @@ Window nxagentInputWindows[MAXSCREENS]; Window nxagentScreenSaverWindows[MAXSCREENS]; #ifdef NXAGENT_ONSTART -Atom nxagentWMStart; +Atom nxagentReadyAtom; #endif ScreenPtr nxagentDefaultScreen = NULL; @@ -932,7 +932,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, nxagentQueryAtoms(pScreen); #ifdef NXAGENT_ONSTART - nxagentWMStart = nxagentAtoms[3]; /* WM_NX_READY */ + nxagentReadyAtom = nxagentAtoms[3]; /* WM_NX_READY */ #endif /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 28c5599af..c3f6f101e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -72,7 +72,7 @@ static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height * From Screen.c. */ -extern Atom nxagentWMStart; +extern Atom nxagentReadyAtom; /* * From Clipboard.c. @@ -106,7 +106,7 @@ void nxagentShowSplashWindow(Window parentWindow) } #endif - XSetSelectionOwner(nxagentDisplay, nxagentWMStart, None, CurrentTime); + XSetSelectionOwner(nxagentDisplay, nxagentReadyAtom, None, CurrentTime); nxagentWMPassed = False; @@ -401,7 +401,7 @@ void nxagentRemoveSplashWindow(void) if (!nxagentWMPassed) { - XSetSelectionOwner(nxagentDisplay, nxagentWMStart, + XSetSelectionOwner(nxagentDisplay, nxagentReadyAtom, nxagentDefaultWindows[0], CurrentTime); nxagentWMPassed = True; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 798a053b4aa567892466306c1be3d6697a2acfe4 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 12:38:53 2019 +0200 Splash.c: move some variables to Splash.c They belong there... --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 2 -- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 2355e5b61..e27d37056 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -147,8 +147,6 @@ Window nxagentScreenSaverWindows[MAXSCREENS]; #ifdef NXAGENT_ONSTART Atom nxagentWMStart; -Window nxagentSplashWindow = None; -Pixmap nxagentPixmapLogo; #endif ScreenPtr nxagentDefaultScreen = NULL; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 2945717c4..28c5599af 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -63,6 +63,9 @@ #define nxagentLogoDarkGray 0x222222 #define nxagentLogoLightGray 0xbbbbbb +Pixmap nxagentPixmapLogo; +Window nxagentSplashWindow = None; + static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); /* -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 2228513a66870198af2e0c792660c8f6f27e6edf Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 12:54:10 2019 +0200 nxagent: drop NXAGENT_SPLASH There was only one (commented) section using it. --- nx-X11/programs/Xserver/hw/nxagent/Imakefile | 1 - nx-X11/programs/Xserver/hw/nxagent/Window.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index 5a3a999f4..b3450440e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -240,7 +240,6 @@ DEFINES = \ -DNXAGENT_VISIBILITY \ -DNXAGENT_WAKEUP=1000 \ -DNXAGENT_ONSTART \ - -DNXAGENT_SPLASH \ -DNXAGENT_ARTSD \ -DNXAGENT_RANDR_MODE_PREFIX \ -UNX_DEBUG_INPUT \ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 6b186ab27..192feec40 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -1438,7 +1438,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) #endif } - #ifdef NXAGENT_SPLASH /* * This should bring again the splash window * on top, so why the else clause? Is this @@ -1464,7 +1463,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) * } * } */ - #endif /* NXAGENT_SPLASH */ if (mask & CW_RootlessRestack) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit ab80152370da820cb42f22a500c1342bbb3ca3c8 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 13:02:01 2019 +0200 nxagent: move nxagentWMPassed to Splash.c It is only relevant there. --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 10 +++------- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 5 +---- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 4 ++++ nx-X11/programs/Xserver/hw/nxagent/Splash.h | 2 -- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index c49cae51e..0ad26b0bb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -144,7 +144,6 @@ void nxagentListRemoteFonts(const char *, int); #ifdef NXAGENT_ONSTART unsigned int nxagentWMtimeout = 0; #endif -Bool nxagentWMPassed = False; /* * Timeouts based on screen saver time. @@ -380,9 +379,9 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio * that the agent is ready. */ - if (!nxagentWMPassed && (nxagentWMtimeout < currentDispatch)) + if (nxagentWMtimeout < currentDispatch) { - nxagentRemoveSplashWindow(); + nxagentRemoveSplashWindow(); } nxagentClients = nClients; @@ -590,10 +589,7 @@ ProcReparentWindow(register ClientPtr client) if (!pWin) return(BadWindow); - if (!nxagentWMPassed) - { - nxagentRemoveSplashWindow(); - } + nxagentRemoveSplashWindow(); pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client, DixWriteAccess); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index b089ef303..93110f782 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -3118,10 +3118,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr if (result == 1) { - if (!nxagentWMPassed) - { - nxagentRemoveSplashWindow(); - } + nxagentRemoveSplashWindow(); NXShadowExportChanges(&numRects, &ptBox); pBox = (BoxRec *)ptBox; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 6fa092a7d..8f3bc1ede 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -65,6 +65,7 @@ Pixmap nxagentPixmapLogo; Window nxagentSplashWindow = None; +Bool nxagentWMPassed = False; static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); @@ -396,6 +397,9 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) void nxagentRemoveSplashWindow(void) { + if (nxagentWMPassed) + return; + if (nxagentReconnectTrap) return; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.h b/nx-X11/programs/Xserver/hw/nxagent/Splash.h index 5f7547e57..a43801469 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h @@ -39,8 +39,6 @@ extern int nxagentXdmcpUp; extern Window nxagentSplashWindow; -extern int nxagentWMPassed; - extern void nxagentShowSplashWindow(Window); extern void nxagentRemoveSplashWindow(); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit b04b58badd9007cc92cb9fc68ecb85c3e3388e25 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 12:55:28 2019 +0200 nxagent: add NXAGENT_ONSTART where missing There were some locations referenceing a variable that was only availabe with NXAGENT_ONSTART set --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 2 ++ nx-X11/programs/Xserver/hw/nxagent/Splash.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 7020a679e..c49cae51e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -141,7 +141,9 @@ void nxagentWaitDisplay(void); void nxagentListRemoteFonts(const char *, int); +#ifdef NXAGENT_ONSTART unsigned int nxagentWMtimeout = 0; +#endif Bool nxagentWMPassed = False; /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index c3f6f101e..6fa092a7d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -72,7 +72,9 @@ static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height * From Screen.c. */ +#ifdef NXAGENT_ONSTART extern Atom nxagentReadyAtom; +#endif /* * From Clipboard.c. @@ -106,7 +108,9 @@ void nxagentShowSplashWindow(Window parentWindow) } #endif + #ifdef NXAGENT_ONSTART XSetSelectionOwner(nxagentDisplay, nxagentReadyAtom, None, CurrentTime); + #endif nxagentWMPassed = False; @@ -401,8 +405,10 @@ void nxagentRemoveSplashWindow(void) if (!nxagentWMPassed) { + #ifdef NXAGENT_ONSTART XSetSelectionOwner(nxagentDisplay, nxagentReadyAtom, nxagentDefaultWindows[0], CurrentTime); + #endif nxagentWMPassed = True; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit c34d1b2011236c7b69dac09b78cdfb972e20ef6a Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 13:08:42 2019 +0200 NXdispatch.c: drop currentDispatch variable was only used once --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 0ad26b0bb..da7a55b69 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -244,8 +244,6 @@ Dispatch(void) register HWEventQueuePtr* icheck = checkForInput; long start_tick; - unsigned long currentDispatch = 0; - nextFreeClientID = 1; InitSelections(); nClients = 0; @@ -371,18 +369,15 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio #ifdef NXAGENT_ONSTART - currentDispatch = GetTimeInMillis(); - - /* - * If the timeout is expired set the - * selection informing the NX client - * that the agent is ready. - */ + /* + * If the timeout is expired set the selection informing the + * NX client that the agent is ready. + */ - if (nxagentWMtimeout < currentDispatch) - { - nxagentRemoveSplashWindow(); - } + if (nxagentWMtimeout < GetTimeInMillis()) + { + nxagentRemoveSplashWindow(); + } nxagentClients = nClients; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 8b15d574b49857cdf4df0fd813d68b750d8aee5f Merge: f24767b3c 3563959c0 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Aug 27 08:14:23 2019 +0200 Merge branch 'uli42-pr/fix_background' into 3.6.x Attributes GH PR #836: https://github.com/ArcticaProject/nx-libs/pull/836 nx-X11/programs/Xserver/dix/window.c | 2 - nx-X11/programs/Xserver/hw/nxagent/Display.c | 16 --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 15 --- nx-X11/programs/Xserver/hw/nxagent/Imakefile | 1 - nx-X11/programs/Xserver/hw/nxagent/Init.c | 3 +- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 36 ++---- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 81 -------------- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 11 +- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 135 +++++++++++++---------- nx-X11/programs/Xserver/hw/nxagent/Splash.h | 13 +-- nx-X11/programs/Xserver/hw/nxagent/Window.c | 50 --------- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 6 +- nx-X11/programs/Xserver/os/utils.c | 3 + 14 files changed, 103 insertions(+), 271 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 3563959c011c00dcbd9dace4d882b222aa31b27f Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 13:11:38 2019 +0200 NXdispatch.c: move nxagentWMtimeout into the function it is only used there, no need for a global variable --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index da7a55b69..10616834e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -141,10 +141,6 @@ void nxagentWaitDisplay(void); void nxagentListRemoteFonts(const char *, int); -#ifdef NXAGENT_ONSTART -unsigned int nxagentWMtimeout = 0; -#endif - /* * Timeouts based on screen saver time. */ @@ -264,12 +260,11 @@ Dispatch(void) #ifdef NXAGENT_ONSTART /* - * Set NX_WM property (used by NX client to identify - * the agent's window) three seconds since the first - * client connects. + * Set NX_WM property (used by NX client to identify the agent's + * window) three seconds since the first client connects. */ - nxagentWMtimeout = GetTimeInMillis() + 3000; + unsigned int nxagentWMtimeout = GetTimeInMillis() + 3000; #endif -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit e7451477e00896b188188af622ab1a870715203f Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 28 22:07:00 2019 +0200 Events.c: refactor nxagentHandleKeypress --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 74781f638..c93842305 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -2222,8 +2222,6 @@ FIXME: Don't enqueue the KeyRelease event if the key was int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result) { - xEvent x; - if (nxagentXkbState.Initialized == 0) { if (X -> xkey.keycode == nxagentCapsLockKeycode) @@ -2255,15 +2253,15 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result) nxagentXkbState.Num = (~nxagentXkbState.Num & 1); } + nxagentLastServerTime = X -> xkey.time; + nxagentLastEventTime = nxagentLastKeyPressTime = GetTimeInMillis(); - - memset(&x, 0, sizeof(xEvent)); + + xEvent x = {0}; x.u.u.type = KeyPress; x.u.u.detail = nxagentConvertKeycode(X -> xkey.keycode); x.u.keyButtonPointer.time = nxagentLastKeyPressTime; - nxagentLastServerTime = X -> xkey.time; - mieqEnqueue(&x); CriticalOutputPending = 1; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 1d32e5368ab8d94a100144f741b00f4506e6eeff Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 28 22:10:23 2019 +0200 Keystroke.c: fix wrong return code The effect of this was that special keystrokes where detected and passed to the nxagent. E.g. pressing ctrl-alt-f for Fullscreen also produced an "f" in the current input window inside the nxagent. --- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index d524e9e0b..fe7e10d82 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -480,6 +480,9 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X) return ret; } +/* + * returns True if a special keystroke has been pressed. *result will contain the action. + */ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) { enum nxagentSpecialKeystroke stroke = find_keystroke(X); @@ -629,5 +632,5 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) case KEYSTROKE_MAX: break; } - return (*result == doNothing); + return (*result != doNothing); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit bcbf255104a1214c83e31a4266e38eb3c6369def Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Jun 28 22:09:23 2019 +0200 Events.c: add more comments and TEST output --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index c93842305..89030b1b0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -1110,8 +1110,8 @@ FIXME: If we don't flush the queue here, it could happen /* FIXME: Don't enqueue the KeyRelease event if the key was not already pressed. This workaround avoids a fake - KeyPress is enqueued by the XKEYBOARD extension. - Another solution would be to let the events are + KeyPress being enqueued by the XKEYBOARD extension. + Another solution would be to let the events enqueued and to remove the KeyPress afterwards. */ if (BitIsOn(inputInfo.keyboard -> key -> down, @@ -1150,6 +1150,9 @@ FIXME: Don't enqueue the KeyRelease event if the key was nxagentXkbNumTrap = 0; } + /* Calculate the time elapsed between this and the last event we + received. Add this delta to time we recorded for the last + KeyPress event we passed on to our clients. */ memset(&x, 0, sizeof(xEvent)); x.u.u.type = KeyRelease; x.u.u.detail = nxagentConvertKeycode(X.xkey.keycode); @@ -1165,8 +1168,14 @@ FIXME: Don't enqueue the KeyRelease event if the key was x.u.keyButtonPointer.time = nxagentLastEventTime; } - if (!(nxagentCheckSpecialKeystroke(&X.xkey, &result)) && sendKey == 1) + /* do not send a KeyRelease for a special keystroke since we + also did not send a KeyPress event in that case */ + if (!(nxagentCheckSpecialKeystroke(&X.xkey, &result)) && (sendKey == 1)) { + #ifdef TEST + fprintf(stderr, "%s: passing KeyRelease event to clients\n", __func__); + #endif + mieqEnqueue(&x); CriticalOutputPending = 1; @@ -1178,6 +1187,12 @@ FIXME: Don't enqueue the KeyRelease event if the key was NXShadowEvent(nxagentDisplay, X); } } + else + { + #ifdef TEST + fprintf(stderr, "%s: NOT passing KeyRelease event to clients\n", __func__); + #endif + } break; } @@ -2241,6 +2256,9 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result) if (nxagentCheckSpecialKeystroke(&X -> xkey, result)) { + #ifdef TEST + fprintf(stderr, "%s: NOT passing KeyPress event to clients\n", __func__); + #endif return 1; } @@ -2262,6 +2280,10 @@ int nxagentHandleKeyPress(XEvent *X, enum HandleEventResult *result) x.u.u.detail = nxagentConvertKeycode(X -> xkey.keycode); x.u.keyButtonPointer.time = nxagentLastKeyPressTime; + #ifdef TEST + fprintf(stderr, "%s: passing KeyPress event to clients\n", __func__); + #endif + mieqEnqueue(&x); CriticalOutputPending = 1; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 17495dd6aedd27fb8a083fc841a7f297e6a8da8f Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat May 5 18:56:35 2018 +0200 nxagent: simplify nxagentWaitEvents() no more need to pass down a struct, we now only pass the milliseconds and let the function do the rest. --- nx-X11/programs/Xserver/hw/nxagent/Client.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Events.c | 43 ++++++++++++++------------- nx-X11/programs/Xserver/hw/nxagent/Events.h | 2 +- nx-X11/programs/Xserver/hw/nxagent/Handlers.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 6 +--- nx-X11/programs/Xserver/hw/nxagent/Split.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Window.c | 6 +--- nxcomp/src/Loop.cpp | 4 +++ 8 files changed, 32 insertions(+), 35 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.c b/nx-X11/programs/Xserver/hw/nxagent/Client.c index 206b6d8e3..6ea0c4fcf 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Client.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Client.c @@ -400,7 +400,7 @@ void nxagentWaitWakeupBySplit(ClientPtr client) fprintf(stderr, "++++++nxagentWaitWakeupBySplit: Yielding control to the NX transport.\n"); #endif - nxagentWaitEvents(nxagentDisplay, NULL); + nxagentWaitEvents(nxagentDisplay, 0); } } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 89030b1b0..0223667c4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -3303,7 +3303,6 @@ int nxagentHandleConfigureNotify(XEvent* X) ScreenPtr pScreen = nxagentScreen(X -> xconfigure.window); Bool doRandR = False; - struct timeval timeout; if (X -> xconfigure.window == nxagentDefaultWindows[pScreen -> myNum]) { @@ -3339,10 +3338,7 @@ int nxagentHandleConfigureNotify(XEvent* X) { newEvents = False; - timeout.tv_sec = 0; - timeout.tv_usec = 500 * 1000; - - nxagentWaitEvents(nxagentDisplay, &timeout); + nxagentWaitEvents(nxagentDisplay, 500); /* * This should also flush the NX link for us. @@ -3809,7 +3805,7 @@ int nxagentWaitForResource(GetResourceFuncPtr pGetResource, PredicateFuncPtr pPr while ((resource = (*pGetResource)(nxagentDisplay)) == -1) { - if (nxagentWaitEvents(nxagentDisplay, NULL) == -1) + if (nxagentWaitEvents(nxagentDisplay, 0) == -1) { return -1; } @@ -4490,14 +4486,11 @@ int nxagentPendingEvents(Display *dpy) } /* - * Blocks until an event becomes - * available. + * Blocks until an event becomes available. */ -int nxagentWaitEvents(Display *dpy, struct timeval *tm) +int nxagentWaitEvents(Display *dpy, useconds_t msec) { - XEvent ev; - #ifdef DEBUG fprintf(stderr, "nxagentWaitEvents called.\n"); #endif @@ -4505,33 +4498,41 @@ int nxagentWaitEvents(Display *dpy, struct timeval *tm) NXFlushDisplay(dpy, NXFlushLink); /* - * If the transport is not running we - * have to rely on Xlib to wait for an - * event. In this case the timeout is - * ignored. + * If the transport is not running we have to rely on Xlib to wait + * for an event. In this case the timeout is ignored. */ if (NXTransRunning(NX_FD_ANY) == 1) { - NXTransContinue(tm); + if (msec > 0) + { + struct timeval tm = { + .tv_sec = 0, + .tv_usec = msec * 1000 + }; + NXTransContinue(&tm); + } + else + { + NXTransContinue(NULL); + } } else { + XEvent ev; XPeekEvent(dpy, &ev); } /* - * Check if we encountered a display - * error. If we did, wait for the + * Check if we encountered a display error. If we did, wait for the * time requested by the caller. */ if (NXDisplayError(dpy) == 1) { - if (tm != NULL) + if (msec > 0) { - usleep(tm -> tv_sec * 1000 * 1000 + - tm -> tv_usec); + usleep(msec * 1000); } return -1; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h index 5df0e1f05..8bc798945 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h @@ -232,6 +232,6 @@ Bool nxagentPendingEvents(Display *dpy); #define nxagentCheckEvents(display, event, predicate, argument) \ XCheckIfEventNoFlush((display), (event), (predicate), (argument)) -int nxagentWaitEvents(Display *, struct timeval *); +int nxagentWaitEvents(Display *, useconds_t msec); #endif /* __Events_H__ */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c index c9aea9cdd..7311889b7 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c @@ -1255,7 +1255,7 @@ void nxagentDispatchHandler(ClientPtr client, int in, int out) while (nxagentTokens.pending == TOKENS_PENDING_LIMIT) { - if (nxagentWaitEvents(nxagentDisplay, NULL) == -1) + if (nxagentWaitEvents(nxagentDisplay, 0) == -1) { nxagentTokens.pending = 0; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 62634de60..8d578c084 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -364,7 +364,6 @@ FIXME: We'll check for ReparentNotify and LeaveNotify events after for (int i = 0; i < 100 && nxagentWMIsRunning; i++) { - struct timeval timeout; XEvent e; #ifdef TEST @@ -378,10 +377,7 @@ FIXME: We'll check for ReparentNotify and LeaveNotify events after XSync(nxagentDisplay, 0); - timeout.tv_sec = 0; - timeout.tv_usec = 50 * 1000; - - nxagentWaitEvents(nxagentDisplay, &timeout); + nxagentWaitEvents(nxagentDisplay, 50); } } else diff --git a/nx-X11/programs/Xserver/hw/nxagent/Split.c b/nx-X11/programs/Xserver/hw/nxagent/Split.c index 11221ea99..d58d70bfd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Split.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Split.c @@ -804,7 +804,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable) fprintf(stderr, "nxagentWaitDrawable: Yielding control to the NX transport.\n"); #endif - nxagentWaitEvents(nxagentDisplay, NULL); + nxagentWaitEvents(nxagentDisplay, 0); } } diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 357c6efbd..fc59973bd 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -850,7 +850,6 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) * Change to fullscreen mode. */ - struct timeval timeout; int i; XEvent e; @@ -875,10 +874,7 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) XSync(nxagentDisplay, 0); - timeout.tv_sec = 0; - timeout.tv_usec = 50 * 1000; - - nxagentWaitEvents(nxagentDisplay, &timeout); + nxagentWaitEvents(nxagentDisplay, 50); } if (i < 100) diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp index ddffcd1ca..bb8a89d64 100644 --- a/nxcomp/src/Loop.cpp +++ b/nxcomp/src/Loop.cpp @@ -1565,6 +1565,10 @@ int NXTransRunning(int fd) return (control != NULL); } +// +// FIXME: why timeval? Passing milliseconds would be more convenient, +// the timeval struct/T_timestamp could be built on demand. +// int NXTransContinue(struct timeval *selectTs) { if (control != NULL) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit d3869aa537a5711b680b5462569c141eab8109e7 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Aug 10 23:42:45 2019 +0200 nxagent: fix main window being garbled without inner windows Fixes ArcticaProject/nx-libs#733 --- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index 0851daf97..f2b10fe45 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -255,8 +255,6 @@ InitRootWindow(WindowPtr pWin) else pWin->background.pixel = pScreen->whitePixel; backFlag |= CWBackPixel; - - MakeRootTile(pWin); #else if (!blackRoot && !whiteRoot) { MakeRootTile(pWin); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 8eeaa40b1b0bb76e8bc74534576e8dca98063c3e Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Aug 11 00:21:44 2019 +0200 dix: add whiteroot flag Before there was no way of getting a white background despite having the approriate code. Backport of this commit: commit cb0a565d2b2cf8823abbd77b4426cc2237731dc1 Author: Daniel Stone <daniel@fooishbar.org> Date: Fri Aug 18 17:04:48 2006 +0300 dix: add whiteroot flag Add a -wr option to use a white root window, and use a BackPixel rather than BackPixmap for both white and black root windows. Fixes ArcticaProject/nx-libs#832 --- nx-X11/programs/Xserver/hw/nxagent/Init.c | 3 ++- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 6 ++++-- nx-X11/programs/Xserver/os/utils.c | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c index 1e24a618e..2a0bceaf5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Init.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c @@ -413,7 +413,8 @@ FIXME: These variables, if not removed at all because have probably * background. */ - blackRoot = TRUE; + if (!whiteRoot) + blackRoot = TRUE; nxagentInitKeystrokes(False); diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 6804032a2..34ac7d7d0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -142,8 +142,10 @@ to authenticate access. See also the \fIxdm\fP(1) and disables backing store support on all screens. .TP 8 .B \-br -sets the default root window to solid black instead of the standard root weave -pattern. +sets the default root window to solid black (default). +.TP 8 +.B \-wr +sets the default root window to solid white. .TP 8 .B \-c turns off key-click. diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c index 5634bb621..4d81ff927 100644 --- a/nx-X11/programs/Xserver/os/utils.c +++ b/nx-X11/programs/Xserver/os/utils.c @@ -634,6 +634,7 @@ void UseMsg(void) ErrorF("v video blanking for screen-saver\n"); ErrorF("-v screen-saver without video blanking\n"); ErrorF("-wm WhenMapped default backing-store\n"); + ErrorF("-wr create root window with white background\n"); ErrorF("-maxbigreqsize set maximal bigrequest size \n"); #ifdef PANORAMIX ErrorF("+xinerama Enable XINERAMA (PanoramiX) extension\n"); @@ -996,6 +997,8 @@ ProcessCommandLine(int argc, char *argv[]) defaultScreenSaverBlanking = DontPreferBlanking; else if ( strcmp( argv[i], "-wm") == 0) defaultBackingStore = WhenMapped; + else if ( strcmp( argv[i], "-wr") == 0) + whiteRoot = TRUE; else if ( strcmp( argv[i], "-maxbigreqsize") == 0) { if(++i < argc) { long reqSizeArg = atol(argv[i]); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 817c3c6fc4fc8461668851803bfa3db77b7f7e6f Author: Ulrich Sibiller <uli42@gmx.de> Date: Sat Aug 10 23:56:22 2019 +0200 NXwindow.c: simplify window background code --- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index f2b10fe45..f67295c43 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -249,18 +249,14 @@ InitRootWindow(WindowPtr pWin) pWin->optional->cursor = rootCursor; rootCursor->refcnt++; -#ifdef NXAGENT_SPLASH - if (blackRoot) - pWin->background.pixel = pScreen->blackPixel; - else - pWin->background.pixel = pScreen->whitePixel; - backFlag |= CWBackPixel; -#else +#ifndef NXAGENT_SPLASH if (!blackRoot && !whiteRoot) { MakeRootTile(pWin); backFlag |= CWBackPixmap; } - else { + else +#else + { if (blackRoot) pWin->background.pixel = pScreen->blackPixel; else -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 48c43c8370ba1a2b246c41e48adcffad7fdc0b9a Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Aug 11 01:59:42 2019 +0200 Splash.c: code cleanup --- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 44 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 387c859ae..e983048eb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -64,7 +64,7 @@ int nxagentLogoRed; int nxagentLogoBlack; int nxagentLogoGray; -void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); +static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); /* * From Screen.c. @@ -92,14 +92,14 @@ void nxagentShowSplashWindow(Window parentWindow) return; #ifdef TEST - fprintf(stderr, "nxagentShowSplashWindow: Got called.\n"); + fprintf(stderr, "%s: Got called.\n", __func__); #endif #ifdef NXAGENT_TIMESTAMP { extern unsigned long startTime; - fprintf(stderr, "nxagentShowSplashWindow: Initializing splash start at [%d] milliseconds.\n", + fprintf(stderr, "%s: Initializing splash start at [%d] milliseconds.\n", __func__, GetTimeInMillis() - startTime); } #endif @@ -139,7 +139,7 @@ void nxagentShowSplashWindow(Window parentWindow) getAttributes.height = nxagentOption(RootHeight); #ifdef TEST - fprintf(stderr, "nxagentShowSplashWindow: Going to create new splash window.\n"); + fprintf(stderr, "%s: Going to create new splash window.\n", __func__); #endif nxagentSplashWindow = @@ -152,7 +152,7 @@ void nxagentShowSplashWindow(Window parentWindow) BlackPixel (nxagentDisplay, 0)); #ifdef TEST - fprintf(stderr, "nxagentShowSplashWindow: Created new splash window with id [%ld].\n", + fprintf(stderr, "%s: Created new splash window with id [%ld].\n", __func__, nxagentSplashWindow); #endif @@ -168,7 +168,7 @@ void nxagentShowSplashWindow(Window parentWindow) #ifdef NXAGENT_TIMESTAMP { extern unsigned long startTime; - fprintf(stderr, "nxagentShowSplashWindow: Splash ends [%d] milliseconds.\n", + fprintf(stderr, "%s: Splash ends [%d] milliseconds.\n", __func__, GetTimeInMillis() - startTime); } #endif @@ -176,26 +176,25 @@ void nxagentShowSplashWindow(Window parentWindow) void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) { - XPoint rect[4]; - int w, h, c, w2, h2; - #ifdef DEBUG - fprintf(stderr, "nxagentPaintLogo: Got called.\n"); + fprintf(stderr, "%s: Got called.\n", __func__); #endif #ifdef NXAGENT_LOGO_DEBUG - fprintf(stderr, "nxagentPaintLogo: begin\n"); - fprintf(stderr, "nxagentPaintLogo: gen params are: w=%d h=%d d=%d r=%x w=%x b=%x\n",width, height, + fprintf(stderr, "%s: begin\n", __func__); + fprintf(stderr, "%s: gen params are: w=%d h=%d d=%d r=%x w=%x b=%x\n", __func__, + width, height, nxagentLogoDepth, nxagentLogoRed, nxagentLogoWhite, nxagentLogoBlack); #endif - w = width/scale; - h = height/scale; + int w = width/scale; + int h = height/scale; - w2 = w/2; - h2 = h/2; + int w2 = w/2; + int h2 = h/2; + int c; if (height > width) { c = w/30; @@ -205,6 +204,7 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) c = w/48; } + XPoint rect[4]; rect[0].x = 0; rect[0].y = 0; rect[1].x = 0; rect[1].y = h; rect[2].x = w; rect[2].y = h; @@ -225,7 +225,7 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); #ifdef NXAGENT_LOGO_DEBUG - fprintf(stderr, "filled first poly\n"); + fprintf(stderr, "%s: filled first poly\n", __func__); #endif XSetForeground(nxagentDisplay, gc, nxagentLogoRed); @@ -374,16 +374,17 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) XSetWindowBackgroundPixmap(nxagentDisplay, win, nxagentPixmapLogo); #ifdef NXAGENT_LOGO_DEBUG - fprintf(stderr, "nxagentPaintLogo: end\n"); + fprintf(stderr, "%s: end\n", __func__); #endif } void nxagentRemoveSplashWindow(WindowPtr pWin) { - if (nxagentReconnectTrap) return; + if (nxagentReconnectTrap) + return; #ifdef TEST - fprintf(stderr, "nxagentRemoveSplashWindow: Destroying the splash window.\n"); + fprintf(stderr, "%s: Destroying the splash window.\n", __func__); #endif if (!nxagentWMPassed) @@ -402,7 +403,7 @@ void nxagentRemoveSplashWindow(WindowPtr pWin) nxagentRefreshWindows(screenInfo.screens[0]->root); #ifdef TEST - fprintf(stderr, "nxagentRemoveSplashWindow: setting the ownership of %s (%d) on window 0x%lx\n", + fprintf(stderr, "%s: setting the ownership of %s (%d) on window 0x%lx\n", __func__ "NX_CUT_BUFFER_SERVER", (int)serverCutProperty, nxagentWindow(screenInfo.screens[0]->root)); #endif @@ -413,7 +414,6 @@ void nxagentRemoveSplashWindow(WindowPtr pWin) if (nxagentPixmapLogo) { XFreePixmap(nxagentDisplay, nxagentPixmapLogo); - nxagentPixmapLogo = (Pixmap) 0; } } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 9cd602b271cc846d654f7f5d9a455368e9ca2612 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Aug 11 01:47:16 2019 +0200 Splash.c: do not wait in nxagent mode The splash window is only shown in x2go mode. In nxagent mode the splash window was also shown, but empty (and thus invisible). And the code waited for the splash window to disappear. Fix this by skipping _all_ the splash stuff in nxagent mode. --- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 5 ++++- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 15 ++++++--------- nx-X11/programs/Xserver/hw/nxagent/Window.c | 17 ++++++++++------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index f67295c43..3cd8d0ce9 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -138,11 +138,14 @@ extern void nxagentSetVersionProperty(WindowPtr pWin); void nxagentClearSplash(WindowPtr pW) { + if (!pW) + return; + ScreenPtr pScreen = pW->drawable.pScreen; if (pW->backgroundState == BackgroundPixmap) { - (*pScreen->DestroyPixmap)(pW->background.pixmap); + (*pScreen->DestroyPixmap)(pW->background.pixmap); } pW->backgroundState = BackgroundPixel; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index bc86fed36..e2e88674b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -85,6 +85,12 @@ int nxagentShowSplashWindow(Window parentWindow) XSetWindowAttributes attributes; GC gc; + /* + * Show splash window only when running as X2Go Agent + */ + if(!nxagentX2go) + return False; + #ifdef TEST fprintf(stderr, "nxagentShowSplashWindow: Got called.\n"); #endif @@ -175,15 +181,6 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) XPoint rect[4]; int w, h, c, w2, h2; - /* - * Show only X2GO Logo when running as X2Go Agent - */ - if(! nxagentX2go) - { - nxagentPixmapLogo = 0L; - return; - } - #ifdef DEBUG fprintf(stderr, "nxagentPaintLogo: Got called.\n"); #endif diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index fc59973bd..86ae1d607 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -670,15 +670,18 @@ Bool nxagentDestroyWindow(WindowPtr pWin) nxagentSplashCount); #endif - if (nxagentSplashCount == 1) + if (nxagentRootTileWindow) { - XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window); - } + if (nxagentSplashCount == 1) + { + XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window); + } - if (pWin == nxagentRootTileWindow) - { - nxagentWindowPriv(nxagentRootTileWindow)->window = None; - nxagentRootTileWindow = None; + if (pWin == nxagentRootTileWindow) + { + nxagentWindowPriv(nxagentRootTileWindow)->window = None; + nxagentRootTileWindow = None; + } } pWindowPriv->window = None; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 208e58fb7594b24dc6eb8f287092d5080edabab5 Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Aug 11 01:51:37 2019 +0200 Splash.c: drop return code of nxagentShowSplashWindow nobody was checking it. --- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 6 ++---- nx-X11/programs/Xserver/hw/nxagent/Splash.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index e2e88674b..387c859ae 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -78,7 +78,7 @@ extern Atom nxagentWMStart; extern Atom serverCutProperty; -int nxagentShowSplashWindow(Window parentWindow) +void nxagentShowSplashWindow(Window parentWindow) { XWindowAttributes getAttributes; XWindowChanges values; @@ -89,7 +89,7 @@ int nxagentShowSplashWindow(Window parentWindow) * Show splash window only when running as X2Go Agent */ if(!nxagentX2go) - return False; + return; #ifdef TEST fprintf(stderr, "nxagentShowSplashWindow: Got called.\n"); @@ -172,8 +172,6 @@ int nxagentShowSplashWindow(Window parentWindow) GetTimeInMillis() - startTime); } #endif - - return True; } void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.h b/nx-X11/programs/Xserver/hw/nxagent/Splash.h index 444f1eed0..2057390fc 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h @@ -47,7 +47,7 @@ extern Window nxagentSplashWindow; extern int nxagentWMPassed; -extern int nxagentShowSplashWindow(Window); +extern void nxagentShowSplashWindow(Window); extern void nxagentRemoveSplashWindow(WindowPtr pWin); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 41bfed975b3145f1ac345893d118deb98ca00cc0 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Aug 15 22:10:45 2019 +0200 Splash.c: remove global variables for colors Make them defines. Also determine the screen depth dynamically. --- nx-X11/programs/Xserver/hw/nxagent/Display.c | 16 ---------------- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 16 ++++++++-------- nx-X11/programs/Xserver/hw/nxagent/Splash.h | 6 ------ 3 files changed, 8 insertions(+), 30 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c index 1c18ad1a3..c25afc597 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Display.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c @@ -1387,15 +1387,6 @@ FIXME: Use of nxagentParentWindow is strongly deprecated. nxagentChangeOption(BorderWidth, 1); } - nxagentLogoDepth = DefaultDepth(nxagentDisplay, - DefaultScreen(nxagentDisplay) - ); - - nxagentLogoBlack = 0x000000; - nxagentLogoRed = 0xff0000; - nxagentLogoWhite = 0xffffff; - nxagentLogoGray = 0x222222; - #ifdef WATCH fprintf(stderr, "nxagentOpenDisplay: Watchpoint 5.1.\n"); @@ -2827,13 +2818,6 @@ Bool nxagentReconnectDisplay(void *p0) nxagentConfineWindow); #endif - nxagentLogoDepth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay)); - - nxagentLogoBlack = 0x000000; - nxagentLogoRed = 0xff0000; - nxagentLogoWhite = 0xffffff; - nxagentLogoGray = 0x222222; - useXpmIcon = nxagentMakeIcon(nxagentDisplay, &nxagentIconPixmap, &nxagentIconShape); /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 74322648a..91f599cc6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -58,11 +58,10 @@ * Colors used to paint the splash screen. */ -int nxagentLogoDepth; -int nxagentLogoWhite; -int nxagentLogoRed; -int nxagentLogoBlack; -int nxagentLogoGray; +#define nxagentLogoWhite 0xffffff +#define nxagentLogoRed 0xff0000 +#define nxagentLogoBlack 0x000000 +#define nxagentLogoGray 0x222222 static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); @@ -176,6 +175,8 @@ void nxagentShowSplashWindow(Window parentWindow) void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) { + int depth = DefaultDepth(nxagentDisplay, DefaultScreen(nxagentDisplay)); + #ifdef DEBUG fprintf(stderr, "%s: Got called.\n", __func__); #endif @@ -183,9 +184,8 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) #ifdef NXAGENT_LOGO_DEBUG fprintf(stderr, "%s: begin\n", __func__); fprintf(stderr, "%s: gen params are: w=%d h=%d d=%d r=%x w=%x b=%x\n", __func__, - width, height, - nxagentLogoDepth, nxagentLogoRed, - nxagentLogoWhite, nxagentLogoBlack); + width, height, depth, + nxagentLogoRed, nxagentLogoWhite, nxagentLogoBlack); #endif int w = width/scale; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.h b/nx-X11/programs/Xserver/hw/nxagent/Splash.h index 52adbc340..5f7547e57 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h @@ -37,12 +37,6 @@ extern int XdmcpTimeOutRtx; extern int XdmcpStartTime; extern int nxagentXdmcpUp; -extern int nxagentLogoDepth; -extern int nxagentLogoWhite; -extern int nxagentLogoRed; -extern int nxagentLogoBlack; -extern int nxagentLogoGray; - extern Window nxagentSplashWindow; extern int nxagentWMPassed; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit e12983a677c84794f5ff34e5b14c3feb78878a9c Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Aug 15 22:06:14 2019 +0200 nxagent: drop nxagentRootTileWindow We either use a solid black or a white background and no backround pixmap. So nxagentRootTileWindow is always empty and we can drop all stuff around it. remove nxagentSplashCount, too, since it is no longer checked anywhere. --- nx-X11/programs/Xserver/dix/window.c | 2 - nx-X11/programs/Xserver/hw/nxagent/Events.c | 15 ----- nx-X11/programs/Xserver/hw/nxagent/NXwindow.c | 86 ++------------------------- nx-X11/programs/Xserver/hw/nxagent/Window.c | 51 ---------------- 4 files changed, 4 insertions(+), 150 deletions(-) diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c index 79045767f..ee146d783 100644 --- a/nx-X11/programs/Xserver/dix/window.c +++ b/nx-X11/programs/Xserver/dix/window.c @@ -305,7 +305,6 @@ SetWindowToDefaults(register WindowPtr pWin) #endif } -#ifndef NXAGENT_SERVER static void MakeRootTile(WindowPtr pWin) { @@ -348,7 +347,6 @@ MakeRootTile(WindowPtr pWin) FreeScratchGC(pGC); } -#endif /* NXAGENT_SERVER */ WindowPtr AllocateWindow(ScreenPtr pScreen) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 0223667c4..553eaccd6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -124,7 +124,6 @@ extern Bool nxagentOnce; extern WindowPtr nxagentRootTileWindow; -extern int nxagentSplashCount; extern int nxagentLastClipboardClient; @@ -2450,20 +2449,6 @@ FIXME: This can be maybe optimized by consuming the } } - if (nxagentRootTileWindow != NULL) - { - if (nxagentWindowPriv(nxagentRootTileWindow) -> window == nxagentWindowPriv(pWin) -> window && - nxagentSplashCount == 1 && X -> xexpose.count == 0) - { - #ifdef DEBUG - fprintf(stderr, "nxagentHandleExposeEvent: Clearing root tile window id [%u].\n", - nxagentWindowPriv(nxagentRootTileWindow) -> window); - #endif - - XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window); - } - } - RegionUninit(&sum); } diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c index 3cd8d0ce9..3dcb552e5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -114,10 +114,6 @@ Equipment Corporation. #include "Drawable.h" #include "Colormap.h" -/* prototypes (only MakeRootTile() required here) */ - -static void MakeRootTile(WindowPtr pWin); - #include "../../dix/window.c" extern Bool nxagentWMIsRunning; @@ -132,72 +128,8 @@ extern Bool nxagentScreenTrap; #undef TEST #undef DEBUG -WindowPtr nxagentRootTileWindow; - extern void nxagentSetVersionProperty(WindowPtr pWin); -void nxagentClearSplash(WindowPtr pW) -{ - if (!pW) - return; - - ScreenPtr pScreen = pW->drawable.pScreen; - - if (pW->backgroundState == BackgroundPixmap) - { - (*pScreen->DestroyPixmap)(pW->background.pixmap); - } - - pW->backgroundState = BackgroundPixel; - pW->background.pixel = nxagentLogoBlack; - - (*pScreen->ChangeWindowAttributes)(pW, CWBackPixmap|CWBackPixel); -} - -static void -MakeRootTile(WindowPtr pWin) -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - GCPtr pGC; - unsigned char back[128]; - int len = BitmapBytePad(sizeof(long)); - register unsigned char *from, *to; - register int i, j; - - pWin->background.pixmap = (*pScreen->CreatePixmap)(pScreen, 4, 4, - pScreen->rootDepth, 0); - - pWin->backgroundState = BackgroundPixmap; - pGC = GetScratchGC(pScreen->rootDepth, pScreen); - if (!pWin->background.pixmap || !pGC) - FatalError("could not create root tile"); - - { - CARD32 attributes[2]; - - attributes[0] = pScreen->whitePixel; - attributes[1] = pScreen->blackPixel; - - (void)ChangeGC(pGC, GCForeground | GCBackground, attributes); - } - - ValidateGC((DrawablePtr)pWin->background.pixmap, pGC); - - from = (screenInfo.bitmapBitOrder == LSBFirst) ? _back_lsb : _back_msb; - to = back; - - for (i = 4; i > 0; i--, from++) - for (j = len; j > 0; j--) - *to++ = *from; - - (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap, pGC, 1, - 0, 0, len, 4, 0, XYBitmap, (char *)back); - - FreeScratchGC(pGC); - - nxagentRootTileWindow = pWin; -} - void InitRootWindow(WindowPtr pWin) { @@ -252,21 +184,11 @@ InitRootWindow(WindowPtr pWin) pWin->optional->cursor = rootCursor; rootCursor->refcnt++; -#ifndef NXAGENT_SPLASH - if (!blackRoot && !whiteRoot) { - MakeRootTile(pWin); - backFlag |= CWBackPixmap; - } + if (blackRoot) + pWin->background.pixel = pScreen->blackPixel; else -#else - { - if (blackRoot) - pWin->background.pixel = pScreen->blackPixel; - else - pWin->background.pixel = pScreen->whitePixel; - backFlag |= CWBackPixel; - } -#endif + pWin->background.pixel = pScreen->whitePixel; + backFlag |= CWBackPixel; pWin->backingStore = defaultBackingStore; pWin->forcedBS = (defaultBackingStore != NotUseful); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 86ae1d607..fe6efb52c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -119,12 +119,6 @@ extern WindowPtr nxagentRootTileWindow; extern Bool nxagentReportPrivateWindowIds; -/* - * Also referenced in Events.c. - */ - -int nxagentSplashCount = 0; - #define RECTLIMIT 25 #define BSPIXMAPLIMIT 128 @@ -156,12 +150,6 @@ Bool nxagentIsIconic(WindowPtr); int GetWindowProperty(WindowPtr, Atom, long, long, Bool, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**); -/* - * From NXwindow.c. - */ - -void nxagentClearSplash(WindowPtr pWin); - /* * Other local functions. */ @@ -269,16 +257,6 @@ Bool nxagentCreateWindow(WindowPtr pWin) return True; } - nxagentSplashCount++; - - if (nxagentSplashCount == 2) - { - nxagentClearSplash(nxagentRootTileWindow); - } - #ifdef NXAGENT_LOGO_DEBUG - fprintf(stderr, "nxagentCreateWindow: nxagentSplashCount [%d]\n", nxagentSplashCount); - #endif - if (pWin->drawable.class == InputOnly) { mask = CWEventMask; @@ -488,14 +466,6 @@ Bool nxagentCreateWindow(WindowPtr pWin) nxagentWindowPriv(pWin)->siblingAbove = None; nxagentWindowPriv(pWin)->pPicture = NULL; - if (nxagentRootTileWindow) - { - if (nxagentWindowPriv(pWin)->window != nxagentWindowPriv(nxagentRootTileWindow)->window) - { - XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow)->window); - } - } - if (pWin->nextSib) { nxagentWindowPriv(pWin->nextSib)->siblingAbove = nxagentWindow(pWin); @@ -663,27 +633,6 @@ Bool nxagentDestroyWindow(WindowPtr pWin) nxagentRootlessDelTopLevelWindow(pWin); } - nxagentSplashCount--; - - #ifdef DEBUG - fprintf(stderr, "nxagentDestroyWindow: The splash counter is now [%d].\n", - nxagentSplashCount); - #endif - - if (nxagentRootTileWindow) - { - if (nxagentSplashCount == 1) - { - XClearWindow(nxagentDisplay, nxagentWindowPriv(nxagentRootTileWindow) -> window); - } - - if (pWin == nxagentRootTileWindow) - { - nxagentWindowPriv(nxagentRootTileWindow)->window = None; - nxagentRootTileWindow = None; - } - } - pWindowPriv->window = None; if (pWin -> optional) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit bfb4e9ac991271e9b4149094f1cc1aaa79987c74 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Aug 15 22:04:07 2019 +0200 Splash.c: nxagentRemoveSplashWindow: drop unused parameter --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 4 ++-- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Splash.h | 3 +-- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 339994e6c..7020a679e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -380,7 +380,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio if (!nxagentWMPassed && (nxagentWMtimeout < currentDispatch)) { - nxagentRemoveSplashWindow(NULL); + nxagentRemoveSplashWindow(); } nxagentClients = nClients; @@ -590,7 +590,7 @@ ProcReparentWindow(register ClientPtr client) if (!nxagentWMPassed) { - nxagentRemoveSplashWindow(pWin); + nxagentRemoveSplashWindow(); } pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client, diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index 47f636316..e29fc3200 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -680,7 +680,7 @@ Bool nxagentReconnectSession(void) #endif saveAgentState("RUNNING"); - nxagentRemoveSplashWindow(NULL); + nxagentRemoveSplashWindow(); /* * We let the proxy flush the link on our behalf diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 8d578c084..111a3fdaa 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -3108,7 +3108,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr { if (!nxagentWMPassed) { - nxagentRemoveSplashWindow(NULL); + nxagentRemoveSplashWindow(); } NXShadowExportChanges(&numRects, &ptBox); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index e983048eb..74322648a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -378,7 +378,7 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) #endif } -void nxagentRemoveSplashWindow(WindowPtr pWin) +void nxagentRemoveSplashWindow(void) { if (nxagentReconnectTrap) return; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.h b/nx-X11/programs/Xserver/hw/nxagent/Splash.h index 2057390fc..52adbc340 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h @@ -48,7 +48,6 @@ extern Window nxagentSplashWindow; extern int nxagentWMPassed; extern void nxagentShowSplashWindow(Window); - -extern void nxagentRemoveSplashWindow(WindowPtr pWin); +extern void nxagentRemoveSplashWindow(); #endif /* __Splash_H__ */ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 784846317f89d9fb9a4bfefffcc914a8895b231f Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 12:46:21 2019 +0200 nxagent: rename nxagentWMStart to nxagentReadyAtom This better reflects its purpose: Tell listeners we are ready. --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 4 ++-- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 1298dc9ea..27f72d566 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -146,7 +146,7 @@ Window nxagentInputWindows[MAXSCREENS]; Window nxagentScreenSaverWindows[MAXSCREENS]; #ifdef NXAGENT_ONSTART -Atom nxagentWMStart; +Atom nxagentReadyAtom; #endif ScreenPtr nxagentDefaultScreen = NULL; @@ -927,7 +927,7 @@ Bool nxagentOpenScreen(ScreenPtr pScreen, nxagentQueryAtoms(pScreen); #ifdef NXAGENT_ONSTART - nxagentWMStart = nxagentAtoms[3]; /* WM_NX_READY */ + nxagentReadyAtom = nxagentAtoms[3]; /* WM_NX_READY */ #endif /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 28c5599af..c3f6f101e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -72,7 +72,7 @@ static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height * From Screen.c. */ -extern Atom nxagentWMStart; +extern Atom nxagentReadyAtom; /* * From Clipboard.c. @@ -106,7 +106,7 @@ void nxagentShowSplashWindow(Window parentWindow) } #endif - XSetSelectionOwner(nxagentDisplay, nxagentWMStart, None, CurrentTime); + XSetSelectionOwner(nxagentDisplay, nxagentReadyAtom, None, CurrentTime); nxagentWMPassed = False; @@ -401,7 +401,7 @@ void nxagentRemoveSplashWindow(void) if (!nxagentWMPassed) { - XSetSelectionOwner(nxagentDisplay, nxagentWMStart, + XSetSelectionOwner(nxagentDisplay, nxagentReadyAtom, nxagentDefaultWindows[0], CurrentTime); nxagentWMPassed = True; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 5bb5adc8a137833db7c6cba3ba1bc2f25960b048 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Aug 15 22:33:35 2019 +0200 Splash.c: make Splash logo work with white background (-wr) mode, too --- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 53 +++++++++++++++++------------ 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 91f599cc6..2945717c4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -58,10 +58,10 @@ * Colors used to paint the splash screen. */ -#define nxagentLogoWhite 0xffffff -#define nxagentLogoRed 0xff0000 -#define nxagentLogoBlack 0x000000 -#define nxagentLogoGray 0x222222 +#define nxagentLogoWhite 0xffffff +#define nxagentLogoBlack 0x000000 +#define nxagentLogoDarkGray 0x222222 +#define nxagentLogoLightGray 0xbbbbbb static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); @@ -183,9 +183,9 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) #ifdef NXAGENT_LOGO_DEBUG fprintf(stderr, "%s: begin\n", __func__); - fprintf(stderr, "%s: gen params are: w=%d h=%d d=%d r=%x w=%x b=%x\n", __func__, + fprintf(stderr, "%s: gen params are: w=%d h=%d d=%d w=%x b=%x g1=%x g2=%x \n", __func__, width, height, depth, - nxagentLogoRed, nxagentLogoWhite, nxagentLogoBlack); + nxagentLogoWhite, nxagentLogoBlack, nxagentLogoDarkGray, nxagentLogoLightGray); #endif int w = width/scale; @@ -204,43 +204,52 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) c = w/48; } - XPoint rect[4]; - rect[0].x = 0; rect[0].y = 0; - rect[1].x = 0; rect[1].y = h; - rect[2].x = w; rect[2].y = h; - rect[3].x = w; rect[3].y = 0; - XSetFunction(nxagentDisplay, gc, GXcopy); XSetFillStyle(nxagentDisplay, gc, FillSolid); - XSetForeground(nxagentDisplay, gc, nxagentLogoBlack); - XSetBackground(nxagentDisplay, gc, nxagentLogoRed); - - nxagentPixmapLogo = XCreatePixmap(nxagentDisplay, win, width, height, nxagentLogoDepth); + nxagentPixmapLogo = XCreatePixmap(nxagentDisplay, win, width, height, depth); if (!nxagentPixmapLogo) { return; } + if (blackRoot) + { + XSetForeground(nxagentDisplay, gc, nxagentLogoBlack); + XSetBackground(nxagentDisplay, gc, nxagentLogoWhite); + } + else + { + XSetForeground(nxagentDisplay, gc, nxagentLogoWhite); + XSetBackground(nxagentDisplay, gc, nxagentLogoBlack); + } + + XPoint rect[4]; + rect[0].x = 0; rect[0].y = 0; + rect[1].x = 0; rect[1].y = h; + rect[2].x = w; rect[2].y = h; + rect[3].x = w; rect[3].y = 0; + + /* paint background */ XFillPolygon(nxagentDisplay, nxagentPixmapLogo, gc, rect, 4, Convex, CoordModeOrigin); #ifdef NXAGENT_LOGO_DEBUG fprintf(stderr, "%s: filled first poly\n", __func__); #endif - XSetForeground(nxagentDisplay, gc, nxagentLogoRed); - XSetBackground(nxagentDisplay, gc, nxagentLogoWhite); - /* * Draw X2GO Logo */ + if (blackRoot) + XSetForeground(nxagentDisplay, gc, nxagentLogoDarkGray); + else + XSetForeground(nxagentDisplay, gc, nxagentLogoLightGray); + /* - * Begin 'X'. + * Start 'X'. */ - XSetForeground(nxagentDisplay, gc, nxagentLogoGray); - XSetBackground(nxagentDisplay, gc, nxagentLogoWhite); rect[0].x = w2-7*c; rect[0].y = h2-5*c; rect[1].x = w2-8*c; rect[1].y = h2-5*c; rect[2].x = w2-4*c; rect[2].y = h2+3*c; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit bd002ffc51350dab01b188fdabbdcf6218497956 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 12:38:53 2019 +0200 Splash.c: move some variables to Splash.c They belong there... --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 2 -- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 111a3fdaa..1298dc9ea 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -147,8 +147,6 @@ Window nxagentScreenSaverWindows[MAXSCREENS]; #ifdef NXAGENT_ONSTART Atom nxagentWMStart; -Window nxagentSplashWindow = None; -Pixmap nxagentPixmapLogo; #endif ScreenPtr nxagentDefaultScreen = NULL; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 2945717c4..28c5599af 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -63,6 +63,9 @@ #define nxagentLogoDarkGray 0x222222 #define nxagentLogoLightGray 0xbbbbbb +Pixmap nxagentPixmapLogo; +Window nxagentSplashWindow = None; + static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); /* -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 0f5e873dc312a6f2c88989d5379d3c4f442ef34d Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 12:54:10 2019 +0200 nxagent: drop NXAGENT_SPLASH There was only one (commented) section using it. --- nx-X11/programs/Xserver/hw/nxagent/Imakefile | 1 - nx-X11/programs/Xserver/hw/nxagent/Window.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Imakefile b/nx-X11/programs/Xserver/hw/nxagent/Imakefile index 5a3a999f4..b3450440e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Imakefile +++ b/nx-X11/programs/Xserver/hw/nxagent/Imakefile @@ -240,7 +240,6 @@ DEFINES = \ -DNXAGENT_VISIBILITY \ -DNXAGENT_WAKEUP=1000 \ -DNXAGENT_ONSTART \ - -DNXAGENT_SPLASH \ -DNXAGENT_ARTSD \ -DNXAGENT_RANDR_MODE_PREFIX \ -UNX_DEBUG_INPUT \ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index fe6efb52c..59b33b6be 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -1436,7 +1436,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) #endif } - #ifdef NXAGENT_SPLASH /* * This should bring again the splash window * on top, so why the else clause? Is this @@ -1462,7 +1461,6 @@ void nxagentConfigureWindow(WindowPtr pWin, unsigned int mask) * } * } */ - #endif /* NXAGENT_SPLASH */ if (mask & CW_RootlessRestack) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 60a3c9b0ab58d2ab1574de84b421f0f9e5136b75 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 13:02:01 2019 +0200 nxagent: move nxagentWMPassed to Splash.c It is only relevant there. --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 10 +++------- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 5 +---- nx-X11/programs/Xserver/hw/nxagent/Splash.c | 4 ++++ nx-X11/programs/Xserver/hw/nxagent/Splash.h | 2 -- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index c49cae51e..0ad26b0bb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -144,7 +144,6 @@ void nxagentListRemoteFonts(const char *, int); #ifdef NXAGENT_ONSTART unsigned int nxagentWMtimeout = 0; #endif -Bool nxagentWMPassed = False; /* * Timeouts based on screen saver time. @@ -380,9 +379,9 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio * that the agent is ready. */ - if (!nxagentWMPassed && (nxagentWMtimeout < currentDispatch)) + if (nxagentWMtimeout < currentDispatch) { - nxagentRemoveSplashWindow(); + nxagentRemoveSplashWindow(); } nxagentClients = nClients; @@ -590,10 +589,7 @@ ProcReparentWindow(register ClientPtr client) if (!pWin) return(BadWindow); - if (!nxagentWMPassed) - { - nxagentRemoveSplashWindow(); - } + nxagentRemoveSplashWindow(); pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client, DixWriteAccess); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 27f72d566..434389504 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -3104,10 +3104,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr if (result == 1) { - if (!nxagentWMPassed) - { - nxagentRemoveSplashWindow(); - } + nxagentRemoveSplashWindow(); NXShadowExportChanges(&numRects, &ptBox); pBox = (BoxRec *)ptBox; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index 6fa092a7d..8f3bc1ede 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -65,6 +65,7 @@ Pixmap nxagentPixmapLogo; Window nxagentSplashWindow = None; +Bool nxagentWMPassed = False; static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height); @@ -396,6 +397,9 @@ void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height) void nxagentRemoveSplashWindow(void) { + if (nxagentWMPassed) + return; + if (nxagentReconnectTrap) return; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.h b/nx-X11/programs/Xserver/hw/nxagent/Splash.h index 5f7547e57..a43801469 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.h @@ -39,8 +39,6 @@ extern int nxagentXdmcpUp; extern Window nxagentSplashWindow; -extern int nxagentWMPassed; - extern void nxagentShowSplashWindow(Window); extern void nxagentRemoveSplashWindow(); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit db4c220b2aef5d2c5a8bc9def2558491ac3d7655 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 12:55:28 2019 +0200 nxagent: add NXAGENT_ONSTART where missing There were some locations referenceing a variable that was only availabe with NXAGENT_ONSTART set --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 2 ++ nx-X11/programs/Xserver/hw/nxagent/Splash.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 7020a679e..c49cae51e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -141,7 +141,9 @@ void nxagentWaitDisplay(void); void nxagentListRemoteFonts(const char *, int); +#ifdef NXAGENT_ONSTART unsigned int nxagentWMtimeout = 0; +#endif Bool nxagentWMPassed = False; /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Splash.c b/nx-X11/programs/Xserver/hw/nxagent/Splash.c index c3f6f101e..6fa092a7d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Splash.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Splash.c @@ -72,7 +72,9 @@ static void nxagentPaintLogo(Window win, GC gc, int scale, int width, int height * From Screen.c. */ +#ifdef NXAGENT_ONSTART extern Atom nxagentReadyAtom; +#endif /* * From Clipboard.c. @@ -106,7 +108,9 @@ void nxagentShowSplashWindow(Window parentWindow) } #endif + #ifdef NXAGENT_ONSTART XSetSelectionOwner(nxagentDisplay, nxagentReadyAtom, None, CurrentTime); + #endif nxagentWMPassed = False; @@ -401,8 +405,10 @@ void nxagentRemoveSplashWindow(void) if (!nxagentWMPassed) { + #ifdef NXAGENT_ONSTART XSetSelectionOwner(nxagentDisplay, nxagentReadyAtom, nxagentDefaultWindows[0], CurrentTime); + #endif nxagentWMPassed = True; } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6f80a06fb96725e7eadf846bf0e727821aadbf47 Merge: 8b15d574b f39b81d31 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Aug 27 08:27:42 2019 +0200 Merge branch 'uli42-pr/safe_free' into 3.6.x Attributes GH PR #826: https://github.com/ArcticaProject/nx-libs/pull/826 nx-X11/programs/Xserver/hw/nxagent/Args.c | 14 +++-- nx-X11/programs/Xserver/hw/nxagent/Atoms.c | 16 +++--- nx-X11/programs/Xserver/hw/nxagent/Clipboard.c | 3 +- nx-X11/programs/Xserver/hw/nxagent/Colormap.c | 21 ++++---- nx-X11/programs/Xserver/hw/nxagent/Cursor.c | 7 ++- nx-X11/programs/Xserver/hw/nxagent/Display.c | 65 ++++++----------------- nx-X11/programs/Xserver/hw/nxagent/Drawable.c | 11 ++-- nx-X11/programs/Xserver/hw/nxagent/Error.c | 13 ++--- nx-X11/programs/Xserver/hw/nxagent/Events.c | 35 +++--------- nx-X11/programs/Xserver/hw/nxagent/Font.c | 63 +++++++++------------- nx-X11/programs/Xserver/hw/nxagent/GC.c | 18 +++---- nx-X11/programs/Xserver/hw/nxagent/GCOps.c | 7 +-- nx-X11/programs/Xserver/hw/nxagent/Image.c | 27 +++++----- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 70 ++++++++++++------------ nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 4 +- nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 13 ++--- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 12 ++--- nx-X11/programs/Xserver/hw/nxagent/Render.c | 5 +- nx-X11/programs/Xserver/hw/nxagent/Rootless.c | 15 +++--- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 73 ++++++++++---------------- nx-X11/programs/Xserver/hw/nxagent/Utils.h | 1 + nx-X11/programs/Xserver/hw/nxagent/Window.c | 40 ++++++-------- 22 files changed, 217 insertions(+), 316 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 4202d5094c72de28fe48fcfb165366bc8bdf68e7 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 13:08:42 2019 +0200 NXdispatch.c: drop currentDispatch variable was only used once --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 0ad26b0bb..da7a55b69 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -244,8 +244,6 @@ Dispatch(void) register HWEventQueuePtr* icheck = checkForInput; long start_tick; - unsigned long currentDispatch = 0; - nextFreeClientID = 1; InitSelections(); nClients = 0; @@ -371,18 +369,15 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio #ifdef NXAGENT_ONSTART - currentDispatch = GetTimeInMillis(); - - /* - * If the timeout is expired set the - * selection informing the NX client - * that the agent is ready. - */ + /* + * If the timeout is expired set the selection informing the + * NX client that the agent is ready. + */ - if (nxagentWMtimeout < currentDispatch) - { - nxagentRemoveSplashWindow(); - } + if (nxagentWMtimeout < GetTimeInMillis()) + { + nxagentRemoveSplashWindow(); + } nxagentClients = nClients; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit f39b81d31bc7d0427ea9cca04d0e4a21579d7383 Author: Ulrich Sibiller <uli42@gmx.de> Date: Fri Aug 16 13:11:38 2019 +0200 NXdispatch.c: move nxagentWMtimeout into the function it is only used there, no need for a global variable --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index da7a55b69..10616834e 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -141,10 +141,6 @@ void nxagentWaitDisplay(void); void nxagentListRemoteFonts(const char *, int); -#ifdef NXAGENT_ONSTART -unsigned int nxagentWMtimeout = 0; -#endif - /* * Timeouts based on screen saver time. */ @@ -264,12 +260,11 @@ Dispatch(void) #ifdef NXAGENT_ONSTART /* - * Set NX_WM property (used by NX client to identify - * the agent's window) three seconds since the first - * client connects. + * Set NX_WM property (used by NX client to identify the agent's + * window) three seconds since the first client connects. */ - nxagentWMtimeout = GetTimeInMillis() + 3000; + unsigned int nxagentWMtimeout = GetTimeInMillis() + 3000; #endif -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit daa50fd80ed5f777754a51c0e2b4869ba083a337 Merge: 6f80a06fb a7abd45a8 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Aug 27 08:33:22 2019 +0200 Merge branch 'uli42-pr/fix_double_free' into 3.6.x Attributes GH PR #834: https://github.com/ArcticaProject/nx-libs/pull/834 nx-X11/programs/Xserver/hw/nxagent/Screen.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit a7abd45a82737bfcba7af6ba46d3f372a5f97de6 Author: Ulrich Sibiller <uli42@gmx.de> Date: Mon Aug 12 23:11:34 2019 +0200 Screen.c: initialize RandR only on startup... ... not on reconnect. After the reconnect RRCloseScreen was called twice which caused a double free. This was introduced with 3b06ad51d91ff2b9442f159cddf34ed03bc2dd35 Fixes ArcticaProject/nx-libs#833 --- nx-X11/programs/Xserver/hw/nxagent/Screen.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c index 434389504..8285d464d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c @@ -1735,14 +1735,14 @@ N/A #define POSITION_OFFSET (pScreen->myNum * (nxagentOption(Width) + \ nxagentOption(Height)) / 32) - } - /* - * Complete the initialization of the RANDR - * extension. - */ + /* + * Complete the initialization of the RANDR + * extension. + */ - nxagentInitRandRExtension(pScreen); + nxagentInitRandRExtension(pScreen); + } #ifdef TEST nxagentPrintAgentGeometry(NULL, "nxagentOpenScreen:"); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 58183b7ceacb774b018bd61e6ad6c127662c7fcb Author: Ulrich Sibiller <uli42@gmx.de> Date: Sun Mar 5 23:51:24 2017 +0100 nxagent: Add autograb mode. You can now toggle between autograb mode by pressing CTRL-ALT-G (default, can be adjusted in keystrokes.cfg). Fixes ArcticaProject/nx-libs#384. --- doc/nxagent/README.keystrokes | 3 + etc/keystrokes.cfg | 1 + nx-X11/programs/Xserver/hw/nxagent/Events.c | 84 +++++++++++++++++++++++++- nx-X11/programs/Xserver/hw/nxagent/Events.h | 3 +- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 9 ++- nx-X11/programs/Xserver/hw/nxagent/Keystroke.h | 2 + 6 files changed, 97 insertions(+), 5 deletions(-) diff --git a/doc/nxagent/README.keystrokes b/doc/nxagent/README.keystrokes index 750a460eb..b76e9fd62 100644 --- a/doc/nxagent/README.keystrokes +++ b/doc/nxagent/README.keystrokes @@ -126,6 +126,9 @@ reread_keystrokes Forces nxagent to re-read the keystroke configuration. Useful to add/change keystrokes to a running session. +autograb + Toggles autograb mode + force_synchronization Forces immediate drawing of elements to be synchronized which can fix some visual bugs. diff --git a/etc/keystrokes.cfg b/etc/keystrokes.cfg index 856369839..27acf8e84 100644 --- a/etc/keystrokes.cfg +++ b/etc/keystrokes.cfg @@ -24,4 +24,5 @@ <keystroke action="viewport_scroll_down" Control="1" AltMeta="1" key="Down" /> <keystroke action="viewport_scroll_down" Control="1" AltMeta="1" key="KP_Down" /> <keystroke action="reread_keystrokes" Control="1" AltMeta="1" key="k" /> +<keystroke action="autograb" Control="1" AltMeta="1" key="g" /> </keystrokes> diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 553eaccd6..95a00afbf 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -674,6 +674,40 @@ static void nxagentSwitchDeferMode(void) } } +static Bool autograb = False; + +static void nxagentEnableAutoGrab(void) +{ +#ifdef DEBUG + fprintf(stderr, "enabling autograb\n"); +#endif + + nxagentGrabPointerAndKeyboard(NULL); + autograb = True; +} + +static void nxagentDisableAutoGrab(void) +{ +#ifdef DEBUG + fprintf(stderr, "disabling autograb\n"); +#endif + + nxagentUngrabPointerAndKeyboard(NULL); + autograb = False; +} + +static void nxagentToggleAutoGrab(void) +{ + /* autograb only works in windowed mode */ + if (nxagentOption(Rootless) || nxagentOption(Fullscreen)) + return; + + if (!autograb) + nxagentEnableAutoGrab(); + else + nxagentDisableAutoGrab(); +} + static Bool nxagentExposurePredicate(Display *display, XEvent *event, XPointer window) { /* @@ -1060,6 +1094,12 @@ void nxagentDispatchEvents(PredicateFuncPtr predicate) break; } + case doAutoGrab: + { + nxagentToggleAutoGrab(); + + break; + } default: { FatalError("nxagentDispatchEvent: handleKeyPress returned unknown value\n"); @@ -1519,6 +1559,17 @@ FIXME: Don't enqueue the KeyRelease event if the key was } } + /* FIXME: only when in windowed mode! */ + if (autograb) + { + if (X.xfocus.window == nxagentDefaultWindows[0] && X.xfocus.mode == NotifyNormal) + { + #ifdef DEBUG + fprintf(stderr, "%s: (FocusIn): grabbing\n", __func__); + #endif + nxagentGrabPointerAndKeyboard(NULL); + } + } break; } case FocusOut: @@ -1597,6 +1648,19 @@ FIXME: Don't enqueue the KeyRelease event if the key was #endif /* NXAGENT_FIXKEYS */ + if (autograb) + { + XlibWindow w; + int revert_to; + XGetInputFocus(nxagentDisplay, &w, &revert_to); + if (w != nxagentDefaultWindows[0] && X.xfocus.mode == NotifyWhileGrabbed) + { + #ifdef DEBUG + fprintf(stderr, "%s: (FocusOut): ungrabbing\n", __func__); + #endif + nxagentUngrabPointerAndKeyboard(NULL); + } + } break; } case KeymapNotify: @@ -3827,13 +3891,26 @@ void nxagentGrabPointerAndKeyboard(XEvent *X) fprintf(stderr, "nxagentGrabPointerAndKeyboard: Going to grab the keyboard in context [B1].\n"); #endif - result = XGrabKeyboard(nxagentDisplay, nxagentFullscreenWindow, - True, GrabModeAsync, GrabModeAsync, now); + if (nxagentFullscreenWindow) + result = XGrabKeyboard(nxagentDisplay, nxagentFullscreenWindow, + True, GrabModeAsync, GrabModeAsync, now); + else + result = XGrabKeyboard(nxagentDisplay, RootWindow(nxagentDisplay, DefaultScreen(nxagentDisplay)), + True, GrabModeAsync, GrabModeAsync, now); if (result != GrabSuccess) { + #ifdef DEBUG + fprintf(stderr, "%s: keyboard grab failed.\n", __func__); + #endif return; } + #ifdef DEBUG + else + { + fprintf(stderr, "%s: keyboard grab successful.\n", __func__); + } + #endif /* * The smart scheduler could be stopped while @@ -3851,7 +3928,8 @@ void nxagentGrabPointerAndKeyboard(XEvent *X) resource = nxagentWaitForResource(NXGetCollectGrabPointerResource, nxagentCollectGrabPointerPredicate); - NXCollectGrabPointer(nxagentDisplay, resource, + if (nxagentFullscreenWindow) + NXCollectGrabPointer(nxagentDisplay, resource, nxagentFullscreenWindow, True, NXAGENT_POINTER_EVENT_MASK, GrabModeAsync, GrabModeAsync, None, None, now); diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.h b/nx-X11/programs/Xserver/hw/nxagent/Events.h index 8bc798945..85f585e1f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.h @@ -50,7 +50,8 @@ enum HandleEventResult doViewportRight, doViewportDown, doSwitchResizeMode, - doSwitchDeferMode + doSwitchDeferMode, + doAutoGrab, }; extern CARD32 nxagentLastEventTime; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c index fe7e10d82..fb2979a1f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.c @@ -99,6 +99,9 @@ char * nxagentSpecialKeystrokeNames[] = { "viewport_scroll_down", "reread_keystrokes", + + "autograb", + NULL, }; @@ -138,6 +141,7 @@ struct nxagentSpecialKeystrokeMap default_map[] = { {KEYSTROKE_VIEWPORT_SCROLL_DOWN, ControlMask, True, XK_Down}, {KEYSTROKE_VIEWPORT_SCROLL_DOWN, ControlMask, True, XK_KP_Down}, {KEYSTROKE_REREAD_KEYSTROKES, ControlMask, True, XK_k}, + {KEYSTROKE_AUTOGRAB, ControlMask, True, XK_g}, {KEYSTROKE_END_MARKER, 0, False, NoSymbol}, }; struct nxagentSpecialKeystrokeMap *map = default_map; @@ -467,7 +471,7 @@ static enum nxagentSpecialKeystroke find_keystroke(XKeyEvent *X) #endif for (struct nxagentSpecialKeystrokeMap *cur = map; cur->stroke != KEYSTROKE_END_MARKER; cur++) { #ifdef DEBUG - fprintf(stderr, "%s: checking keysym '%c' (%d)\n", __func__, cur->keysym, cur->keysym); + fprintf(stderr,"%s: keysym %d stroke %d, type %d\n", __func__, cur->keysym, cur->stroke, X->type); #endif if (cur->keysym == keysym && modifier_matches(cur->modifierMask, cur->modifierAltMeta, X->state)) { #ifdef DEBUG @@ -627,6 +631,9 @@ Bool nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result) if (X->type == KeyRelease) nxagentInitKeystrokes(True); break; + case KEYSTROKE_AUTOGRAB: + *result = doAutoGrab; + break; case KEYSTROKE_NOTHING: /* do nothing. difference to KEYSTROKE_IGNORE is the return value */ case KEYSTROKE_END_MARKER: /* just to make gcc STFU */ case KEYSTROKE_MAX: diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h index 13a83d0fe..9d7c4c4d5 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Keystroke.h @@ -73,6 +73,8 @@ enum nxagentSpecialKeystroke { KEYSTROKE_REREAD_KEYSTROKES, + KEYSTROKE_AUTOGRAB, + KEYSTROKE_NOTHING, /* insert more here and in the string translation */ -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit ebfd8742cb043f718704622b0b8495affe98a708 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Apr 20 14:19:27 2017 +0200 Args.c: make autograb available via options file, too. --- nx-X11/programs/Xserver/hw/nxagent/Args.c | 13 +++++++++++++ nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 4 ++++ 2 files changed, 17 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index cbdb2fd9d..2d998980c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -1547,6 +1547,19 @@ static void nxagentParseSingleOption(char *name, char *value) return; } + else if (!strcmp(name, "autograb")) + { + if (!strcmp(value, "0")) + { + nxagentChangeOption(AutoGrab, False); + } + else + { + nxagentChangeOption(AutoGrab, True); + } + + return; + } else { #ifdef DEBUG diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 860efd6ac..fbf01f8ea 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -756,6 +756,10 @@ format must be included in both. This is potentially unsafe. means that all of these checks are essentially deactivated. This is a very bad idea. .RE +.TP 8 +.B autograb=<int> +enable or disable autograb (default: disabled) +.RE If you want to use \fBnxagent\fR as a replacement for Xnest or Xephyr you can pass options like this: -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 4eaedd002e8628bb6738d2b3994628b1fef3837a Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Mar 16 13:12:01 2017 +0100 Args.c: Add command line option -autograb. --- nx-X11/programs/Xserver/hw/nxagent/Args.c | 9 +++++++++ nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 3 +++ 2 files changed, 12 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c index 1d8beca3d..cbdb2fd9d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Args.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c @@ -1039,6 +1039,14 @@ int ddxProcessArgument(int argc, char *argv[], int i) return 0; } + if (!strcmp(argv[i], "-autograb")) + { + nxagentChangeOption(AutoGrab, True); + + return 1; + } + + /* * Disable Xinerama (i.e. fake it in Screen.c) if somehow Xinerama support * has been disabled on the cmdline. @@ -2195,6 +2203,7 @@ void ddxUseMsg(void) ErrorF("-noignore don't ignore pointer and keyboard configuration changes mandated by clients\n"); ErrorF("-nokbreset don't reset keyboard device if the session is resumed\n"); ErrorF("-noxkblock always allow applications to change layout through XKEYBOARD\n"); + ErrorF("-autograb enable autograb\n"); ErrorF("-tile WxH size of image tiles (minimum allowed: 32x32)\n"); ErrorF("-keystrokefile file file with keyboard shortcut definitions\n"); ErrorF("-verbose print more warning and error messages\n"); diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index 34ac7d7d0..860efd6ac 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -457,6 +457,9 @@ The nx-X11 system adds the following command line arguments: .B \-forcenx force use of NX protocol messages assuming communication through \fBnxproxy\fR .TP 8 +.B \-autograb +enable autograb mode on \fBnxagent\fR startup. The autograb feature can be toggled via nxagent keystrokes +.TP 8 .B \-nxrealwindowprop set property NX_REAL_WINDOW for each X11 client inside \fBnxagent\fR, providing the window XID of the corresponding window object on the X -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6dcdc578f450c71933d7f7c40383358f73e45358 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu May 18 15:08:29 2017 +0200 Events.c: improve debugging output for FocusIn/Out --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 60 +++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 8bc06e0ae..c9f5324a0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -292,6 +292,36 @@ void ProcessInputEvents(void) mieqProcessInputEvents(); } +#ifdef DEBUG +char * nxagentGetNotifyMode(int mode) +{ + switch (mode) + { + case NotifyNormal: + { + return "NotifyNormal"; + break; + } + case NotifyGrab: + { + return "NotifyGrab"; + break; + } + case NotifyUngrab: + { + return "NotifyUngrab"; + break; + } + case NotifyWhileGrabbed: + { + return "NotifyWhileGrabbed"; + break; + } + } + return "Unknown"; +} +#endif + #ifdef DEBUG_TREE /* @@ -1530,8 +1560,18 @@ FIXME: Don't enqueue the KeyRelease event if the key was { WindowPtr pWin; - #ifdef TEST - fprintf(stderr, "nxagentDispatchEvents: Going to handle new FocusIn event.\n"); + #ifdef DEBUG + fprintf(stderr, "%s: Going to handle new FocusIn event [0x%x] mode: [%s]\n", __func__, X.xfocus.window, nxagentGetNotifyMode(X.xfocus.mode)); + { + XlibWindow w; + int revert_to; + XGetInputFocus(nxagentDisplay, &w, &revert_to); + fprintf(stderr, "%s: (FocusIn): Event win [0x%x] Focus owner [0x%x] nxagentDefaultWindows[0] [0x%x]\n", __func__, X.xfocus.window, w, nxagentDefaultWindows[0]); + } + #else + #ifdef TEST + fprintf(stderr, "%s: Going to handle new FocusIn event\n", __func__); + #endif #endif /* @@ -1567,13 +1607,25 @@ FIXME: Don't enqueue the KeyRelease event if the key was #endif nxagentGrabPointerAndKeyboard(NULL); } + /* else + { + #ifdef DEBUG + fprintf(stderr, "%s: (FocusIn): ungrabbing\n", __func__); + #endif + nxagentUngrabPointerAndKeyboard(NULL); + } + */ } break; } case FocusOut: { - #ifdef TEST - fprintf(stderr, "nxagentDispatchEvents: Going to handle new FocusOut event.\n"); + #ifdef DEBUG + fprintf(stderr, "%s: Going to handle new FocusOut event [0x%x] mode: [%s]\n", __func__, X.xfocus.window, nxagentGetNotifyMode(X.xfocus.mode)); + #else + #ifdef TEST + fprintf(stderr, "%s: Going to handle new FocusOut event.\n", __func__); + #endif #endif if (X.xfocus.detail != NotifyInferior) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 8bf3429bc9f7aed5b85cf8c0dd71ae678bce544e Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Mar 16 13:00:48 2017 +0100 nxagent: Make autograb an nxagentOption. --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 12 +++++------- nx-X11/programs/Xserver/hw/nxagent/Options.c | 2 ++ nx-X11/programs/Xserver/hw/nxagent/Options.h | 7 +++++++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 95a00afbf..8bc06e0ae 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -674,8 +674,6 @@ static void nxagentSwitchDeferMode(void) } } -static Bool autograb = False; - static void nxagentEnableAutoGrab(void) { #ifdef DEBUG @@ -683,7 +681,7 @@ static void nxagentEnableAutoGrab(void) #endif nxagentGrabPointerAndKeyboard(NULL); - autograb = True; + nxagentChangeOption(AutoGrab, True); } static void nxagentDisableAutoGrab(void) @@ -693,7 +691,7 @@ static void nxagentDisableAutoGrab(void) #endif nxagentUngrabPointerAndKeyboard(NULL); - autograb = False; + nxagentChangeOption(AutoGrab, False); } static void nxagentToggleAutoGrab(void) @@ -702,7 +700,7 @@ static void nxagentToggleAutoGrab(void) if (nxagentOption(Rootless) || nxagentOption(Fullscreen)) return; - if (!autograb) + if (!nxagentOption(AutoGrab)) nxagentEnableAutoGrab(); else nxagentDisableAutoGrab(); @@ -1560,7 +1558,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was } /* FIXME: only when in windowed mode! */ - if (autograb) + if (nxagentOption(AutoGrab)) { if (X.xfocus.window == nxagentDefaultWindows[0] && X.xfocus.mode == NotifyNormal) { @@ -1648,7 +1646,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was #endif /* NXAGENT_FIXKEYS */ - if (autograb) + if (nxagentOption(AutoGrab)) { XlibWindow w; int revert_to; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.c b/nx-X11/programs/Xserver/hw/nxagent/Options.c index c06967c76..10e006a23 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Options.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Options.c @@ -172,6 +172,8 @@ void nxagentInitOptions(void) nxagentOptions.ReconnectTolerance = DEFAULT_TOLERANCE; nxagentOptions.KeycodeConversion = DEFAULT_KEYCODE_CONVERSION; + + nxagentOptions.AutoGrab = False; } /* diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.h b/nx-X11/programs/Xserver/hw/nxagent/Options.h index b5394ee01..88bb60e8f 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Options.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Options.h @@ -450,6 +450,13 @@ typedef struct _AgentOptions * Convert evdev keycodes to pc105. */ KeycodeConversionMode KeycodeConversion; + + /* + * True if agent should grab the input in windowed mode whenever the + * agent window gets the focus + */ + int AutoGrab; /* Should be Bool but I do not want to include Xlib.h here */ + } AgentOptionsRec; typedef AgentOptionsRec *AgentOptionsPtr; -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit a4d7a04c45ceac0c33ddd7e32495db07906bdba0 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu May 18 15:09:29 2017 +0200 Events.c: do not ungrab keyboard on LeaveNotify when in autograb mode --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index c9f5324a0..76a324fdb 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -1846,11 +1846,14 @@ FIXME: Don't enqueue the KeyRelease event if the key was nxagentLastEnteredWindow = NULL; } - if (X.xcrossing.window == nxagentDefaultWindows[0] && - X.xcrossing.detail != NotifyInferior && - X.xcrossing.mode == NotifyNormal) + if (!nxagentOption(AutoGrab)) { - nxagentUngrabPointerAndKeyboard(&X); + if (X.xcrossing.window == nxagentDefaultWindows[0] && + X.xcrossing.detail != NotifyInferior && + X.xcrossing.mode == NotifyNormal) + { + nxagentUngrabPointerAndKeyboard(&X); + } } if (X.xcrossing.detail != NotifyInferior) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 03aa5d7430817fe74499102dbc05cfd4d533c068 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu May 25 23:20:50 2017 +0200 Events.c: Autograb only for windowed modes This also make re-autograbbing after switch back from AllScreens work. --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 76a324fdb..d62bb6866 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -1597,8 +1597,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was } } - /* FIXME: only when in windowed mode! */ - if (nxagentOption(AutoGrab)) + if (nxagentOption(AutoGrab) && !(nxagentOption(AllScreens) || nxagentOption(Fullscreen) || nxagentOption(Rootless))) { if (X.xfocus.window == nxagentDefaultWindows[0] && X.xfocus.mode == NotifyNormal) { -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 14d8e0a2a69f2468a49fcb53c4ba7e12cea10b1d Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Mon Jul 24 14:48:29 2017 +0200 Dialog.c: Add NXTransDialog() call for autograb toggling. --- nx-X11/programs/Xserver/hw/nxagent/Dialog.c | 50 +++++++++++++++++++++++++++++ nx-X11/programs/Xserver/hw/nxagent/Dialog.h | 30 +++++++++++++++++ nx-X11/programs/Xserver/hw/nxagent/Events.c | 2 ++ 3 files changed, 82 insertions(+) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c index 753b9d708..0dcdda5a4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.c @@ -63,6 +63,8 @@ int nxagentEnableRandRModeDialogPid = 0; int nxagentDisableRandRModeDialogPid = 0; int nxagentEnableDeferModePid = 0; int nxagentDisableDeferModePid = 0; +int nxagentEnableAutograbModePid = 0; +int nxagentDisableAutograbModePid = 0; static int nxagentFailedReconnectionDialogPid = 0; @@ -158,6 +160,24 @@ void nxagentResetDialog(int pid) nxagentDisableDeferModePid = 0; } + else if (pid == nxagentEnableAutograbModePid) + { + #ifdef TEST + fprintf(stderr, "nxagentResetDialog: Resetting enable autograb mode dialog pid [%d].\n", + nxagentEnableAutograbModePid); + #endif + + nxagentEnableAutograbModePid = 0; + } + else if (pid == nxagentDisableAutograbModePid) + { + #ifdef TEST + fprintf(stderr, "nxagentResetDialog: Resetting disable autograb mode dialog pid [%d].\n", + nxagentDisableAutograbModePid); + #endif + + nxagentDisableAutograbModePid = 0; + } } void nxagentLaunchDialog(DialogType dialogType) @@ -263,6 +283,24 @@ void nxagentLaunchDialog(DialogType dialogType) break; } + case DIALOG_ENABLE_AUTOGRAB_MODE: + { + message = DIALOG_ENABLE_AUTOGRAB_MODE_MESSAGE; + type = DIALOG_ENABLE_AUTOGRAB_MODE_TYPE; + local = DIALOG_ENABLE_AUTOGRAB_MODE_LOCAL; + pid = &nxagentEnableAutograbModePid; + + break; + } + case DIALOG_DISABLE_AUTOGRAB_MODE: + { + message = DIALOG_DISABLE_AUTOGRAB_MODE_MESSAGE; + type = DIALOG_DISABLE_AUTOGRAB_MODE_TYPE; + local = DIALOG_DISABLE_AUTOGRAB_MODE_LOCAL; + pid = &nxagentDisableAutograbModePid; + + break; + } default: { #ifdef WARNING @@ -496,6 +534,18 @@ void nxagentTerminateDialog(DialogType type) break; } + case DIALOG_ENABLE_AUTOGRAB_MODE: + { + pid = nxagentEnableAutograbModePid; + + break; + } + case DIALOG_DISABLE_AUTOGRAB_MODE: + { + pid = nxagentDisableAutograbModePid; + + break; + } default: { #ifdef WARNING diff --git a/nx-X11/programs/Xserver/hw/nxagent/Dialog.h b/nx-X11/programs/Xserver/hw/nxagent/Dialog.h index ffcdf48f2..42bba290d 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Dialog.h +++ b/nx-X11/programs/Xserver/hw/nxagent/Dialog.h @@ -41,6 +41,8 @@ typedef enum DIALOG_FAILED_RECONNECTION, DIALOG_ENABLE_DEFER_MODE, DIALOG_DISABLE_DEFER_MODE, + DIALOG_ENABLE_AUTOGRAB_MODE, + DIALOG_DISABLE_AUTOGRAB_MODE, DIALOG_LAST_TAG } DialogType; @@ -54,6 +56,8 @@ extern int nxagentEnableRandRModeDialogPid; extern int nxagentDisableRandRModeDialogPid; extern int nxagentEnableDeferModePid; extern int nxagentDisableDeferModePid; +extern int nxagentEnableAutograbModePid; +extern int nxagentDisableAutograbModePid; #define NXAGENTFAILEDRECONNECTIONMESSAGELENGTH 256 extern char nxagentFailedReconnectionMessage[NXAGENTFAILEDRECONNECTIONMESSAGELENGTH]; @@ -87,6 +91,8 @@ extern void nxagentTerminateDialogs(void); (type) == DIALOG_FAILED_RECONNECTION ? "DIALOG_FAILED_RECONNECTION" : \ (type) == DIALOG_ENABLE_DEFER_MODE ? "DIALOG_ENABLE_DEFER_MODE" : \ (type) == DIALOG_DISABLE_DEFER_MODE ? "DIALOG_DISABLE_DEFER_MODE" : \ + (type) == DIALOG_ENABLE_AUTOGRAB_MODE ? "DIALOG_ENABLE_AUTGRAB_MODE" : \ + (type) == DIALOG_DISABLE_AUTOGRAB_MODE ? "DIALOG_DISABLE_AUTOGRAB_MODE" : \ "UNKNOWN_DIALOG") /* @@ -214,5 +220,29 @@ Ctrl+Alt+E to enable it again.\ #define DIALOG_DISABLE_DEFER_MODE_LOCAL 0 + +#define DIALOG_ENABLE_AUTOGRAB_MODE_MESSAGE \ +\ +"\ +Keyboard auto-grabbing mode is now enabled. You can press\n\ +Ctrl+Alt+G again to disable auto-grabbing.\ +" + +#define DIALOG_ENABLE_AUTOGRAB_MODE_TYPE "ok" + +#define DIALOG_ENABLE_AUTOGRAB_MODE_LOCAL 0 + + +#define DIALOG_DISABLE_AUTOGRAB_MODE_MESSAGE \ +\ +"\ +Keyboard auto-grabbing mode is now disabled. You can press\n\ +Ctrl+Alt+G again to re-enable auto-grabbing.\ +" + +#define DIALOG_DISABLE_AUTOGRAB_MODE_TYPE "ok" + +#define DIALOG_DISABLE_AUTOGRAB_MODE_LOCAL 0 + #endif /* __Dialog_H__ */ diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index d62bb6866..020278841 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -712,6 +712,7 @@ static void nxagentEnableAutoGrab(void) nxagentGrabPointerAndKeyboard(NULL); nxagentChangeOption(AutoGrab, True); + nxagentLaunchDialog(DIALOG_ENABLE_AUTOGRAB_MODE); } static void nxagentDisableAutoGrab(void) @@ -722,6 +723,7 @@ static void nxagentDisableAutoGrab(void) nxagentUngrabPointerAndKeyboard(NULL); nxagentChangeOption(AutoGrab, False); + nxagentLaunchDialog(DIALOG_DISABLE_AUTOGRAB_MODE); } static void nxagentToggleAutoGrab(void) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 063813d35549a52358b0df8e5ede4e105f2e4d96 Author: Ulrich Sibiller <uli42@gmx.de> Date: Thu Jun 27 23:43:44 2019 +0200 Make AutoGrab work in more situations Especially switchin to/from fullscreen with active AutoGrab was problematic. Works much smoother now. --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Window.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index 020278841..f3e7880c8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -1699,7 +1699,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was #endif /* NXAGENT_FIXKEYS */ - if (nxagentOption(AutoGrab)) + if (nxagentOption(AutoGrab) && !nxagentFullscreenWindow) { XlibWindow w; int revert_to; diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index 59b33b6be..80e9bef3b 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -754,7 +754,12 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn) else { nxagentFullscreenWindow = None; - nxagentUngrabPointerAndKeyboard(NULL); + + /* if we had AutoGrab before entering fullscreen reactivate it now */ + if (nxagentOption(AutoGrab)) + nxagentGrabPointerAndKeyboard(NULL); + else + nxagentUngrabPointerAndKeyboard(NULL); } } @@ -1005,6 +1010,10 @@ void nxagentSwitchAllScreens(ScreenPtr pScreen, Bool switchOn) XMoveResizeWindow(nxagentDisplay, nxagentInputWindows[0], 0, 0, nxagentOption(Width), nxagentOption(Height)); + /* if we had AutoGrab before entering fullscreen reactivate it now */ + if (nxagentOption(AutoGrab)) + nxagentGrabPointerAndKeyboard(NULL); + nxagentSetPrintGeometry(pScreen -> myNum); } -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit e428e39de924e5ebf7e5cb2aff4b0ab4f2c399f8 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Aug 27 15:14:49 2019 +0200 debian/{nxagent,nxdialog}.install: Move nxdialog files from nxagent.install to nxdialog.install. --- debian/nxagent.install | 2 -- debian/nxdialog.install | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/nxagent.install b/debian/nxagent.install index 1f2a7966f..402b3b529 100644 --- a/debian/nxagent.install +++ b/debian/nxagent.install @@ -1,9 +1,7 @@ etc/nxagent/keystrokes.cfg usr/bin/nxagent -usr/bin/nxdialog usr/lib/*/nx/X11/ usr/share/man/man1/nxagent.1* -usr/share/man/man1/nxdialog.1* usr/share/nx/VERSION.nxagent usr/share/pixmaps/nxagent.xpm # FIXME: compatibility symlink, drop for 3.6.0 release diff --git a/debian/nxdialog.install b/debian/nxdialog.install new file mode 100644 index 000000000..e0a6946e7 --- /dev/null +++ b/debian/nxdialog.install @@ -0,0 +1,2 @@ +usr/bin/nxdialog +usr/share/man/man1/nxdialog.1* -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6bca289afd17db8e1faf3db884153a6cad40283f Merge: daa50fd80 6181aa911 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Aug 27 14:11:53 2019 +0200 Merge branch 'uli42-gh-sunweaver/pr/autograb-without-inputlock' into 3.6.x Attributes GH PR #835: https://github.com/ArcticaProject/nx-libs/pull/835 doc/nxagent/README.keystrokes | 3 + etc/keystrokes.cfg | 1 + nx-X11/programs/Xserver/hw/nxagent/Args.c | 22 +++ nx-X11/programs/Xserver/hw/nxagent/Dialog.c | 50 +++++++ nx-X11/programs/Xserver/hw/nxagent/Dialog.h | 30 +++++ nx-X11/programs/Xserver/hw/nxagent/Events.c | 163 +++++++++++++++++++++-- nx-X11/programs/Xserver/hw/nxagent/Events.h | 3 +- nx-X11/programs/Xserver/hw/nxagent/Keystroke.c | 9 +- nx-X11/programs/Xserver/hw/nxagent/Keystroke.h | 2 + nx-X11/programs/Xserver/hw/nxagent/Options.c | 2 + nx-X11/programs/Xserver/hw/nxagent/Options.h | 7 + nx-X11/programs/Xserver/hw/nxagent/Window.c | 11 +- nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 7 + 13 files changed, 296 insertions(+), 14 deletions(-) -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 6181aa9113cc1e852d405ef85c184e32e7fad6c4 Author: Ulrich Sibiller <uli42@gmx.de> Date: Wed Aug 14 20:59:49 2019 +0200 Events.c: introduce separate debug level for autograb debugging only We should do something similar for all subsystems over time... --- nx-X11/programs/Xserver/hw/nxagent/Events.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Events.c b/nx-X11/programs/Xserver/hw/nxagent/Events.c index f3e7880c8..4a6a05482 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Events.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Events.c @@ -115,6 +115,15 @@ #undef TEST #undef DEBUG +/* debug individual subsystems */ +#undef DEBUG_AUTOGRAB + +/* aktivate subsystems if generic DEBUG is activated */ +#ifdef DEBUG +#ifndef DEBUG_AUTOGRAB +#define DEBUG_AUTOGRAB +#endif +#endif /* * Log begin and end of the important handlers. */ @@ -706,9 +715,9 @@ static void nxagentSwitchDeferMode(void) static void nxagentEnableAutoGrab(void) { -#ifdef DEBUG + #ifdef DEBUG_AUTOGRAB fprintf(stderr, "enabling autograb\n"); -#endif + #endif nxagentGrabPointerAndKeyboard(NULL); nxagentChangeOption(AutoGrab, True); @@ -717,9 +726,9 @@ static void nxagentEnableAutoGrab(void) static void nxagentDisableAutoGrab(void) { -#ifdef DEBUG + #ifdef DEBUG_AUTOGRAB fprintf(stderr, "disabling autograb\n"); -#endif + #endif nxagentUngrabPointerAndKeyboard(NULL); nxagentChangeOption(AutoGrab, False); @@ -1603,14 +1612,14 @@ FIXME: Don't enqueue the KeyRelease event if the key was { if (X.xfocus.window == nxagentDefaultWindows[0] && X.xfocus.mode == NotifyNormal) { - #ifdef DEBUG + #if defined(DEBUG) || defined(DEBUG_AUTOGRAB) fprintf(stderr, "%s: (FocusIn): grabbing\n", __func__); #endif nxagentGrabPointerAndKeyboard(NULL); } /* else { - #ifdef DEBUG + #if defined(DEBUG) || defined(DEBUG_AUTOGRAB) fprintf(stderr, "%s: (FocusIn): ungrabbing\n", __func__); #endif nxagentUngrabPointerAndKeyboard(NULL); @@ -1706,7 +1715,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was XGetInputFocus(nxagentDisplay, &w, &revert_to); if (w != nxagentDefaultWindows[0] && X.xfocus.mode == NotifyWhileGrabbed) { - #ifdef DEBUG + #if defined(DEBUG) || defined(DEBUG_AUTOGRAB) fprintf(stderr, "%s: (FocusOut): ungrabbing\n", __func__); #endif nxagentUngrabPointerAndKeyboard(NULL); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 1b967c70186d77fdde1a0898916ae90c2d58c420 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Aug 27 15:14:25 2019 +0200 debian/control: Split-out nxdialog bin:pkg. --- debian/control | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/debian/control b/debian/control index 1c1a6d324..886d62eeb 100644 --- a/debian/control +++ b/debian/control @@ -330,9 +330,6 @@ Depends: libnx-x11-6 (= ${binary:Version}), libxcomp3 (= ${binary:Version}), libxcompshad3 (= ${binary:Version}), - python3, - python3-gi, - gir1.2-gtk-3.0, x11-xkb-utils, ${misc:Depends}, ${shlibs:Depends}, @@ -378,6 +375,28 @@ Description: NX agent (debug package) helpful backtraces. You can safely remove it if you do not intend to debug NX packages on this system. +Package: nxdialog +Architecture: all +Depends: + python3, + python3-gi, + gir1.2-gtk-3.0, + x11-xkb-utils, + ${misc:Depends}, +Recommends: + nxagent, +Breaks: + nxagent (<< 2:3.5.99.21-2~), +Replaces: + nxagent (<< 2:3.5.99.21-2~), +Description: Dialogs for NX Agent + NX is a software suite which implements very efficient + compression of the X11 protocol. This increases performance when + using X applications over a network, especially a slow one. + . + nxdialog adds dialog windows/menus to nxagent. They get triggered by + certain actions within the NX Agent Xserver. + Package: nxproxy Architecture: any Multi-Arch: foreign -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 57d3a42c22f7213e782f89429c1a072833f90785 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Aug 27 15:46:37 2019 +0200 release 3.5.99.22 --- ChangeLog | 350 ++++++++++++++++++++++- VERSION | 2 +- debian/changelog | 9 +- debian/control | 4 +- nx-X11/extras/Mesa_6.4.2/progs/images/bw.rgb | Bin 206452 -> 206452 bytes nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 | 2 +- nx-libs.spec | 4 +- nxdialog/bin/nxdialog | 4 +- nxdialog/man/nxdialog.1 | 2 +- nxproxy/man/nxproxy.1 | 2 +- 10 files changed, 366 insertions(+), 13 deletions(-) diff --git a/ChangeLog b/ChangeLog index bab87ec6b..3e6265951 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,352 @@ -2019-08-05 18:32:16 +0200 Mike Gabriel (0166fc3a3) +2019-08-27 15:46:37 +0200 Mike Gabriel (885116a4b) - * release 3.5.99.21 (HEAD -> 3.6.x, tag: 3.5.99.21) + * release 3.5.99.22 (HEAD -> 3.6.x, tag: 3.5.99.22) + +2019-08-27 15:15:47 +0200 Mike Gabriel (7d07442d7) + + * debian/copyright: Update copyright attributions. + +2019-08-27 15:14:49 +0200 Mike Gabriel (e428e39de) + + * debian/{nxagent,nxdialog}.install: Move nxdialog files from + nxagent.install to nxdialog.install. + +2019-08-27 15:14:25 +0200 Mike Gabriel (1b967c701) + + * debian/control: Split-out nxdialog bin:pkg. + +2019-08-27 14:11:53 +0200 Mike Gabriel (6bca289af) + + * Merge branch 'uli42-gh-sunweaver/pr/autograb-without-inputlock' + into 3.6.x + +2019-08-14 20:59:49 +0200 Ulrich Sibiller (6181aa911) + + * Events.c: introduce separate debug level for autograb debugging + only + +2019-06-27 23:43:44 +0200 Ulrich Sibiller (063813d35) + + * Make AutoGrab work in more situations + +2017-07-24 14:48:29 +0200 Mike Gabriel (14d8e0a2a) + + * Dialog.c: Add NXTransDialog() call for autograb toggling. + +2017-05-25 23:20:50 +0200 Ulrich Sibiller (03aa5d743) + + * Events.c: Autograb only for windowed modes + +2017-05-18 15:09:29 +0200 Ulrich Sibiller (a4d7a04c4) + + * Events.c: do not ungrab keyboard on LeaveNotify when in autograb + mode + +2017-05-18 15:08:29 +0200 Ulrich Sibiller (6dcdc578f) + + * Events.c: improve debugging output for FocusIn/Out + +2017-04-20 14:19:27 +0200 Ulrich Sibiller (ebfd8742c) + + * Args.c: make autograb available via options file, too. + +2017-03-16 13:12:01 +0100 Ulrich Sibiller (4eaedd002) + + * Args.c: Add command line option -autograb. + +2017-03-16 13:00:48 +0100 Ulrich Sibiller (8bf3429bc) + + * nxagent: Make autograb an nxagentOption. + +2017-03-05 23:51:24 +0100 Ulrich Sibiller (58183b7ce) + + * nxagent: Add autograb mode. + +2019-08-27 08:33:22 +0200 Mike Gabriel (daa50fd80) + + * Merge branch 'uli42-pr/fix_double_free' into 3.6.x + +2019-08-12 23:11:34 +0200 Ulrich Sibiller (a7abd45a8) + + * Screen.c: initialize RandR only on startup... + +2019-08-27 08:27:42 +0200 Mike Gabriel (6f80a06fb) + + * Merge branch 'uli42-pr/safe_free' into 3.6.x + +2019-08-16 13:11:38 +0200 Ulrich Sibiller (f39b81d31) + + * NXdispatch.c: move nxagentWMtimeout into the function + +2019-08-16 13:08:42 +0200 Ulrich Sibiller (4202d5094) + + * NXdispatch.c: drop currentDispatch variable + +2019-08-16 13:02:01 +0200 Ulrich Sibiller (60a3c9b0a) + + * nxagent: move nxagentWMPassed to Splash.c + +2019-08-16 12:55:28 +0200 Ulrich Sibiller (db4c220b2) + + * nxagent: add NXAGENT_ONSTART where missing + +2019-08-16 12:54:10 +0200 Ulrich Sibiller (0f5e873dc) + + * nxagent: drop NXAGENT_SPLASH + +2019-08-16 12:46:21 +0200 Ulrich Sibiller (784846317) + + * nxagent: rename nxagentWMStart to nxagentReadyAtom + +2019-08-16 12:38:53 +0200 Ulrich Sibiller (bd002ffc5) + + * Splash.c: move some variables to Splash.c + +2019-08-15 22:33:35 +0200 Ulrich Sibiller (5bb5adc8a) + + * Splash.c: make Splash logo work with white background (-wr) mode, + too + +2019-08-15 22:10:45 +0200 Ulrich Sibiller (41bfed975) + + * Splash.c: remove global variables for colors + +2019-08-15 22:06:14 +0200 Ulrich Sibiller (e12983a67) + + * nxagent: drop nxagentRootTileWindow + +2019-08-15 22:04:07 +0200 Ulrich Sibiller (bfb4e9ac9) + + * Splash.c: nxagentRemoveSplashWindow: drop unused parameter + +2019-08-11 01:59:42 +0200 Ulrich Sibiller (48c43c837) + + * Splash.c: code cleanup + +2019-08-11 01:51:37 +0200 Ulrich Sibiller (208e58fb7) + + * Splash.c: drop return code of nxagentShowSplashWindow + +2019-08-11 01:47:16 +0200 Ulrich Sibiller (9cd602b27) + + * Splash.c: do not wait in nxagent mode + +2019-08-11 00:21:44 +0200 Ulrich Sibiller (8eeaa40b1) + + * dix: add whiteroot flag + +2019-08-10 23:56:22 +0200 Ulrich Sibiller (817c3c6fc) + + * NXwindow.c: simplify window background code + +2019-08-10 23:42:45 +0200 Ulrich Sibiller (d3869aa53) + + * nxagent: fix main window being garbled without inner windows + +2018-05-05 18:56:35 +0200 Ulrich Sibiller (17495dd6a) + + * nxagent: simplify nxagentWaitEvents() + +2019-06-28 22:10:23 +0200 Ulrich Sibiller (1d32e5368) + + * Keystroke.c: fix wrong return code + +2019-06-28 22:09:23 +0200 Ulrich Sibiller (bcbf25510) + + * Events.c: add more comments and TEST output + +2019-06-28 22:07:00 +0200 Ulrich Sibiller (e7451477e) + + * Events.c: refactor nxagentHandleKeypress + +2019-08-27 08:14:23 +0200 Mike Gabriel (8b15d574b) + + * Merge branch 'uli42-pr/fix_background' into 3.6.x + +2019-08-16 13:11:38 +0200 Ulrich Sibiller (3563959c0) + + * NXdispatch.c: move nxagentWMtimeout into the function + +2019-08-16 13:08:42 +0200 Ulrich Sibiller (c34d1b201) + + * NXdispatch.c: drop currentDispatch variable + +2019-08-16 13:02:01 +0200 Ulrich Sibiller (ab8015237) + + * nxagent: move nxagentWMPassed to Splash.c + +2019-08-16 12:55:28 +0200 Ulrich Sibiller (b04b58bad) + + * nxagent: add NXAGENT_ONSTART where missing + +2019-08-16 12:54:10 +0200 Ulrich Sibiller (2228513a6) + + * nxagent: drop NXAGENT_SPLASH + +2019-08-16 12:46:21 +0200 Ulrich Sibiller (24f392c4a) + + * nxagent: rename nxagentWMStart to nxagentReadyAtom + +2019-08-16 12:38:53 +0200 Ulrich Sibiller (798a053b4) + + * Splash.c: move some variables to Splash.c + +2019-08-15 22:33:35 +0200 Ulrich Sibiller (074821a84) + + * Splash.c: make Splash logo work with white background (-wr) mode, + too + +2019-08-15 22:10:45 +0200 Ulrich Sibiller (afebb8211) + + * Splash.c: remove global variables for colors + +2019-08-15 22:06:14 +0200 Ulrich Sibiller (8fcaafab4) + + * nxagent: drop nxagentRootTileWindow + +2019-08-15 22:04:07 +0200 Ulrich Sibiller (be508a447) + + * Splash.c: nxagentRemoveSplashWindow: drop unused parameter + +2019-08-11 01:59:42 +0200 Ulrich Sibiller (612cbcc43) + + * Splash.c: code cleanup + +2019-08-11 01:51:37 +0200 Ulrich Sibiller (3c92d8897) + + * Splash.c: drop return code of nxagentShowSplashWindow + +2019-08-11 01:47:16 +0200 Ulrich Sibiller (470e0bd4d) + + * Splash.c: do not wait in nxagent mode + +2019-08-11 00:21:44 +0200 Ulrich Sibiller (a539aaa6a) + + * dix: add whiteroot flag + +2019-08-10 23:56:22 +0200 Ulrich Sibiller (c610d706b) + + * NXwindow.c: simplify window background code + +2019-08-10 23:42:45 +0200 Ulrich Sibiller (d7d205c0d) + + * nxagent: fix main window being garbled without inner windows + +2019-08-16 11:52:35 +0200 Mike Gabriel (f24767b3c) + + * Merge branch 'uli42-pr/improve_wait_events' into 3.6.x + +2018-05-05 18:56:35 +0200 Ulrich Sibiller (62573abf0) + + * nxagent: simplify nxagentWaitEvents() + +2019-08-16 11:50:10 +0200 Mike Gabriel (7f4b50deb) + + * Merge branch 'uli42-pr/no_keystroke_passthrough' into 3.6.x + +2019-06-28 22:10:23 +0200 Ulrich Sibiller (ceeb53f0c) + + * Keystroke.c: fix wrong return code + +2019-06-28 22:09:23 +0200 Ulrich Sibiller (b3d41485d) + + * Events.c: add more comments and TEST output + +2019-06-28 22:07:00 +0200 Ulrich Sibiller (c260ae425) + + * Events.c: refactor nxagentHandleKeypress + +2019-07-23 20:12:31 +0200 Ulrich Sibiller (504b1400e) + + * Clipboard.c: use SAFE_free + +2019-07-23 20:10:43 +0200 Ulrich Sibiller (4421f787d) + + * Atoms.c: use SAFE_XFree and SAFE_free macros + +2019-07-22 22:26:46 +0200 Ulrich Sibiller (7d25771da) + + * Keystroke.c: use SAFE_free + +2019-07-22 22:25:40 +0200 Ulrich Sibiller (8080ad26a) + + * GCOps.c: use SAFE_free + +2019-07-22 22:24:37 +0200 Ulrich Sibiller (6378d5ade) + + * GC.c: use SAFE_free + +2019-07-22 22:22:31 +0200 Ulrich Sibiller (a9819436d) + + * Drawable.c: use SAFE_free + +2019-07-22 22:20:47 +0200 Ulrich Sibiller (43e300ecd) + + * Colormap.c: use SAFE_free + +2019-07-22 22:19:15 +0200 Ulrich Sibiller (633d04097) + + * Args.c: use SAFE_free + +2019-07-22 22:17:25 +0200 Ulrich Sibiller (122fbd3e1) + + * Error.c: use SAFE_free + +2019-07-22 21:53:20 +0200 Ulrich Sibiller (dde4e7636) + + * Image.c: use SAFE_free + +2019-07-22 21:50:19 +0200 Ulrich Sibiller (458538010) + + * Render.c: use SAFE_free + +2019-07-22 21:45:25 +0200 Ulrich Sibiller (8b74ff1c1) + + * Pixmap.c: use SAFE_free + +2019-07-22 21:44:25 +0200 Ulrich Sibiller (34bd0942b) + + * Reconnect.c: use SAFE_free + +2019-07-22 21:34:42 +0200 Ulrich Sibiller (fd4fa4e96) + + * Keyboard.c: use SAFE_XFree and SAFE_free + +2019-07-22 21:33:54 +0200 Ulrich Sibiller (156533439) + + * Cursor.c: use SAFE_XFree + +2019-07-22 21:32:58 +0200 Ulrich Sibiller (d0a6c98cb) + + * Window.c: use SAFE_free and SAFE_XFree + +2019-07-22 21:29:31 +0200 Ulrich Sibiller (4a826d30f) + + * Rootless.c: use SAFE_free and SAFE_XFree + +2019-07-22 21:27:10 +0200 Ulrich Sibiller (a4700c9d0) + + * Font.c: use SAFE_XFree and SAFE_free + +2019-07-22 18:11:59 +0200 Ulrich Sibiller (d8012d2a8) + + * Screen.c: safe some lines by calling SAFE_XFree + +2019-07-22 18:10:12 +0200 Ulrich Sibiller (ebc2ea79f) + + * Events.c: safe some lines by calling SAFE_XFree + +2019-07-22 18:16:20 +0200 Ulrich Sibiller (b8411180e) + + * Display.c: safe some lines by calling SAFE_XFree and SAFE_free + +2019-07-23 20:08:16 +0200 Ulrich Sibiller (1330167fa) + + * Utils.h: add SAFE_free macro + +2019-08-05 18:32:16 +0200 Mike Gabriel (360cb5dd9) + + * release 3.5.99.21 (tag: 3.5.99.21) 2019-06-27 22:48:09 +0200 Mike Gabriel (c2ca013fb) diff --git a/VERSION b/VERSION index e8b891fd9..c7a3bf4c9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.5.99.21 +3.5.99.22 diff --git a/debian/changelog b/debian/changelog index 15f0aac86..e94e97161 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,11 @@ -nx-libs (2:3.5.99.21-1) unstable; urgency=medium +nx-libs (2:3.5.99.22-0) unstable; urgency=medium + + * Upstream-provided Debian package for nx-libs. + See upstream ChangeLog for recent changes. + + -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Tue, 27 Aug 2019 15:44:17 +0200 + +nx-libs (2:3.5.99.21-0) unstable; urgency=medium * Upstream-provided Debian package for nx-libs. See upstream ChangeLog for recent changes. diff --git a/debian/control b/debian/control index 886d62eeb..00527d63e 100644 --- a/debian/control +++ b/debian/control @@ -386,9 +386,9 @@ Depends: Recommends: nxagent, Breaks: - nxagent (<< 2:3.5.99.21-2~), + nxagent (<< 2:3.5.99.22-0~), Replaces: - nxagent (<< 2:3.5.99.21-2~), + nxagent (<< 2:3.5.99.22-0~), Description: Dialogs for NX Agent NX is a software suite which implements very efficient compression of the X11 protocol. This increases performance when diff --git a/nx-X11/extras/Mesa_6.4.2/progs/images/bw.rgb b/nx-X11/extras/Mesa_6.4.2/progs/images/bw.rgb index a451fc266..ae9f010af 100644 Binary files a/nx-X11/extras/Mesa_6.4.2/progs/images/bw.rgb and b/nx-X11/extras/Mesa_6.4.2/progs/images/bw.rgb differ diff --git a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 index fbf01f8ea..ae2dc59c0 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 +++ b/nx-X11/programs/Xserver/hw/nxagent/man/nxagent.1 @@ -23,7 +23,7 @@ .\" other dealings in this Software without prior written authorization .\" from The Open Group. .ds q \N'34' -.TH nxagent 1 "Aug 2019" "Version 3.5.99.21" "NX Agent (Xserver)" +.TH nxagent 1 "Aug 2019" "Version 3.5.99.22" "NX Agent (Xserver)" .SH NAME nxagent \- nested Xserver optimized for remote computing .SH SYNOPSIS diff --git a/nx-libs.spec b/nx-libs.spec index 20606ff9a..408c68390 100644 --- a/nx-libs.spec +++ b/nx-libs.spec @@ -10,7 +10,7 @@ %endif Name: nx-libs -Version: 3.5.99.21 +Version: 3.5.99.22 Release: 0.0build1%{?dist} Summary: NX X11 protocol compression libraries @@ -627,5 +627,5 @@ rm -f %{buildroot}%{_datadir}/man/man1/nxdialog.1* %changelog -* Thu Jan 29 2015 Mike Gabriel <mike.gabriel@das-netzwerkteam.de> 3.5.99.1 +* Thu Aug 27 2019 Mike Gabriel <mike.gabriel@das-netzwerkteam.de> 3.5.99.22 - See upstream ChangeLog and debian/changelog for details. diff --git a/nxdialog/bin/nxdialog b/nxdialog/bin/nxdialog index f39f0a55a..d6d7520d6 100755 --- a/nxdialog/bin/nxdialog +++ b/nxdialog/bin/nxdialog @@ -298,7 +298,7 @@ class NxDialogProgram(object): parser = argparse.ArgumentParser(description="Helper for nxagent to display dialogs") - # nxagent 3.5.99.21 only uses yesno, ok, pulldown and yesnosuspend + # nxagent 3.5.99.22 only uses yesno, ok, pulldown and yesnosuspend # yesno dialogs will always kill the session if "yes" is selected parser.add_argument("--dialog", dest="dialog_type", help='type of dialog to show, one of "yesno", \ @@ -316,7 +316,7 @@ class NxDialogProgram(object): parser.add_argument("--window", dest="window", help="id of window where to embed the \ pulldown dialog type") - # -class, -local, -allowmultiple are unused in nxlibs 3.5.99.21 + # -class, -local, -allowmultiple are unused in nxlibs 3.5.99.22 parser.add_argument("--class", dest="dlgclass", default="info", help="class of the message (info, warning, error) \ default: info) [currently unimplemented]") diff --git a/nxdialog/man/nxdialog.1 b/nxdialog/man/nxdialog.1 index 3a839e4f6..34f78ff91 100644 --- a/nxdialog/man/nxdialog.1 +++ b/nxdialog/man/nxdialog.1 @@ -5,7 +5,7 @@ \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac -.TH nxdialog 1 "Aug 2019" "Version 3.5.99.21" "NX Dialog" +.TH nxdialog 1 "Aug 2019" "Version 3.5.99.22" "NX Dialog" .SH NAME nxdialog \- NX Dialog Helper .SH SYNOPSIS diff --git a/nxproxy/man/nxproxy.1 b/nxproxy/man/nxproxy.1 index bd3891608..5e2105160 100644 --- a/nxproxy/man/nxproxy.1 +++ b/nxproxy/man/nxproxy.1 @@ -5,7 +5,7 @@ \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac -.TH nxproxy 1 "Aug 2019" "Version 3.5.99.21" "NX Proxy" +.TH nxproxy 1 "Aug 2019" "Version 3.5.99.22" "NX Proxy" .SH NAME nxproxy \- NX Proxy Tool .SH SYNOPSIS -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch 3.6.x in repository nx-libs. commit 7d07442d7a0205358cd6136d53ba31385ab9ca94 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Aug 27 15:15:47 2019 +0200 debian/copyright: Update copyright attributions. --- debian/copyright | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/debian/copyright b/debian/copyright index 59d976aae..9537f2530 100644 --- a/debian/copyright +++ b/debian/copyright @@ -1674,8 +1674,7 @@ Copyright: 1991-2000, Silicon Graphics, Inc 1991-2004, Silicon Graphics, Inc License: SGI-1.1 -Files: nx-X11/programs/Xserver/Xext/xtest1dd.h - nx-X11/programs/Xserver/Xi/allowev.h +Files: nx-X11/programs/Xserver/Xi/allowev.h nx-X11/programs/Xserver/Xi/chgdctl.h nx-X11/programs/Xserver/Xi/chgfctl.h nx-X11/programs/Xserver/Xi/chgkbd.h @@ -1790,7 +1789,6 @@ Files: nx-X11/programs/Xserver/hw/nxagent/Args.c nx-X11/programs/Xserver/hw/nxagent/Pointer.h nx-X11/programs/Xserver/hw/nxagent/Screen.c nx-X11/programs/Xserver/hw/nxagent/Screen.h - nx-X11/programs/Xserver/hw/nxagent/TestExt.c nx-X11/programs/Xserver/hw/nxagent/Visual.c nx-X11/programs/Xserver/hw/nxagent/Visual.h Copyright: 1993, Davor Matic @@ -1922,7 +1920,6 @@ Files: nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c nx-X11/programs/Xserver/hw/nxagent/NXevents.c nx-X11/programs/Xserver/hw/nxagent/NXextension.c nx-X11/programs/Xserver/hw/nxagent/NXglyphcurs.c - nx-X11/programs/Xserver/hw/nxagent/NXmiexpose.c nx-X11/programs/Xserver/hw/nxagent/NXproperty.c nx-X11/programs/Xserver/hw/nxagent/NXresource.c nx-X11/programs/Xserver/hw/nxagent/NXwindow.c @@ -2972,6 +2969,7 @@ Files: .travis.yml nxproxy/man/Makefile.am nxproxy/src/Makefile.am run-static-analysis.sh + static-analysis-suppressions Copyright: 2001, 2011, NoMachine (http://www.nomachine.com) 2008-2014, Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> 2011-2016, Mike Gabriel <mike.gabriel@das-netzwerkteam.de>*/ @@ -3049,7 +3047,8 @@ Copyright: 2008, Benjamin Kosnik <bkoz@redhat.com> 2014, 2015, Google Inc.; contributed by Alexey Sokolov <sokolov@google.com> 2015, Paul Norman <penorman@mac.com> 2015, Moritz Klammler <moritz@klammler.eu> - 2016, Krzesimir Nowak <qdlacz@gmail.com> + 2016, 2018, Krzesimir Nowak <qdlacz@gmail.com> + 2019, Enji Cooper <yaneurabeya@gmail.com> License: permissive Comment: Make lintian happy by listing all symlinks. @@ -3070,13 +3069,32 @@ Comment: Files: m4/ax_pthread.m4 nxcomp/m4/ax_pthread.m4 - nxproxy/m4/ax_pthread.m4 Copyright: 2008, Steven G. Johnson <stevenj@alum.mit.edu> 2011, Daniel Richard G. <skunk@iSKUNK.ORG> License: GPL-3+ Comment: Make lintian happy by listing all symlinks. +Files: nxdialog/Makefile.am + nxdialog/README.md + nxdialog/VERSION + nxdialog/bin/Makefile.am + nxdialog/configure.ac + nxdialog/man/Makefile.am + nxdialog/man/nxdialog.1 + nxdialog/m4/.keep +Copyright: 2019, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> +License: GPL-2+ +Comment: + Using license as found in nxdialog/bin/nxdialog. + . + Using copyright holder as found in VCS information. + +Files: nxdialog/bin/nxdialog +Copyright: 2008, Google Inc. + 2019, Ulrich Sibiller <uli42@gmx.de> +License: GPL-2+ + Files: debian/* Copyright: 2011-2016, Mike Gabriel <mike.gabriel@das-netzwerkteam.de> 2011-2013, Reinhard Tartler <siretart@tauware.de> -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git