Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(wgpu): invisible windows on X11 desktops with dGPU+iGPU #157

Open
wants to merge 165 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
27174aa
feat: accessibility with some widget impls
wash2 May 2, 2023
1bc1604
feat: sctk shell
wash2 May 8, 2023
97d5dc8
chore: default line height, text size, and shaping for cosmic
mmstick May 30, 2023
33e6bee
runtime: Handle widget operations in `program::State` helper (#46)
Drakulix Jun 13, 2023
9d9da78
fix: reset button state if the cursor leaves
wash2 Jul 10, 2023
9497cdb
Introduce internal `overlay::Nested` for `UserInterface`
tarkah Feb 18, 2023
ebe3374
Use layout with children for nesting
tarkah Feb 19, 2023
a82a398
Use nested for lazy widgets
tarkah Feb 20, 2023
701038b
Provide access to font from each crate
tarkah Jun 23, 2023
40206bd
Added offscreen rendering support for wgpu & tiny-skia exposed with t…
bungoboingo Mar 25, 2023
eed4f5c
Move `Screenshot` inside `window` module
hecrj Jun 27, 2023
9d9d078
fix: quad rendering including border only inside of the bounds
wash2 May 10, 2023
aa65b61
Make vertical scroll properties optional
May 27, 2023
60360cb
feat(winit): client-side resize drag support
mmstick Aug 18, 2023
c69703f
feat(winit): client-side resize drag support
mmstick Aug 18, 2023
3e70ccd
feat(renderer): define default icon color
mmstick Aug 30, 2023
a3fcdc0
fix(button): inherit icon color if set to none
mmstick Aug 31, 2023
d87f092
fix(widget): container inherited wrong icon color from renderer
mmstick Sep 7, 2023
5db1da9
feat(mouse-area): added on_drag method
mmstick Sep 12, 2023
b66eeab
feat: gradient backgground for the slider rail
wash2 Sep 26, 2023
31abe65
fix: slider gradient angle
wash2 Sep 29, 2023
0db19f0
feat: allow setting the width and height of a rule
wash2 Sep 29, 2023
f4d3ea9
refactor: restore default style of slider
wash2 Sep 29, 2023
136f1d9
cleanup: clippy fixes and formatting
wash2 Sep 26, 2023
f0d510f
feat: Add side mouse button events
edfloreshz Oct 22, 2023
cfe214e
feat: add border radius to image rendering
mmstick Nov 3, 2023
e2a3b83
fix(wgpu): handle border_radius property with image raster
mmstick Nov 3, 2023
3db6904
iced_core: feature for serde serialization of KeyCode
jackpot51 Nov 3, 2023
fa679b3
Hack to remove image blur
jackpot51 Nov 13, 2023
5109b61
chore: update softbuffer
wash2 Nov 15, 2023
3c95946
Update mod.rs
wiiznokes Nov 17, 2023
fa62d43
refactor
danieleades Nov 19, 2023
6c34f07
chore: cleanup iced_widget
wash2 Nov 28, 2023
5668408
cleanup git workflows
wash2 Nov 28, 2023
b004b75
cleanup: clippy
wash2 Nov 28, 2023
df3452c
fix: editor and sctk_todos examples
wash2 Nov 28, 2023
7d710e9
reexport limits
wash2 Nov 28, 2023
da1c08d
refactor: udpate gradient angles for slider
wash2 Nov 30, 2023
f08ff47
fix: tooltip children and diff
wash2 Nov 30, 2023
9bbb559
fix: add back the window id to the frames subscription
wash2 Nov 30, 2023
66daa61
fix: CI tests
wash2 Nov 30, 2023
024cb16
chore: remove artifacts job
wash2 Nov 30, 2023
e4a0590
fix: ambiguous palette import
wash2 Nov 30, 2023
f64f6a0
fix: dnd widget layout
wash2 Dec 1, 2023
3d80378
chore: use advanced text shaping for pick list
wash2 Dec 4, 2023
941a5a9
fix: clip mask checks
wash2 Dec 4, 2023
50646ba
fix: set web-sys to =0.3.64
wash2 Dec 4, 2023
73238f1
fix: translate the wayland event position for content inside a scroll…
wash2 Dec 4, 2023
0d673be
fix(example): sctk_drag id
wash2 Dec 6, 2023
9c962a3
cleanup: formatting and clippy
wash2 Dec 7, 2023
37978aa
chore: fix sctk multi-window dependency
wash2 Dec 11, 2023
200cc09
dnd_listener: Fix behavior when there are multiple listeners (#87)
ids1024 Dec 11, 2023
2611d7b
fix: broadcast surface events
wash2 Dec 13, 2023
c155a26
Fixes for last commit
jackpot51 Dec 19, 2023
1a75a1b
Add function to fill a Raw
jackpot51 Dec 19, 2023
d3d89a8
Fix docs error
jackpot51 Jan 12, 2024
590b8ed
Update to cosmic-text refactor
jackpot51 Dec 19, 2023
645a2a9
typo: add rev to glyphon
wash2 Jan 29, 2024
2598830
chore: remove default features
wash2 Jan 29, 2024
7d2564e
fix: core/serde
wash2 Jan 29, 2024
4ffbc79
fix: downgrade resvg
wash2 Jan 29, 2024
aa6ef2b
fix: typo
wash2 Feb 2, 2024
9597f09
chore: use updated softbuffer
wash2 Feb 2, 2024
0c5cf64
feat(wgpu): use alpha modes for compositing if available
wash2 Feb 2, 2024
7ad4d85
fix: distinguish between the key character and the utf8 of a key event
wash2 Feb 2, 2024
9499727
chore: update cosmic-text and glyphon
wash2 Feb 2, 2024
a83d381
fix(winit): pass text with modifiers in event
wash2 Feb 5, 2024
575de00
Update wgpu to a commit that fixes use on Nvidia drivers
ids1024 Feb 6, 2024
dab797f
chore: unpin cosmic-text
wash2 Feb 7, 2024
ef2f139
chore: use pop-os fork of winit
wash2 Feb 7, 2024
273f234
sctk: Add `Subsurface` widget (#79)
ids1024 Feb 8, 2024
68b3e49
Disable broken rustdoc links
jackpot51 Feb 8, 2024
484ac7b
chore: update accesskit
wash2 Feb 8, 2024
8b7b0bf
Remove unnecessary redraw request
jackpot51 Feb 9, 2024
ba4731f
Add `show_window_menu` action
ids1024 Jan 13, 2024
268e210
sctk: add command to set maximize state
jackpot51 Feb 12, 2024
831fa81
fix(sctk): send close event instead of close requested when a window …
wash2 Feb 13, 2024
53a8cc1
fix: autosize surface layout
wash2 Feb 14, 2024
d2dc827
feat(slider): add breakpoints
mmstick Feb 21, 2024
b1a684e
sctk/subsurface: Avoid unnecessary subsurface commits if unchanged
ids1024 Feb 14, 2024
e83c288
sctk/subsurface: Cache `wl_buffer`s
ids1024 Feb 20, 2024
bf5e6b5
examples/sctk_subsurface_gst: Cache `BufferSource` in `BufferRef` qdata
ids1024 Feb 20, 2024
3231920
Handle frame callbacks for subsurfaces, and `commit` parent surface
ids1024 Feb 20, 2024
7b7760f
sctk_subsurface_gst: NV12 surface suppport; disabled
ids1024 Feb 26, 2024
bf032f8
sctk: Add `subsurface_ids` mapping subsurface to parent and offset
ids1024 Feb 27, 2024
b2c581f
sctk_subsurface: Use two surfaces, handle button presses
ids1024 Feb 14, 2024
982174a
sctk: Map subsurface pointer events to parent surface, with offset
ids1024 Feb 27, 2024
e1d1689
fix(multi_window): enable drag resize
jackpot51 Mar 4, 2024
91d912d
fix(sctk): broadcast events after update
wash2 Feb 23, 2024
d06486a
refactor(sctk): optional clipboard
wash2 Mar 5, 2024
c2d5d60
fix(sctk): clipboard dummy impl typo
wash2 Mar 5, 2024
c17007d
fix: clipboard cleanup
wash2 Mar 5, 2024
8cbd24e
fix(sctk): destroy drag icon and send event after cancel action
wash2 Mar 7, 2024
9f8dc93
Use `TypeId` to identify `subscription::Map`
hecrj Feb 4, 2024
9bcfc84
fix(winit): add static lifetimes to application update
mmstick Mar 8, 2024
e7d10f4
fix(winit): add static lifetimes to multi-window application update
mmstick Mar 8, 2024
39426ea
fix(tiny_skia): disable shadows due to rendering glitch
mmstick Mar 13, 2024
6f92812
sctk: Fix handling of layer surface `pointer_interactivity` (#115)
ids1024 Mar 14, 2024
454b953
feat: custom mime types for Clipboard
wash2 Mar 14, 2024
7e85bd8
cleanup docs
wash2 Mar 14, 2024
2bd599c
feat: add actions and commands for new clipboard methods
wash2 Mar 14, 2024
f4bafb8
clippy
wash2 Mar 14, 2024
c76eae7
chore: use tag
wash2 Mar 14, 2024
0260e6c
chore: reexport mime from window_clipboard
wash2 Mar 15, 2024
1d9bb7f
fix: ambiguous import
mmstick Mar 15, 2024
c57f715
feat: winit dnd
wash2 Mar 29, 2024
232c229
fix: doc
wash2 Mar 29, 2024
bc2d154
fix: color format & multi-window
wash2 Mar 30, 2024
a441d81
feat: update advertised drag destinations after rebuilding an interface
wash2 Apr 1, 2024
015a325
fix: docs
wash2 Apr 1, 2024
5b9f77b
fix: pass correct state and layout for container widgets
wash2 Apr 1, 2024
46ef2e2
refactor: remove Sync bound for Message
wash2 Apr 1, 2024
745d846
sctk: Fix handling of DnD with subsurfaces (#122)
ids1024 Apr 3, 2024
f944754
fixes for dnd
wash2 Apr 4, 2024
52187b6
chore: update tag
wash2 Apr 4, 2024
d549c5d
Call unlock on session lock
jackpot51 Apr 5, 2024
a77c6c1
Clean up after lock surfaces are destroyed
jackpot51 Apr 5, 2024
5680ad0
fix(container): id and set_id should use content
wash2 Apr 5, 2024
da63537
fix(scrollable): pass child layout when calculating drag destinations
wash2 Apr 5, 2024
f689948
fix(winit multi-window): handle exit_on_close request
wash2 Apr 5, 2024
ab89ac1
fix: translate offer positions in scrollable
wash2 Apr 9, 2024
1add6cc
chore: update tag
wash2 Apr 9, 2024
f149055
Add read_primary/write_primary
snaggen Apr 10, 2024
b7e7021
fix(tiny-skia): non-simple border scaling
wash2 Apr 11, 2024
c87978d
Update window_clipboard to pop-dnd-4
jackpot51 Apr 13, 2024
3fe3a61
slider & toggler roundness
wash2 Apr 15, 2024
feda333
Send `DataSource` events to all surfaces
ids1024 Apr 22, 2024
900bad5
sctk: Use empty input region for subsurfaces
ids1024 Apr 24, 2024
4c756fe
fix(scrollable): filter scroll events in the wrong direction
wash2 Apr 24, 2024
46b4374
fix(tiny_skia): damage
wash2 Apr 25, 2024
38e9fd6
feat(mouseare): mouse enter and exit
leb-kuchen Apr 13, 2024
364c90c
fix(sctk): nested popup parent
wash2 Apr 23, 2024
deae3d4
sctk: Add support for drag-and-drop surface offsets
ids1024 Apr 25, 2024
08fc97c
Adjust to line ending needing to be specified as part of cosmic_text:…
jackpot51 Apr 30, 2024
1869fe3
fix: clean up dnd surfaces when a window is removed
wash2 May 1, 2024
927a852
fix: update widnow-clipboard tag
wash2 May 1, 2024
317458e
sctk: Add touch support
ids1024 Apr 26, 2024
d756c9d
sctk: Support `start_drag` with drags started from touch events
ids1024 Apr 26, 2024
81a483b
iced_wgpu: Query wayland for the device to use, if possible
Drakulix May 14, 2024
7c58b8e
fix(image): guess the image format before decoding
wash2 May 15, 2024
84d788c
fix: emit Event::Resized to fix nav bar in cosmic-settings
mmstick May 30, 2024
09116a8
fix: better handling of state tree
wash2 May 29, 2024
2dcae59
fix: avoid with_borrow_mut
wash2 May 30, 2024
dc1fea8
fix(core): replace debug_assert in diff
wash2 May 31, 2024
34973a5
fix: update read and write methods so they don't recurse
wash2 May 31, 2024
ce62217
fix: refactor dnd impl to support responsive widget
wash2 May 31, 2024
9ce8c6b
cargo fmt
wash2 May 31, 2024
323f80f
wgpu: fix nvidia gpu powering up in hybrid setups
Drakulix May 28, 2024
ef247e2
wgpu: Fix querying adapter, even if we already have one
Drakulix Jun 3, 2024
c47171d
wgpu: Fix wayland device id conversion
Drakulix Jun 3, 2024
f942212
Adapt to new cosmic-text
jackpot51 Jun 10, 2024
12415d8
fix: unset VK_LOADER_DRIVERS_DISABLE after enumeration
mmstick Jun 11, 2024
7be016e
Adapt to cosmic-text undefined width change
jackpot51 Jun 12, 2024
5409352
Update for cosmic-text undefined buffer size
jackpot51 Jun 12, 2024
31709bb
sctk: Update `sctk`, `wayland-protocols`
ids1024 Jun 7, 2024
3f39d5c
sctk: Add alpha setting to `Subsurface` widget
ids1024 Jun 8, 2024
3b70fe3
sctk: Unmap subsurfaces instead of immediately destroying them
ids1024 Jun 8, 2024
9a366dd
Update `window_clipboard`
ids1024 Jun 12, 2024
296b322
iced_wgpu: don't query Wayland on macos
bjorn-ove Jun 13, 2024
b2921d5
fix: only try to connect to clipboard if on linux
wash2 Jun 19, 2024
d0ba498
fix: enable the tokio feature for accesskit_unix
wash2 Jun 20, 2024
e707391
refactor(sctk): convert window actions
wash2 Jun 27, 2024
4c609e7
fix: settings.decorations enables SSD
wash2 Jun 28, 2024
6f83a8d
fix(core): state order and handling of new trees
wash2 Jul 5, 2024
f6ba094
fix(wgpu): invisible windows on X11 desktops with dGPU+iGPU
mmstick Jul 6, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(winit): client-side resize drag support
mmstick authored and wash2 committed Feb 6, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 60360cb8bc96780f38719681be9998acc4915928
3 changes: 3 additions & 0 deletions core/src/renderer.rs
Original file line number Diff line number Diff line change
@@ -56,12 +56,15 @@ impl Default for Quad {
pub struct Style {
/// The text color
pub text_color: Color,
/// The scale factor
pub scale_factor: f64,
}

impl Default for Style {
fn default() -> Self {
Style {
text_color: Color::BLACK,
scale_factor: 1.0,
}
}
}
1 change: 1 addition & 0 deletions examples/integration/src/controls.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use iced_wgpu::core::window::Id;
use iced_wgpu::Renderer;
use iced_widget::{slider, text_input, Column, Row, Text};
use iced_winit::core::{Alignment, Color, Element, Length};
2 changes: 2 additions & 0 deletions examples/integration/src/main.rs
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ mod scene;
use controls::Controls;
use scene::Scene;

use iced_wgpu::core::window::Id;
use iced_wgpu::graphics::Viewport;
use iced_wgpu::{wgpu, Backend, Renderer, Settings};
use iced_winit::conversion;
@@ -159,6 +160,7 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
);

let mut state = program::State::new(
Id(0),
controls,
viewport.logical_size(),
&mut renderer,
3 changes: 1 addition & 2 deletions examples/scrollable/src/main.rs
Original file line number Diff line number Diff line change
@@ -3,12 +3,11 @@ use iced::widget::{
button, column, container, horizontal_space, progress_bar, radio, row,
scrollable, slider, text, vertical_space,
};
use iced::{executor, theme, Alignment, Application, Color};
use iced::{executor, theme};
use iced::{
Alignment, Application, Border, Color, Command, Element, Length, Settings,
Theme,
};
use iced::{Command, Element, Length, Settings, Theme};
use iced_core::id::Id;

use once_cell::sync::Lazy;
20 changes: 16 additions & 4 deletions sctk/src/application.rs
Original file line number Diff line number Diff line change
@@ -900,6 +900,7 @@ where
state.theme(),
&Style {
text_color: state.text_color(),
scale_factor: state.scale_factor(),
},
state.cursor(),
);
@@ -1347,7 +1348,6 @@ where
user_interface = user_interface
.relayout(logical_size, &mut renderer);
debug.layout_finished();

state.viewport_changed = false;
}
debug.draw_started();
@@ -1356,13 +1356,20 @@ where
state.theme(),
&Style {
text_color: state.text_color(),
scale_factor: state.scale_factor(),
},
state.cursor(),
);

debug.draw_finished();
ev_proxy
.send_event(Event::SetCursor(new_mouse_interaction));
interfaces.insert(native_id.inner(), user_interface);
if new_mouse_interaction != mouse_interaction {
mouse_interaction = new_mouse_interaction;
ev_proxy
.send_event(Event::SetCursor(mouse_interaction));
}

let _ =
interfaces.insert(native_id.inner(), user_interface);

let _ = compositor.present(
&mut renderer,
@@ -1938,6 +1945,11 @@ where
Event::SctkEvent(IcedSctkEvent::UserEvent(e))
})));
}
command::Action::Stream(stream) => {
runtime.run(Box::pin(
stream.map(|e| Event::SctkEvent(IcedSctkEvent::UserEvent(e))),
));
}
command::Action::Clipboard(action) => match action {
clipboard::Action::Read(s_to_msg) => {
if matches!(clipboard.state, crate::clipboard::State::Connected(_)) {
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -213,7 +213,7 @@ pub mod multi_window;
pub use style::theme;

pub use crate::core::alignment;
pub use crate::core::border;
pub use crate::core::border::{self, Border, Radius};
pub use crate::core::color;
pub use crate::core::gradient;
pub use crate::core::{
3 changes: 2 additions & 1 deletion widget/src/button.rs
Original file line number Diff line number Diff line change
@@ -291,7 +291,7 @@ where
tree: &Tree,
renderer: &mut Renderer,
theme: &Theme,
_style: &renderer::Style,
renderer_style: &renderer::Style,
layout: Layout<'_>,
cursor: mouse::Cursor,
_viewport: &Rectangle,
@@ -315,6 +315,7 @@ where
theme,
&renderer::Style {
text_color: styling.text_color,
scale_factor: renderer_style.scale_factor,
},
content_layout,
cursor,
1 change: 1 addition & 0 deletions widget/src/container.rs
Original file line number Diff line number Diff line change
@@ -267,6 +267,7 @@ where
text_color: style
.text_color
.unwrap_or(renderer_style.text_color),
scale_factor: renderer_style.scale_factor,
},
layout.children().next().unwrap(),
cursor,
1 change: 1 addition & 0 deletions widget/src/pane_grid/title_bar.rs
Original file line number Diff line number Diff line change
@@ -133,6 +133,7 @@ where
let style = theme.appearance(&self.style);
let inherited_style = renderer::Style {
text_color: style.text_color.unwrap_or(inherited_style.text_color),
scale_factor: inherited_style.scale_factor,
};

container::draw_background(renderer, &style, bounds);
1 change: 1 addition & 0 deletions widget/src/tooltip.rs
Original file line number Diff line number Diff line change
@@ -446,6 +446,7 @@ where

let defaults = renderer::Style {
text_color: style.text_color.unwrap_or(inherited_style.text_color),
scale_factor: inherited_style.scale_factor,
};

Widget::<(), Theme, Renderer>::draw(
1 change: 1 addition & 0 deletions winit/src/application.rs
Original file line number Diff line number Diff line change
@@ -511,6 +511,7 @@ async fn run_instance<A, E, C>(
state.theme(),
&renderer::Style {
text_color: state.text_color(),
scale_factor: state.scale_factor(),
},
state.cursor(),
);
5 changes: 5 additions & 0 deletions winit/src/multi_window.rs
Original file line number Diff line number Diff line change
@@ -546,6 +546,7 @@ async fn run_instance<A, E, C>(
window.state.theme(),
&renderer::Style {
text_color: window.state.text_color(),
scale_factor: window.state.scale_factor(),
},
cursor,
);
@@ -616,6 +617,9 @@ async fn run_instance<A, E, C>(
window.state.theme(),
&renderer::Style {
text_color: window.state.text_color(),
scale_factor: window
.state
.scale_factor(),
},
window.state.cursor(),
);
@@ -862,6 +866,7 @@ async fn run_instance<A, E, C>(
state.theme(),
&renderer::Style {
text_color: state.text_color(),
scale_factor: state.scale_factor(),
},
cursor,
)