Add isolated native Rime service and MiSans candidate UI
This commit is contained in:
1 parent
f21167e1a2
commit
8e9a5838ab
28 files changed
+2381
-17
No files matched your search
@@ -469,8 +469,31 @@ pub(super) fn rounded_window_elements(
|
||||
let radius = corners.radius;
|
||||
let surface = toplevel.wl_surface();
|
||||
|
||||
let mut input_popups = Vec::new();
|
||||
let mut content = PopupManager::popups_for_surface(surface)
|
||||
.flat_map(|(popup, popup_offset)| {
|
||||
if matches!(popup, smithay::desktop::PopupKind::InputMethod(_)) {
|
||||
// InputMethod geometry is the parent's global rectangle, not
|
||||
// an xdg window-geometry origin. IME popups also extend beyond
|
||||
// the parent and must not enter its rounded-window crop.
|
||||
let offset = (geometry.loc + popup_offset).to_physical_precise_round(scale);
|
||||
input_popups.extend(
|
||||
render_elements_from_surface_tree::<
|
||||
GlesRenderer,
|
||||
WaylandSurfaceRenderElement<GlesRenderer>,
|
||||
>(
|
||||
renderer,
|
||||
popup.wl_surface(),
|
||||
location + offset,
|
||||
scale,
|
||||
alpha,
|
||||
RenderElementKind::Unspecified,
|
||||
)
|
||||
.into_iter()
|
||||
.map(AnimatedWindowRenderElement::RawSurface),
|
||||
);
|
||||
return Vec::new();
|
||||
}
|
||||
let offset = (geometry.loc + popup_offset - popup.geometry().loc)
|
||||
.to_physical_precise_round(scale);
|
||||
|
||||
@@ -487,6 +510,7 @@ pub(super) fn rounded_window_elements(
|
||||
)
|
||||
.into_iter()
|
||||
.map(WindowContentRenderElement::from)
|
||||
.collect::<Vec<_>>()
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
content.extend(
|
||||
@@ -518,17 +542,19 @@ pub(super) fn rounded_window_elements(
|
||||
}),
|
||||
);
|
||||
|
||||
constrain_render_elements(
|
||||
content,
|
||||
location,
|
||||
physical_constrain,
|
||||
reference,
|
||||
behavior,
|
||||
ConstrainAlign::TOP | ConstrainAlign::LEFT,
|
||||
scale,
|
||||
)
|
||||
.map(Into::into)
|
||||
.collect()
|
||||
input_popups.extend(
|
||||
constrain_render_elements(
|
||||
content,
|
||||
location,
|
||||
physical_constrain,
|
||||
reference,
|
||||
behavior,
|
||||
ConstrainAlign::TOP | ConstrainAlign::LEFT,
|
||||
scale,
|
||||
)
|
||||
.map(Into::into),
|
||||
);
|
||||
input_popups
|
||||
}
|
||||
|
||||
pub(super) fn resize_content_behavior(intentional_scale: bool) -> ConstrainScaleBehavior {
|
||||
|
||||
@@ -100,7 +100,7 @@ render_elements! {
|
||||
Surface=SurfaceRenderElement,
|
||||
Memory=MemoryRenderElement,
|
||||
Solid=SolidColorRenderElement,
|
||||
LockSurface=WaylandSurfaceRenderElement<GlesRenderer>,
|
||||
RawSurface=WaylandSurfaceRenderElement<GlesRenderer>,
|
||||
Border=SharedPixelShaderElement,
|
||||
Blur=BlurRenderElement,
|
||||
Effect=PhysicalShaderElement,
|
||||
|
||||
Reference in new issue
Block a user