• src/conio/x_events.c

    From Deuc¿@VERT to Git commit to main/sbbs/master on Thursday, May 04, 2023 13:18:39
    https://gitlab.synchro.net/main/sbbs/-/commit/646c7e10fe6c138fa7e095f8
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Remove unised variable.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thursday, May 04, 2023 18:48:57
    https://gitlab.synchro.net/main/sbbs/-/commit/0544e9c52e731ffa4d157918
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Handle all possible failure paths before calling bitmap_drv_init()

    Should fix auto-curses mode crash.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, May 06, 2023 23:47:15
    https://gitlab.synchro.net/main/sbbs/-/commit/c6d284b31bd859b9b70587d7
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Swap the order of defaults so vstat.scaling only gets written once

    This is just to make it less noise to watch vstat.scaling from gdb.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, May 07, 2023 01:02:20
    https://gitlab.synchro.net/main/sbbs/-/commit/96252a524edfdd8b7952062f
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Call resize_window() after initing a mode, call XResizeWindow() if x_cvstat doesn't match cvstat.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, May 07, 2023 01:16:56
    https://gitlab.synchro.net/main/sbbs/-/commit/acc0bffc446abdbb27455127
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fixup vstat after bitmap_drv_init_mode()

    Now that vstat is what was last drawn on the screen we need to
    save/restore the width/height around calls to bitmap_drv_init_mode().

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, May 14, 2023 20:34:06
    https://gitlab.synchro.net/main/sbbs/-/commit/cf317d5db18cfadec0a2a6fa
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fix (unlikely) deadlock when load_vmode() fails.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, May 14, 2023 20:42:45
    https://gitlab.synchro.net/main/sbbs/-/commit/87f05b6d89fd176435a80fd0
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Use vstat.scaling not x_cvstat.scaling to scale to screen.

    Also, do not try to display frames where the scaled height or width
    is less than the frame bitmap height or width.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, May 14, 2023 21:10:08
    https://gitlab.synchro.net/main/sbbs/-/commit/00aeb6ecf848d69ccecad87e
    Modified Files:
    src/conio/x_events.c
    Log Message:
    More X optimizations

    Now that bitmap_drv_request_some_pixels() just calls bitmap_drv_request_pixels(), there's no point in calling expose_rect()
    when ev->xexpose.count isn't zero.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, May 14, 2023 21:26:27
    https://gitlab.synchro.net/main/sbbs/-/commit/9b165510cb465af2403e014d
    Modified Files:
    src/conio/x_events.c
    Log Message:
    On a ConfigureNotify event, only call handle_resize_event() if size changed.

    This mirrors commit 0748cc1e about a year ago that optimized window
    dragging, and performs basically the same check (removed a week ago
    with commit b4ce023c)

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tuesday, May 16, 2023 08:55:29
    https://gitlab.synchro.net/main/sbbs/-/commit/d8de9251cafb98c47857bccd
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Use video mode aspect ratio when defined rather than pixel size.

    There's no good argument for this aside from "it feels more right".

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Friday, June 02, 2023 11:25:51
    https://gitlab.synchro.net/main/sbbs/-/commit/860680f59f8790f0893f3fdc
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fix inverted logic in last commit

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Friday, June 02, 2023 12:55:19
    https://gitlab.synchro.net/main/sbbs/-/commit/4bfdec46f56ca4ae0711bf0d
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fiddle with WM_NORMAL_HINTS a bit.

    USize was wrong, PSize wasn't set, and PBaseSize was set, but flag wasn't.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Friday, June 02, 2023 15:18:20
    https://gitlab.synchro.net/main/sbbs/-/commit/fcf101424c46e57a3ff36b87
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Ye old typo in last commit

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT to Git commit to main/sbbs/master on Friday, June 02, 2023 18:31:56
    https://gitlab.synchro.net/main/sbbs/-/commit/ae643313d5df9f3dfe4fe6be
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Disable X Synchronize and some minr optimizations in set_icon()

    The XSynchronize disablement is the most important here... didn't
    realize it defaulted to enabled, which has been slowing down a *lot*
    of stuff for a long time... not that there's much left that benefits
    from disabling Synchronized XLib except this new terrible icon thing.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT to Git commit to main/sbbs/master on Friday, June 02, 2023 19:10:04
    https://gitlab.synchro.net/main/sbbs/-/commit/76641ca7d66bdd0eaa86bc9e
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Set _NET_WM_PID

    Seems like a good idea, should allow WMs to kill hung processes and
    stuff like that.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT to Git commit to main/sbbs/master on Friday, June 02, 2023 19:54:56
    https://gitlab.synchro.net/main/sbbs/-/commit/20d77d5a501bcb51eb98d31c
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Implement the _NET_WM_PING protcol

    Implied by _NET_WM_PID being set, so may as well do it.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, June 03, 2023 01:05:25
    https://gitlab.synchro.net/main/sbbs/-/commit/b0feed94406571e18586f8fb
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fix use of uninitialized value

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, June 03, 2023 01:12:36
    https://gitlab.synchro.net/main/sbbs/-/commit/11050ff199521fe2b09686ff
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fix up source/last for external scaling

    This was ending up using an uninitialized value

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, June 03, 2023 02:35:51
    https://gitlab.synchro.net/main/sbbs/-/commit/d3a6cc915ab802da7f0fbdf3
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fix typo in line 666

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Saturday, June 03, 2023 18:24:42
    https://gitlab.synchro.net/main/sbbs/-/commit/f3817229ab1a1eafac543d49
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Increment offset in the loop when reading _NET_WORKAREA

    Previously, if there was more than one work area, this would be
    an infinite loop, re-reading the first workarea repeatedly.

    Reported by Ragnarok (thanks!)

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT to Git commit to main/sbbs/master on Sunday, June 04, 2023 07:11:56
    https://gitlab.synchro.net/main/sbbs/-/commit/08f465dbb94c3a6580f702de
    Modified Files:
    src/conio/x_events.c
    Log Message:
    More fullscreen work, get resize working

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT to Git commit to main/sbbs/master on Monday, June 05, 2023 08:26:33
    https://gitlab.synchro.net/main/sbbs/-/commit/3b7791526d3cd7263c2d654d
    Modified Files:
    src/conio/x_events.c
    Log Message:
    For Sommelier (ie: ChromeOS), use CLIPBOARD not PRIMARY

    ChromeOS (as of Jun 2023) effectivly makes PRIMARY useless. Just
    do the wrong thing and use CLIPBOARD instead. This makes it much
    more likely that SyncTERM selections will clobber CLIPBOARD
    unintentionally, but we have no choice... DigitalMan doesn't use
    X11 mode solely because ChromeOS sucks at X11.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, June 05, 2023 10:55:30
    https://gitlab.synchro.net/main/sbbs/-/commit/6ec4d431f63669f30b07f4be
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fix some highly unlikely memory leaks

    - Ensure last is cleared even if we manage external scaling without Xrender
    - Free the bitmap rectangle in the same situation
    - Make a copy of x_internal_scaling so it's used consistently
    (not mutex protected, and accessed from multiple threads)

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, June 05, 2023 11:48:32
    https://gitlab.synchro.net/main/sbbs/-/commit/7f01faf0ca9f9fd0939e0184
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fix wildly incorrect usage of set_win_property().

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, June 05, 2023 15:25:23
    https://gitlab.synchro.net/main/sbbs/-/commit/d0280d9d8272860d4523eb09
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fix fullscreen external scaled X11 mode

    Was not using struts, and was scaling to window size, not aspect
    ratio size.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, June 05, 2023 16:16:39
    https://gitlab.synchro.net/main/sbbs/-/commit/2d3f4e18c1168e575175bf18
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fix black bar generation

    Was wrong and therefore causing flickering.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT to Git commit to main/sbbs/master on Tuesday, June 06, 2023 22:33:12
    https://gitlab.synchro.net/main/sbbs/-/commit/9ef4042cfdc943eb7a75cd29
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Some minor fixups...

    On expose, always redraw the entire screen. The calculations were
    wrong and with fractional scaling, some of them will always be wrong.

    Don't clear the screen when xim is resized.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wednesday, June 07, 2023 20:19:00
    https://gitlab.synchro.net/main/sbbs/-/commit/e1a6e1ac8e83d2e41a394bc6
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Attempt to set resource name/class correctly for XIM

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT to Git commit to main/sbbs/master on Thursday, June 08, 2023 08:56:39
    https://gitlab.synchro.net/main/sbbs/-/commit/325bafccd9c2a51c17cdd1ed
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Missed a 'C' in ICCCM

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sunday, June 11, 2023 20:29:01
    https://gitlab.synchro.net/main/sbbs/-/commit/04efb20ca85d82b36d5b554e
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Don't require caller to call textmode() before showing window

    Fixes recent regression with scfg

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Monday, June 12, 2023 17:31:20
    https://gitlab.synchro.net/main/sbbs/-/commit/503cff8671462889d573ee26
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fix GCC v10.2 warnings about ignored return values of 'write'

    The return value of x11_event() isn't actually checked anywhere currently, but still Deuce might want to adjust the new return value here (__LINE__ or -1?).

    Some indicental trailing whitespace was auto-cleaned up part of this commit. Unexpected as I thought this code had been uncrustified already.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, June 12, 2023 17:35:24
    https://gitlab.synchro.net/main/sbbs/-/commit/58ed4743698f8f3539c27931
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Make x11_event() a bool

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, June 12, 2023 17:50:01
    https://gitlab.synchro.net/main/sbbs/-/commit/00ab0718520a123a36113a43
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Actually, this is a blocking write, just compare with -1

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, June 12, 2023 18:00:27
    https://gitlab.synchro.net/main/sbbs/-/commit/777fb6d8bec3c7dd85e6d919
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Actually, don't bother returning a value that's never used.

    Still be sure to check the return value of write() though.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thursday, June 15, 2023 15:34:31
    https://gitlab.synchro.net/main/sbbs/-/commit/e61a1aa6c7b27242fc1d0340
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Use XDG_ENVIRONMENT_TYPE to switch to CLIPBOARD

    It appears that XDG_ENVIRONMENT_TYPE will always equal "wayland"
    when XWayland is in use, so when we see that, switch to CLIPBOARD
    instead of PRIMARY. This should fix WSL and ChromeOS, and be
    irritating on GNOME, so it's a win all around.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuce@VERT to Git commit to main/sbbs/master on Thursday, June 15, 2023 17:32:20
    https://gitlab.synchro.net/main/sbbs/-/commit/4f504677859909d59443a17b
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Revert "Use XDG_ENVIRONMENT_TYPE to switch to CLIPBOARD"

    This reverts commit e61a1aa6c7b27242fc1d03401b4240c6f58ac311.

    It turns out neither platform this targeted actually set that
    variable correctly.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Wednesday, June 28, 2023 09:52:07
    https://gitlab.synchro.net/main/sbbs/-/commit/d60cc9637f418ab7aa897945
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Remove stale code from net_wm_state_is_cb()

    It's unlikely this is what Digitalman reported from ASan and UBSan

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on ChromeOS)@VERT to Git commit to main/sbbs/master on Monday, July 03, 2023 20:26:18
    https://gitlab.synchro.net/main/sbbs/-/commit/0a6fdb956890d029bfdb230f
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Fix crash in net_wm_state_is_cb when running GCC ASan-enabled build

    Check size of X11 property before dereferencing as an Atom.
    This fixes:
    ==10203==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000065970 at pc 0x5c5834fb8812 bp 0x7819c717c220 sp 0x7819c717c218
    READ of size 8 at 0x602000065970 thread T2 (X11 Events)
    #0 0x5c5834fb8811 in net_wm_state_is_cb ../conio/x_events.c:1541

    But I'm not clear when nitems_return (nir) might represent > 8-bit items or how to detect that, so perhaps there's a *better* fix?

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, July 03, 2023 22:32:04
    https://gitlab.synchro.net/main/sbbs/-/commit/e32a036b1b615aa2c07cbefc
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Revert "Fix crash in net_wm_state_is_cb when running GCC ASan-enabled build"

    This reverts commit 0a6fdb956890d029bfdb230f3fec17110690a471.

    This simply caused the callback to never be called.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Monday, July 03, 2023 22:58:58
    https://gitlab.synchro.net/main/sbbs/-/commit/60668a729f1fdb570284a70c
    Modified Files:
    src/conio/x_events.c
    Log Message:
    Ensure we get at least one item before passing to the callback

    Should fix ASan "crash".

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net