Commit Graph

100 Commits

Author SHA1 Message Date
George Sokianos abfd7f5876 Build the Haiku version with a makefile 2023-01-29 17:55:21 +00:00
Julien Voisin 6c6e5e9b99
Handle readlink errors (#1292) 2023-01-05 15:59:45 -05:00
Takase 6d0e7f3046
Fix some syntax errors (#1243)
* move signal.h inclusion outside of if-else block
not sure if this change is appropriate, we need to make sure SIG_IGN
is only set on POSIX targets. To verify this we might need to include
unistd.h,

* fix syntax error
this is often overlooked when compiling for normal platforms
2022-12-20 18:11:05 -04:00
Takase 4107b0c3fe
MSVC Support (#1199)
* fix stdalign and min/max for MSVC
* add missing ISREG and ISDIR for MSVC
* use MAX_PATH instead of PATH_MAX
* remove unecessary headers inclusion
* add MSVC CI
* add appropriate macros to platform detection
* re-add msvc CI artifacts
* upload the generated artifacts
* patch lua for MSVC CI builds
* update patch for MSVC compatibility
2022-11-15 23:23:45 -04:00
Guldoman 66198eb327 Use a better fallback in case `get_exe_filename` fails 2022-11-13 19:47:32 +01:00
Alexey Dokuchaev 1b1c13e3de Add missing `get_exe_filename()` implementation for FreeBSD 2022-11-13 19:47:32 +01:00
Guldoman 5c2c95765e
Add IME support (#991) 2022-10-15 19:58:51 -04:00
Jan 630ab0ab92
Add i386 architecture detection, add FreeBSD to platform detection (#1135)
defining anything that isn't a specific set of architectures x86 is just wrong.
It should at least be called something non identifying like "native"

Lite-XL already builds for FreeBSD so add it to the platform detection
2022-10-04 11:13:21 -04:00
Adam 5ada80b9df
Added in native modules suffixes. (#1111)
* Added in native modules with suffixes, giving priority to those with matching architectures and platforms.

* PowerPC isn't x86, and it's x86_64.

* Changed things over to allow compiler to set a tuple, makes more sense from a build perspective.

* Spelling mistake.

* Added in arm target tuples.
2022-09-18 18:27:50 -04:00
Guldoman cbe0fd63bf
Reduce double click radius
SDL uses 32 pixels by default, which is a bit too much and causes 
problems with, for example, adding multiple close selections too 
quickly.
2022-08-21 19:08:32 +02:00
jgmdev 83f368cdbe core: check for sdl initialization errors 2022-05-31 14:57:26 -04:00
takase1121 3bd679da12 make lite-xl respect the taskbar and allow aero-drop in borderless mode 2022-05-23 13:10:11 +08:00
Adam f85612e0f0
Fix Project Scanning (#746)
Removed dmon, and replaced with logic that works across Linux, Mac, FreeBSD and Windows. Have tested on all platforms, and seems to work.

Co-authored-by: Jan200101 <sentrycraft123@gmail.com>
2022-03-06 00:59:22 -05:00
Adam Harrison 96db380c73 Manual merge of into . 2021-11-23 15:57:22 -05:00
Jan200101 d3fa64ce59
rely on /proc/self 2021-10-12 09:06:37 +02:00
Francesco Abbate 9c43727ebc Implement directory monitoring using septag/dmon
Use a notification based directory monitoring based on the
septag/dmon lirbary instead of periodically rescan the whole
project's tree.
2021-10-08 21:31:22 +02:00
Jean-André Santoni 0b4d1e2bce Fix the size and blurriness of the icon on OSX (#553)
* Fix the size and blurriness of the icon on OSX

* Don't nest ifndef

* Fix
2021-10-02 18:39:22 +02:00
Adam 6aa316e3c3 Rearranged DPI calc so that on calc failure, returns 1. (#547) 2021-10-02 18:39:21 +02:00
Adam ed3ea35ed5 Potentially fixing issue with cache not invalidating on restart. (#548) 2021-10-02 18:39:21 +02:00
Adam Harrison 291616df3f Removed extra macros, used PLATFORM. Also removed MACOS, as it's redundant C code that's already encapsulated within PLATFORM. 2021-10-02 18:39:03 +02:00
Adam ab73f914ad Added in custom runtime environment variable for ease of testing. (#538) 2021-10-02 18:37:00 +02:00
Jean-André Santoni eb73ad3f8a
Fix the size and blurriness of the icon on OSX (#553)
* Fix the size and blurriness of the icon on OSX

* Don't nest ifndef

* Fix
2021-09-29 22:22:00 +02:00
Adam 8f8af19cbe
Rearranged DPI calc so that on calc failure, returns 1. (#547) 2021-09-26 16:21:57 +02:00
Adam 84622a0009
Potentially fixing issue with cache not invalidating on restart. (#548) 2021-09-26 16:18:13 +02:00
Adam 8c32950f4b
Merge pull request #527 from adamharrison/native-interop
Native Plugins
2021-09-23 15:11:08 -04:00
Adam Harrison 5ffe4eae90 Removed extra boolean. 2021-09-20 23:54:52 -04:00
Adam Harrison 713ef787c2 Removed extra macros, used PLATFORM. Also removed MACOS, as it's redundant C code that's already encapsulated within PLATFORM. 2021-09-20 23:50:06 -04:00
Adam Harrison e13529444f Less C code, and more namespacing is better. 2021-09-20 23:42:39 -04:00
Adam Harrison c01c5a23b0 Added in plugin table. 2021-09-20 23:38:10 -04:00
Adam 075061b80c
Added in custom runtime environment variable for ease of testing. (#538) 2021-09-18 21:56:23 +02:00
Adam Harrison 1721b8f1c9 Should be elif. 2021-09-16 16:28:02 -04:00
Adam Harrison e9f48ce949 Added in sample plugin and tested things out. Works. 2021-09-14 00:13:30 -04:00
Francesco Abbate d9e73a97ea Merge remote-tracking branch 'harens/macos-bundle' 2021-08-19 11:32:36 +02:00
Nikolai Sinyov 1687bbd92d
Update main.c
Fixed interface Scale in MacOS in get_scale function
2021-08-19 10:07:46 +03:00
harens 2d088256b1
Add unix-like behaviour on macOS
Closes https://github.com/lite-xl/lite-xl/issues/398
2021-08-18 13:26:51 +01:00
takase1121 35fd29fc39 remove extraneous DPI code
since 5 months ago (ttps://github.com/libsdl-org/SDL/commit/c289bad9007cb672c994f726d967f6e5682f200d)
SDL2 now reads Xft.dpi. There is no need to link to X11 anymore.
2021-08-17 07:53:44 -07:00
takase1121 192a93014d change double quotes to single quotes to reduce escaping 2021-07-15 18:01:24 -04:00
redtide 3f58e554ba Reorganization of data resources 2021-06-24 22:53:14 +02:00
lqdev 6195b246a5 ignore SIGPIPE from subprocesses spawned with reproc 2021-06-18 11:17:36 -04:00
Ferdinand Prantl 1eabf99054
Enable lite-xl to be started from a symlink to the deployed binary (#249)
Use resolved executablePath instead of resourcePath to allow lanching
the lite-xl binary via a symlink, like typically done by Homebrew:

/usr/local/bin/lite-xl -> /Applications/lite-xl.app/Contents/MacOS/lite-xl

The resourcePath returns /usr/local in this case instead of
/Applications/lite-xl.app/Contents/Resources, which makes later
access to the resource files fail. Resolving the symlink to the
executable and then the relative path to the expected directory
Resources is a workaround for starting the application from both
the launcher directly and the command line via the symlink.
2021-06-03 21:48:15 +02:00
Francesco Abbate aa0b2bb5fc Fix crash problem with rencache and font access
In some cases rencache was using a FontDesc pointer that was actually freed by
Lua giving segfaults errors.

In addition, some FontDesc object were not freed in some cases if the
rencache_end_frame was not called when performing the "restart" command.

The invalid access problem can happen because rencache keep some pointers to
FontDesc object but these are Lua userdata that Lua can dispose of. This
situation is prone to hard errors and we should avoid to keep pointers to
objects managed by Lua.

To this purpose we use luaL_ref/unref to bind the FontDesc into the Lua's
registry while rencache need them. We still keeps pointer to FontDesc object but
using luaL_ref we are assured they will not be disposed by Lua.

Since we are using luaL_ref/unref to inform the GC about when the objects are in
use we can now finalize the objects directly when Lua collects them. Previously
the GC metamethods was issuing a FREE command to rencache and the font was
actually freed only from the rencache_end_frame function.
2021-05-21 23:38:54 +02:00
Francesco Abbate d8244120e9 Ensure the rencache commands buffer is cleared on restart
Fix issue #176 but it should be tested more thoroughly.
2021-05-05 09:32:24 +02:00
Francesco Abbate 33fe7295c0 First working implemention
Cleanup also debug messages
2021-04-23 14:54:25 +02:00
Francesco Abbate 685b8c82d0 WIP: testing usage of SDL renderer
It does segfault.
2021-04-23 11:58:53 +02:00
Francesco Abbate 12ca5f3d2a Add momentum scroll for macos
Taken from @mathewmariani lite-macos
2021-04-21 09:52:16 +02:00
Francesco Abbate 2f8c70ac51 Remove bundle_open.h file 2021-04-19 09:52:00 +02:00
Francesco Abbate 53f77a29ea Implement correctly loading from macos bundle resources 2021-04-18 08:51:31 -07:00
Francesco Abbate f913a8513f Testing functions to open files from bundle 2021-04-18 17:08:35 +02:00
Takase 49cde08ed6
Use Xlib to read resources (#142) 2021-04-02 16:43:21 +02:00
Francesco Abbate 30f9f20e23 Ensure xrdb code is compiled only on unix 2021-03-17 18:10:47 +01:00