summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Update version to 3.0.1v3.0.1Ben Bridle2024-10-29
|
* Re-export CursorIconBen Bridle2024-10-29
| | | | This type is used by the Request::ShowCursor enum variant.
* Update version to 3.0.0v3.0.0Ben Bridle2024-10-28
|
* Complete rewrite of PhosphorBen Bridle2024-10-19
| | | | | | | | | | | | | | | The previous version of the library passed events to an implementation of a WindowController trait by calling the trait method associated with each event, and received requests by calling different trait methods and reading the returned values. This had the downside of requiring that any data received from one event had to be stored in the type so that it could be passed back to Phosphor when a request method was called. The new library structure uses a single handle_event method on a trait, which is passed data representing any single event when it is called. Data is returned via a passed mutable reference to an EventQueue, meaning that any number of responses for any event can be immediately returned to Phosphor without having to wait in storage.
* Fix issue with damaged screen not being redrawnBen Bridle2024-09-10
| | | | | | | | | | | | | | When another window was dragged over a Phosphor window, the Phosphor window would have streaks drawn over it from the dragged window and would need to be redrawn. This was handled by an unrequested render request, where a render request is received that was sent not by the program itself but by Phosphor. These unrequested requests were being ignored due to commit 30c61fd, because of an issue on Windows where programs were receiving upwards of 50 unrequested requests per second for no reason, which was impacting program performance. They have been re-enabled, pending an investigation into the cause of these requests on Windows.
* Update version to 2.0.0v2.0.0Ben Bridle2024-08-10
|
* Unify is_cursor_visible and cursor_icon callbacksBen Bridle2024-08-04
| | | | It makes sense to handle all cursor icon state at once.
* Fix display server lagBen Bridle2024-08-04
| | | | | | This commit reverts commit 3d44c40. Calling window.title() was causing the X11 display server to go from 1% to 20% constant CPU usage when testing on Linux.
* Improve comment clarityBen Bridle2024-07-31
|
* Simplify codeBen Bridle2024-07-31
| | | | We don't need to keep track of the previous value of the window title.
* Implement fullscreenBen Bridle2024-07-31
| | | | Program windows can choose to show as fullscreen or windowed.
* Only set window title when changedBen Bridle2024-07-31
| | | | | | Setting the window title every frame was causing Windows Explorer to show a consistent 4% CPU usage when testing under Windows 10. This change brings it down to 0.2%.
* Fix window manager glitchesBen Bridle2024-07-30
| | | | | | Rapidly modifying the window properties was causing the cursor to vanish when attempting to drag-resize the window, and was preventing the window from correctly maximising when double-clicking the title bar.
* Ignore unrequested rendersBen Bridle2024-07-30
| | | | | | | | | Unrequested renders are detected and ignored to prevent unnecessary rendering work. This was accomplished by keeping track of not just the current render hint, but also keeping track of whether a render has been requested at all. Unrequested renders have been observed while testing on Windows 10.
* Update version to 1.1.0v1.1.0Ben Bridle2024-06-09
|
* Fix rendering issueBen Bridle2024-06-09
| | | | | I can't remember exactly what these changes were added to fix, it's been a long time since I wrote them
* Fix library version conflict errorsBen Bridle2024-06-09
|
* Fix scroll directionBen Bridle2024-06-01
| | | | | Previously, scroll values would increase in the upwards and leftwards directions. They now increase in the downward and rightward directions.
* Add information to Cargo.tomlv1.0.0Ben Bridle2023-12-24
|
* Use Git URLs for dependencies instead of local file pathsBen Bridle2023-12-24
| | | | | Dependencies are now fetched from the benbridle.com git server, instead of Ben's local filesystem.
* Use geometry types forwarded by bufferBen Bridle2023-12-24
| | | | | | Previously, this crate was defining its own set of aliases for types from the geometry crate, which were clashing with the aliases already defined by the buffer crate. The buffer aliases are now used instead.
* Add a feature flag to enable each supported display serverBen Bridle2023-12-24
| | | | | | | This commit forwards the winit display server feature flags as phosphor feature flags, so that downstream software can choose which display servers to enable or disable support for. Disabling support for a display server has the effect of reducing compile times and binary size.
* Stop tracking the Cargo.lock fileBen Bridle2023-12-24
| | | | | Libraries are never supposed to track the Cargo.lock file, it was tracked in this repository a while ago by mistake.
* Prevent crash when window dimension resizes to zeroBen Bridle2023-12-19
| | | | | | | | | If an application attempted to change either of the window dimensions to zero, the surface would resize to the new dimensions and cause the window definition in the display server to enter an invalid state, causing the display server to crash the application. This change ensures that the window dimensions are always greater than zero.
* Redraw the window when the logical dimensions changeBen Bridle2023-12-19
| | | | | | Previously the window would only be redrawn when the physical dimensions changed, which meant that the effects of a pixel scale change would not be visible until the application requested a re-render.
* Make window rendering code more efficientBen Bridle2023-12-19
| | | | | | | The code to scale the window buffer and draw it to the window surface has been made more efficient through the use of slice::copy_from_within and slice::fill, instead of what was slow pixel-by-pixel iteration over long horizontal strips.
* Use logical position for cursor positionBen Bridle2023-12-19
| | | | | | | Previously the physical cursor position instead of the logical cursor position was being passed to WindowController::on_cursor_move, which meant that the cursor position that the application was receiving would be incorrect when the window scale was greater than 1.
* Use pixel scale as window resize incrementBen Bridle2023-12-19
| | | | | | | | When resizing a window, the window width and height will be made to be a multiple of the current pixel scale. This is to prevent thin black strips from rendering along the bottom edge and the right edge of the window when the dimensions of the window exceed the dimensions of the scaled screen content.
* Specify frame limit as FPS instead of as frame timeBen Bridle2023-12-19
|
* Remove winit feature restrictionBen Bridle2023-12-19
|
* Remove test programBen Bridle2023-11-05
|
* Implement window scalingBen Bridle2023-11-05
| | | | | | A window now can declare a scale factor to be used when rendering logical pixels to a physical window. Each logical pixel will be drawn as an NxN block of physical pixels, where N is the scale factor.
* Rewrite phosphorBen Bridle2023-10-11
| | | | | | | | | | | | This has been a long-awaited task, the code has been accumulating small changes for a while now. This commit consolidates all these changes in order to make the code more readable and maintainable for the future. Notable changes: - Remove the concept of a ProgramController - Remove all of the dead OpenGL stub code - Update winit to version 28.1, from 27.4 - Use softbuffer for writing pixels to the native display server
* First commit, before upgrading winit to version 28.1Ben Bridle2023-10-10