1. Dec 17, 2020
    • Marc Durdin's avatar
      fix(windows): Use timer-approach to refresh · b561dc47
      Marc Durdin authored
      Another thought: we could also try refreshing every 125msec for 5
      seconds after the first change is detected. It's a bit yuck perf-wise
      but would probably be pretty transparent to the user.
      
      In testing, this looks good. It means the changes appear as soon as
      ready, without substantial delays or performance issues. Polling this
      makes me feel a bit dirty, but I'll just take a shower and be okay.
      b561dc47
    • Marc Durdin's avatar
      fix(windows): OSK toolbar sync · f6872e79
      Marc Durdin authored
      As Keyman now monitors the Windows keyboard list from Control Panel, it
      is no longer sufficient to refresh the toolbar only when a Keyman
      keyboard is updated, as at that point Windows has not refreshed its own
      language list in the registry. Instead, we need to monitor changes to
      the relevant registry key and then refresh when those changes are
      'complete'.
      
      There is a problem: there does not appear to be a good way to monitor
      for changes to Windows language settings. WM_SETTINGCHANGE is sent when
      a language is added by the user in Settings, but the actual change
      happens asynchronously, and we are not notified when the changes are
      complete.
      
      We also do not get notifications when languages are added via APIs.
      
      Given the async nature of the language profile changes, this leads to
      race conditions when we try to refresh the OSK toolbar. My preferred
      solution currently is to monitor the relevant key in a separate thread,
      and wait 1 second post-changes to actually do the refresh.
      f6872e79
    • Marc Durdin's avatar
      fix(windows): exception handling list error · f73b2912
      Marc Durdin authored
      Fixes #4006.
      
      This fixes the list error exception which was masking the actual cause
      of #4006, which is already fixed by #4164.
      
      Related issue #4119 is also fixed by #4164.
      f73b2912
    • Marc Durdin's avatar
      chore(windows): commit headers · 1d850ab6
      Marc Durdin authored
      1d850ab6
    • Marc Durdin's avatar
      fix(windows): maintain use of refreshtag · 15d21822
      Marc Durdin authored
      15d21822
    • Marc Durdin's avatar
      fix(windows): Improve refresh performance · cea564a0
      Marc Durdin authored
      When a keyboard is installed, Keyman will now only refresh its internal
      state on a given thread when that thread receives focus and/or input,
      rather than immediately. This will dramatically reduce the chatter
      caused by Keyman Engine when a keyboard is installed or settings are
      changed.
      cea564a0
    • Marc Durdin's avatar
      fix(windows): Settings refresh management · 17b444bf
      Marc Durdin authored
      Fixes #4011.
      Fixes #4039.
      Fixes #4121.
      
      This change completes the immediate-change model for Keyman
      Configuration, by refactoring the refresh of settings out of the render
      phase and more appropriately splitting applying and refreshing. It adds
      a new message flag for wm_keyman_refresh, KR_SETTINGS_CHANGED, which
      uses a random token approach broadcast to all applications on the
      desktop to ensure that the refresh is received and multiple
      notifications for the same event can be appropriately coalesced.
      
      Most of the files touched are stripping out the refresh flags from the
      render phase.
      
      There is one small bug resolved at the same time with the options
      properties, which were not reset to default if they had been deleted
      from the registry prior to a refresh (see utilkeymanoption.pas).
      17b444bf
  2. Dec 16, 2020
  3. Dec 15, 2020