Skip to content
Snippets Groups Projects
  1. May 27, 2022
  2. Aug 29, 2021
  3. Jul 31, 2021
  4. Jul 29, 2021
    • Clayton Craft's avatar
      keyboard/toggle/tooltip: replace destructors with cleanup() (MR 146) · e4f38f2b
      Clayton Craft authored
      Previously added destructors fired too late, after the renderer was
      destroyed, causing seg faults on musl (though, not on glibc, so it must
      be some undefined behavior or ???)
      
      Explicitly calling a cleanup() for these objects to free textures at the
      end of the app seems to be working well, no leaks and no
      use-after-free/double-free/etc issues. The default destructors for these
      objects is used for everything else.
      e4f38f2b
    • Clayton Craft's avatar
      main: move TTF_Init from keyboard::makeKeyboard (MR 145) · 8c439fa7
      Clayton Craft authored
      Other objects use TTF_* too, so initializing it in the keyboard object
      could introduce some race condition (though I've never seen one first
      hand...)
      
      It's still good to do it in a central place. This also calls TTF_Quit()
      to clean up.
      8c439fa7
    • Clayton Craft's avatar
      main: fix memory leaks (MR 145) · cdc37afe
      Clayton Craft authored
      cdc37afe
    • Clayton Craft's avatar
      Don't trigger render event when repeat delay is not met (MR 144) · 8d83d63d
      Clayton Craft authored
      This is a slight optimization that moves scheduling of a render event so
      that it is only scheduled when a repeat character satisfies the repeat
      delay, which is the only time a dot will be drawn on the screen for the
      character. There's no reason to render things if the key repeats before
      the delay since the character is discarded and nothing new is added to
      the screen.
      8d83d63d
    • Clayton Craft's avatar
      Handle cases where text input events are still fired for hotkeys (MR 144) · e1ae7fa2
      Clayton Craft authored
      The newly added C-u hotkey seems to be generating a text input event in
      SDL on some systems (Pinebook Pro), while it did not on other systems
      (thinkpad running Arch) in testing the earlier patch.
      
      This returns from the text input handling when the event was fired
      because C-u was held down.
      e1ae7fa2
  5. Jul 21, 2021
  6. Jul 02, 2021
    • Clayton Craft's avatar
      Reduce height of input box when displaying without keyboard (MR 140) · a418e412
      Clayton Craft authored
      When no keyboard is used (-x), the input box is comically large on some
      systems (PineBook Pro). This wraps the height of the input box to be
      slightly more than the font size. It makes some gross assumptions about
      font size and pixels, but seems to work on the two devices I tested on
      (librem 5 and PBP)
      a418e412
    • Clayton Craft's avatar
      Add option for disabling keyboard · 7317cee1
      Clayton Craft authored
      This option, -x|--no-keyboard, makes osk-sdl behave like a prettier
      `cryptsetup open`, with just an input box for devices that have physical
      keyboards. The performance of this should be really good when there is
      no hw accel support (i.e. using directfb / sw rendering), since it's
      only rendering the input box + contents/dots and not the
      keyboard/layers/keycaps.
      7317cee1
  7. May 27, 2021
    • Clayton Craft's avatar
      main: set wallpaper as draw color, not texture (MR 137) · fce718ed
      Clayton Craft authored
      This reduces the render time for a 2 render pass (using sw rendering) by
      something close to 50%, as measured on a Librem 5 with SDL2 sw
      rendering. RenderClear clears the screen to the wallpaper color, thereby
      saving quite a lot of time.
      
      The render while loop was measured as a whole with gettimeofday
      (converted to msec):
      
      Before:
              INFO: render loop: 360 ms
              INFO: render loop: 367 ms
              INFO: render loop: 367 ms
              INFO: render loop: 362 ms
      
      After:
              INFO: render loop: 175 ms
              INFO: render loop: 165 ms
              INFO: render loop: 154 ms
              INFO: render loop: 167 ms
      fce718ed
    • Clayton Craft's avatar
      main: fix tooltip stutter on start when animations are disabled (MR 137) · 618a4bc3
      Clayton Craft authored
      The tooltip position is based on the keyboard height, so this draws the
      keyboard when animations are disabled *before* tooltips are drawn so
      that the tooltip is immediately drawn at the correct location.
      
      When animations are enabled (and, key previews), the keyboard is drawn
      *after* the tooltip so that they tooltips don't overlap the key
      previews. This is the existing behavior before this change.
      618a4bc3
  8. May 23, 2021
  9. May 20, 2021
  10. Mar 20, 2021
  11. Feb 04, 2021
  12. Feb 01, 2021
  13. Jan 31, 2021
  14. Jan 15, 2021
    • Clayton Craft's avatar
      Fix key height being reduced by 5-row layout (MR 121) · 18a39a9a
      Clayton Craft authored
      The key row count was increased in MR !111, as a result it reduced the
      calculated keycap size on the keyboard, causing accessibility issues.
      The denominator used for calculating the keyboardHeight was chosen by
      comparing the calculated key height before !111 with the key height after
      !111.
      
      This was tested on a pinephone w/ kmsdrm, and on my laptop with wayland
      and various settings for HEIGHT and WIDTH.
      
      Fixes #122
      18a39a9a
  15. Jan 13, 2021
    • undef's avatar
      Fix output of password in keyscript mode (MR 117) · 65a7388a
      undef authored and Clayton Craft's avatar Clayton Craft committed
      When in keyscript mode, the password should not be considered a log,
      as this will both not output anything without verbose mode and output
      additional non-password text in verbose mode. Either of these leads to
      the user being unable to unlock their disk.
      
      Resolves #120
      65a7388a
  16. Jan 12, 2021
    • Johannes Marbach's avatar
      Use OpenGL ES driver by default and add CLI switch to opt out (MR 113) · e2b7a074
      Johannes Marbach authored and Clayton Craft's avatar Clayton Craft committed
      This change makes osk-sdl use the OpenGL ES driver whenever it is
      available. If it is not available, the app falls back to the default
      driver.
      
      Additionally, a new command line option -G / --no-gles was added that
      allows to opt out of the behavior and fall back to the default driver
      from the start.
      
      Closes: #102
      e2b7a074
    • Clayton Craft's avatar
      Enable support for key press haptic feedback (MR 115) · 6eb637b7
      Clayton Craft authored
      This enables haptic feedback when typing on the keyboard. Vibrations are
      triggered on touch/mouse down events, which seemed more natural than
      triggering it on the up events.
      
      If it's not working, then the module for the haptic/vibration device may
      not be enabled or available (e.g. when in initfs)
      
      Closes #95
      6eb637b7
  17. Jan 06, 2021
  18. Jan 01, 2021
  19. Dec 17, 2020
Loading