Commit Graph

77 Commits

Author SHA1 Message Date
Timon 3fd0460d03
Desktop: Update CEF to 142 (#3431)
* update CEF to 142

* fix win

* fixup

* post merge fix

* use getter instead
2025-11-30 23:23:31 +00:00
Timon 94e5c8fc05
Desktop: Prevent CEF context menu to fix crashing by right-clicking a text field (#3429)
* add dummy context menu handler to prevent some crashes

* some cleanup

correcting cef handler impl names
using std::ffi::c_int
2025-11-29 00:08:43 +00:00
Timon bb4516e377
Desktop: Add app menu for Mac (#3428)
* add mac app menu

* review fixup

* Remove "About Graphite" ellipsis, add "Show All", make it say "Quit Graphite"

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-28 23:42:14 +00:00
Timon f4608a6e40
Desktop: Resize issue mitigation, scroll speed adjustment and duplicate pointer move event filtering (#3424)
* mitigate resizing issue on mac and windows

* adjust scroll speed for mac and win

* fixup

* filter out duplicate mouse move events
2025-11-27 16:18:52 +00:00
Timon 5ff399d3f2
Desktop: Display taskbar icon on Windows (#3376)
* task bar icon

* limit cef render processes to 1

* disable more chrome features
2025-11-25 14:16:59 +00:00
Timon 96c5e3ec18
Desktop: Add Icon for Mac (#3401)
Add icon
2025-11-25 11:02:21 +00:00
Timon 3f532e478c
Separate branded assets from monorepo (#3406)
* remove branded files

* use branding repo

* include favicons

* nixpkg fixup

* win fix ico path

* fix fmt

* skip licensenses for dev builds

* review fixup

* test

* test

* ci test

* ci test

* ci test

* fix ci
2025-11-25 02:42:27 +00:00
Dennis Kobert a932eaedcf
Render artwork at correct resolution when using vello on wasm (#3416)
* Work on fixing rendering for wasm+vello

* Render vello canvas in wasm at the correct resolution

* Cleanup unused surface rendering code

* Remove vector to raster conversion

* Remove desktop changes

* Revert window.rs changes

* Don't round logical coordinates

* Fix desktop compilation + don't round logical coordinates for svg rendering

* Further cleanup

* Compute logical size from acutal physical sizes
2025-11-24 14:23:27 +00:00
Timon 548e0df1a1
Desktop: Mac menu workaround (#3398) 2025-11-19 17:13:35 +00:00
Dennis Kobert 57b0b9c7ed
Restructure node crates (#3384)
* Restructure node-graph folder

* Fix wasm compilation

* Move node definitions out of *-types crates

* Cleanup

* Fix warnings

* Fix warnings

* Start adding migrations

* Add migrations and move memo nodes to gcore

* Move nodes/gsvg-render -> rendering

* Replace some hard coded identifiers and fix automatic conversion

* Fix Vec2Value node migration

* Fix formatting

* Add more migrations

* Cleanup features

* Fix core_types::raster import

* Update demo artwork (to make profile ci work)

* Move *-types to node-graph/libraries folder

* Add missing node migrations

* Migrate more nodes

* Remove impure memo node

* More fixes and remove warning

* Migrate context and add a few missing migrations

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-18 10:21:54 +00:00
Timon e751979e5c
Desktop: Mac fix keyboard input (#3371)
* add browser debug port env

* mac use option as alt

* fix cef texture double sRGB conversion by using cef-rs fork with fix

* fix keyboard input on mac

* add missing frontend messages

* fixup

* fix keyboard input mac

* dbg

* re implement keyboard mapping

Co-authored-by: csmoe <csmoe@msn.com>

* Fix double arrow keys

* try fix for non mac

* test

* Revert "test"

This reverts commit c7cde9c597e24ef7270ccc69c93a382939a2ce0f.

* fix mac

* some cleanup

* fix zoom in shortcut on mac introduced in #3377

* disable menu shortcut display

* fixup
2025-11-17 11:51:59 +00:00
Timon ebb434692a
Desktop: Enable GPU nodes (#3364)
* desktop simple nix ci

* make workflow manual

* fixup

* fix nix shell

* nix fmt

* fix shell
2025-11-16 22:37:02 +00:00
Timon 9be207f4c5
Desktop: Update CEF to 141 (#3352)
update cef to 141
2025-11-08 11:59:02 +00:00
Timon f02f834097
Desktop: Add support for UI scaling (#3310)
* desktop support ui scaling

* fix some warnings

* use browser zoom if needed

* fix infinite footprint size

* fix web canvas scale

* always set zoom

* use only zoom for scaling

* prevent user zoom

* remove mouse position scaling
2025-11-08 12:32:04 +01:00
Timon 0d76ffd66d
Desktop: Mac remove menubar flicker (#3335)
* remove unnecessary folders from bundling for mac

* mac remove menu bar flicker

* clean up implementation
2025-11-04 09:26:08 +00:00
Timon 5be9b1fabc
Desktop: Mac native menu bar (#3301)
* macos native menu bar

* fix nix build

* Add shortcut symbols to menu

* fix fmt

* fix vendoring

* cleanup intercept frontend message

* accept into editor message in queue function
2025-10-27 14:11:24 +00:00
Timon 52e98ea8a3
Desktop: Remove winit fork, fix nix package, and improve rendering (#3307)
* reduce triangle count

* switch to winit repo after changes where upstreamed

* fix nix pkg
2025-10-25 00:47:36 +00:00
Timon c4f6a2c9c1
Desktop: Add window abstraction layer (#3302)
* add bundle for mac os and windows

* Fix bundle name

This name gets used as the display name of the app on mac os, shorter name looks better and is more consistent.

* preserve std out by running bin directly

* bundle placeholder on linux

* fix linux

* window abstraction

* fix linux

* fix windows

* fix fmt

* remove windows file that was left

* use self
2025-10-23 11:33:32 +00:00
Timon 7fbe440e73
Desktop: Bundle for Mac and Windows (#3297)
* add bundle for mac os and windows

* Fix bundle name

This name gets used as the display name of the app on mac os, shorter name looks better and is more consistent.

* preserve std out by running bin directly

* bundle placeholder on linux

* fix linux
2025-10-23 10:39:08 +00:00
Timon 39f4ccf8e0
Desktop: Fixup MacOS build (#3295)
desktop mac os fixup

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-10-20 13:31:36 +00:00
Timon 3509f0b035
Desktop: Persist document path (#3272)
* persist document path

* persist data cleanup
2025-10-15 10:30:47 +00:00
Timon 717defb2bb
Desktop: Trackpad pinch to zoom (#3271)
* prototype pinch gesture

* pinch to zoom

* fix
2025-10-14 22:27:27 +00:00
Mateo 497758c273
Desktop: Add simple cli interface (#3059)
* Open document from cli and add some files to .gitignore

* Revert .gitignore

* Revert .gitignore

* Implement cli properly

* Add ui-accelerated-painting option

* Format code

* Revert changes in .vscode folder

* Don't use global variables for cli

* Apply suggested changes

* Make ready for merge

* Improve names

* remove comment

---------

Co-authored-by: Timon <me@timon.zip>
2025-10-13 21:09:40 +00:00
Timon e366e4d64e
Desktop: Update CEF to v140 (#3277)
* update cef to v140

* fix build

* update flake
2025-10-13 04:56:56 +00:00
Timon 48ac24da14
Desktop: Fix frontend message response dispatch (#3247)
* One annoying debugging session later

Discovered that the editor handles frontend messages differently from other messages.
It requires all frontend messages to be fully processed before dispatching any resulting messages.

In the web frontend, this behavior happened implicitly because message dispatch is queued at the current end of the JavaScript execution queue.
For the desktop frontend, I added a vector to collect all responses until the entire batch of frontend messages is handled, and then dispatch them afterwards.

* Fix double click travel
2025-10-06 20:04:24 +00:00
Timon 4bb1d05fc3
Desktop: Add taskbar icon on Windows (#3225)
* include icon as resource on windows

* load icon
2025-09-26 14:30:01 +02:00
Timon d06c8164e1
Desktop: Forward multi-clicks (double/triple/etc.-clicks) to CEF correctly (#3224)
* fix multiclick

* Revert "fix multiclick"

This reverts commit c4130d12ee3f9e13b531da18d2285ea1a34a65b0.

* try another way

* use copy

* Use struct initializer syntax fror click tracker (#3226)

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-09-26 14:29:56 +02:00
Timon ed22e6a63d
Desktop: Add rudimentary support for custom WGPU adapter selection (#3201)
* rudimentary custom wgpu adapter selection

* WgpuContextBuilder

* wasm fix

* fix wasm warnings

* Clean up

* Review suggestions

* fix
2025-09-25 14:38:26 +00:00
Timon d595089bb0
Desktop: Fix maximized window extending outside the screen on Windows (#3210)
Desktop: Fix window extending outside the screen on windows when maximized
2025-09-25 15:22:05 +02:00
Timon 04a2452333
Desktop: Support cursor icon change (#3223)
* browser console message forwarding

* replace target to make it easy to identify browser console messages

* use warn as per review comment

* cursor icon change

* fix win build
2025-09-25 11:23:19 +00:00
Timon b4be616de0
Desktop: Browser console message forwarding (#3193)
* browser console message forwarding

* replace target to make it easy to identify browser console messages

* use warn as per review comment
2025-09-25 10:42:07 +00:00
Timon d15f63f4fd
Ensure the LoadPreferences message is dispatched with None when no preferences exist (#3198)
* preference load message on default load

* review fixup
2025-09-23 20:19:16 +00:00
Timon 21f34ab19a
Desktop: Enable window resize controls on Wayland compositors (#3183)
wayland client side decorations
2025-09-21 12:17:05 +00:00
Timon 09bc891ab2
Desktop: Forward the pointer leave event to CEF (#3197)
* pointer leave

* make one-liner
2025-09-21 10:23:51 +00:00
Timon 46d5928724
Desktop: Fix window maximize and minimize (#3200)
Fix window maximize and minimize state
2025-09-20 23:48:47 +00:00
Timon 3fe7c477e9
Desktop: Switch to the latest unreleased version of Winit (#3177)
* Use unstable winit

* Improve

* Remove unnecessary heap indirection
2025-09-17 16:40:43 +02:00
Timon ab55b3225d
Desktop: Window resize handling on Windows (#3167)
* Native window resize on windows

* Fix linux build

* Fix windows build

* try clean up

* clean up

* Add module comment

* FIx

* Review improvements

* Improve
2025-09-15 12:15:31 +00:00
Timon da330b6dd0
Desktop: Run CEF in incognito mode and delete root cache path on exit (#3137)
* Try

* Run cef in non persistence mode
2025-09-13 22:19:45 +00:00
Timon 944a6eeea2
Desktop: Hook up native window controls (#3161)
* Implement window controls

* Fix drag target size

* Maximize with drag area double click
2025-09-13 20:15:52 +00:00
Timon e97d5520e8
Desktop: Support receiving double click inputs (#3168)
* input support double clicks and clean up

* Review improvements
2025-09-13 12:40:31 +00:00
Timon c51967384f
Desktop: Fix keyboard shortcuts on windows (#3139)
* Try to fix shortcuts on windows

* Fix
2025-09-10 10:51:15 +00:00
Timon 50be13522b
Desktop: Move preferences persistence to native (#3138)
* Move preference persistence to native

* Pass preferences as struct instead of serialized to string
2025-09-09 16:22:25 +00:00
Timon 4261b7dad1
Desktop: Move autosave persistence to native (#3134)
* Move autosave persistence to native 1

* Move autosave persistence to native 2

* Reimplement quirky behavior of the web frontend

* Code revew

* Use select_after_open

* fix fmt

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-09 11:27:54 +00:00
Dennis Kobert acd7ba38cc
Graphene: Fine-grained context caching (#2500)
* RFC: Fine Grained Context Caching

* Fix typos

* Fix label

* Add description of inject traits

* Explicitly support context modification

* Start implementation of context invalidation

* Add inject trait variants
* Route Extract / Inject traits to the proto nodes

* Implement context dependency analysis

* Implement context modification node insertion

* Fix erronous force graph run message

* Fix Extract* Inject* annotations in the nodes

* Require Hash implementation for VarArgs

* Fix nullification node insertion

* Cross of done items unresolved questions section

* Update Cargo.lock

* Fix context features propagation

* Update demo artwork

* Remove BondlessFootprint and FreezeRealTime nodes

* Fix migration

* Add migrations for adding context features to old networks

* Always update real time regardless of animation state

* Cargo fmt

* Fix tests

* Readd sed command to hopefully fix profile result parsing

* Add debug output to profiling pr

* Use new totals instead of summaries for for iai results

* Even more debugging

* Use correct debug metrics (hopefully)

* Add more MemoNode implementations

* Add context features annotation to shader node macro

* Cleanup

* Time -> RealTime

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-09-05 11:44:26 +00:00
Firestar99 be3de511f2
Desktop: Pin CEF version (#3113)
Fixed CEF cargo dependency so `cargo update` does not update it
2025-08-31 10:22:34 +00:00
Firestar99 ce1cd1706b
Disable `proc-macros` crate from being tested due to cargo bug (#3103)
* cargo: remove unused `editor/ron` feature

* cargo: add wgpu-executor as a member, sort list

* cargo: test every crate by default

* cargo: disable testing of `graphite-proc-macros`
2025-08-29 12:25:35 +02:00
Timon 1d4d1026d4
Desktop: Make embedded resources optional (#3094)
* Make embedding resources optional

* Move remaining cef rc to internal module

* Move embedded resources to separate crate

* Review fixup

* Fix

* Fix read

* Add read error
2025-08-28 17:18:18 +00:00
Timon c5991c6f61
Desktop: show platform specific window buttons (#3078)
Implement app window button functionality and set platform
2025-08-25 14:15:31 +00:00
Timon 508606cdba
Desktop: add missing txt file mime type mapping (#3091)
add missing txt file extension to mime type mapping

missing mapping caused license dialog that loads txt file to fail and report no network connection
2025-08-25 15:51:59 +02:00
Timon c6ec3a27ca
Desktop: Buffer web messages until connection is initialized (#3082)
Buffer web messages until connection is initialized
2025-08-22 15:15:17 +00:00