| Age | Commit message (Collapse) | Author |
|
|
|
same notification (#1824)
|
|
* remove scaling logic from font code
for the time being its been hardcoded to 1 for the non SDL Renderer basewin setup, so nothing is lost for non MacOS users.
will be revisited in the future when scaling is improved with SDL3 and moved into scripts.
* remove unused window_renderer argument from font functions
* move window logic to lua, pass window via argument
* rename window creation functions `*_create`, `*_destroy`, add real init
* Set active window when processing frame
* get size directly from RenWindow, get active window size from renderer
* correct reverted draw calls
* fix window not reappearing on restart
* add simple logic to persist the core window
* fix style
* add renwindow documentation
* make windows hidden by default again
* reorder ren_update_rects execution, add comment to note future work
|
|
* Update font scale on monitor scale change for `RENDERER` backend (macOS)
* fix(renderer): check every font of a fontgroup for scale changes in `update_font_scale`
It is needed because fonts can be reused between groups and outside of them.
So if the first font of a group has already been scaled, we still need to check if the others still needs to be scaled.
|
|
|
|
When a backend was specified using meson, the relative source files weren't being added.
|
|
|
|
* Add SerenityOS platform support
* remove cpp_std default option
|
|
* process: fix potential unitialized variables
* process: fix brace initializer error on Windows
|
|
* add system.setenv
* document system.setenv
* system.setenv: use wide versions of functions on windows
* do not include processenv.h
* system.setenv: report failure, including of utfconv
* system.setenv: free utfconv output
|
|
|
|
* fix: free-before-init in renwin_init_surface when using sdl renderer
`ren->rensurface.surface` presupposes zero-initialized rensurface.
Rensurface was not actually zero-initialized.
It is now.
* fix: heap buffer overflow in process_env_free
`process_env_free` presupposed that it was null-terminated.
Pass length to free instead.
* use calloc instead of memset for zero-init
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
---------
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
|
|
* turn window_renderer into managed pointer
this will make it easier to move it into userdata in the future
* remove unused function, remove comment
|
|
* feat(process): allow commands and envs on proces_start
* refactor(process): copy process arguments once whenever possible
Refactors the code to use an arglist type which is just lpCmdline on Windows
and a list in Linux.
The function automatically escapes the command when it is needed, avoiding
a second copy.
This also allows UTF-8 commands btw.
* fix(process): fix invalid dereference
* refactor(process): mark xstrdup as potentially unused
* feat(process): add parent process environment when launching process
* fix(process): fix operator precedence with array operators
* fix(process): fix segfault when freeing random memory
* fix(process): fix wrong check for setenv()
* fix(process): fix accidentally initializing an array by assignment
* fix(process): clear return value if success
|
|
* Return x offset for the first character in `ren_font_group_get_width`
* Use x offset to define render command rect in `rencache_draw_text`
|
|
* Update window scale on resize
* Scale mouse coordinates by window scale
* Avoid scaling mouse coordinates while using `LITE_USE_SDL_RENDERER`
|
|
* Use `PATHSEP` in path-related functions
* Don't stop on digits when getting the common part in `system.path_compare`
* Avoid sorting multiple times in `dirwatch.get_directory_files`
This also fixes the timeout detection in `recurse_pred`.
|
|
Otherwise we might wait forever by mistake.
|
|
* fix: deadlock if error handler jumps somewhere else
* docs(dirmonitor): fix wrong data type in error callback
* docs(dirmonitor): clarify coroutines and deadlocks
* docs(dirmonitor): wording
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
---------
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
|
|
|
|
|
|
This often leads to `SCALE` values that are way off, and makes Lite XL
unusable, so we now just default it to 1.
|
|
* feat(src/renderer): unify fontgroup baseline
* fix(src/renderer): use the first font's baseline for the text run
|
|
* feat(src/renderer): stream fonts with SDL_RWops on all platforms
This fixes #1529 where the font itself carries the font file, which gets copied around.
This commit streams the file, so the file is not entirely in memory.
* style(src/renderer): use standard C types
* refactor(src/renderer): implement FT_Stream.close
* fix(src/renderer): fix SDL_RWops double free
|
|
|
|
* Properly set glyphset size
* Rename `MAX_GLYPHSET` to `GLYPHSET_SIZE`
* Use more appropriate types for font metrics
|
|
|
|
This should be enough to load every unicode codepoint.
|
|
* Close lua state when exiting on a runtime error
* This change allows calling the garbage collector before exiting the
application for a cleaner shutdown.
* Components like the shared memory object on #1486 will have a better
chance at destroying no longer needed resources.
* Overriden os.exit to always close the state
* Allow setting close param on os.exit override
* Simplified the os.exit override a bit more
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
---------
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
|
|
|
|
|
|
|
|
This allows a human friendly sorting filenames with numbers in them
So
- asd1
- asd10
- asd2
becomes
- asd1
- asd2
- asd10
|
|
* feat(process): add push_error
* refactor(process): use push_error for better errors
* style(process): consistent error messages
* refactor(process): reimplement process.strerror() with push_error
* refactor(process): implement close_fd only once
* refactor(process): rename process_handle to process_handle_t
* fix(process): prevent errors from a NULL error message
* refactor(process): refactor push_error into 2 functions
* fix(process): fix wrong error message
* fix(process): check if push_error_string actually pushed something
* refactor(process): make error messages descriptive
* fix(process): check for empty table instead of aborting
* refactor(process): make error messages descriptive on Windows
* refactor(process): rename process_stream_handle to process_stream_t
* refactor(process): fix wrong usage of process_handle_t
* fix(process): fix wrong type name
* refactor(process): incoporate kill_list_thread into process_kill_list_t
* refactor(process): make kill_list per-state data
|
|
* Save to `error.txt` the same traceback shown on stdout
* Show error message in crash message box
|
|
This mistake escaped my eyes when reviewing #1437 and causes
some symbols to not be exported, because the preprocessor macros
are expecting multiple LUA versions to evaluate as true at once.
The fix is to replace `&&` with `||`.
|
|
* Use Lua-provided string lengths for `system.path_compare`
* Make `system.path_compare` more case-aware
Before, strings like `README.md` would be sorted before `changelog.md`,
because we only looked at the raw ascii values.
Now the character case is considered as a secondary sorting key.
|
|
* feat(system): update api_require for more symbols
* fix(system): fix missing 5.1 symbols
* fix(system): add more missing symbols
* fix(system): add all symbols
We got'em this time. I swear.
* fix(system): fix undefined symbols due to conditional compilation
There is only pain and suffering.
Turns out some of the symbols are only exported when the options are enabled.
We need to preprocess the header.
|
|
* fix(c-bootstrap): produce identical stack traces
|
|
* fix(main): fix get_exe_filename returning invalid result on Windows
* fix(main): fix bootstrap not intepreting UTF-8 properly
|
|
|
|
|
|
* refactor(process): introduce process_stream_handle separate from process_handle
* feat(process): introduce process_handle helper functions
* feat(process): add asynchronous process reaping
* feat(process): wait for shorter period if possible
* style(process): remove unecessary brackets
* style(process): fix parentheses
* refactor(process): remove useless setvbuf call
* style(process): remove unecessary value
* refactor(process): add size field into kill_list
* refactor(process): use SDL_Delay for sleeping
* style(process): remove trailing whitespace
* fix(main): destroy window before closing lua
* fix(process): check for timeout correctly
* refactor(process): remove unecessary if check
* refactor(process): remove size from the list
* fix(process): fix invalid delay calculation
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
---------
Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
|
|
|
|
|
|
In some extreme cases (~30000 chars) text width precision takes a hit.
Using double instead of float fixes that.
|
|
|
|
This reduces the space needed for each command.
|
|
* fix(gitignore): add exclusion for manifest files
* feat(windows): add application manifest
* feat(build): use application manifest on windows
* refactor(build): use genrate_file to generate the manifest
* style(manifest): remove trailing whitespace
|
|
|