Adds a new toggler "Place buttons on the left (macOS style)" in
*Desktop → Window Management → Window controls*, next to the existing
show_maximize / show_minimize controls. When enabled, writes
`WindowControlsPosition::Start` into the `CosmicTk` config
(com.system76.CosmicTk); when disabled, writes `End` (default).
All libcosmic-based applications rebuilt against a libcosmic that
exposes `WindowControlsPosition` pick up the change live through the
existing cosmic-config subscription.
Includes:
- new Message variant WindowControlsPositionStart(bool) + handler
- `window-controls.position-start` fluent key added in en + fr locales
- Cargo.toml: activate local [patch] override to libcosmic (dev only,
not suitable for upstream merge)
Requires: libcosmic >= 5c331935 (header_bar WindowControlsPosition).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- from: new size is committed as soon as the slider position is changed (triggers panel/dock restart),
- to: new size is committed only when slider is released.
Fixed a few spelling errors.
- [x] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
…eded
- [x] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
Fixes#1814
## Problem
When a system has an NVIDIA GPU, wgpu enumerates it twice:
- Via Vulkan backend: `"NVIDIA GeForce RTX 3080 Ti Laptop GPU"`
- Via OpenGL backend: `"NVIDIA GeForce RTX 3080 Ti Laptop
GPU/PCIe/SSE2"`
The OpenGL variant includes a renderer suffix (`/PCIe/SSE2`) which
causes the name-based deduplication to fail, resulting in duplicate GPU
entries in Settings -> System -> About.
## Solution
Add `normalize_gpu_name()` helper that strips OpenGL renderer suffixes
(everything after `/`) before comparing names for deduplication. This
ensures both Vulkan and OpenGL representations of the same GPU are
correctly identified as duplicates.
## Changes
- `cosmic-settings/src/pages/system/info.rs`:
- Added `normalize_gpu_name()` function with doc comment
- Modified `wgpu_graphics()` to use normalized names for `seen_names`
HashSet
## Testing
- [x] `cargo fmt --check` passes
- [x] `cargo clippy --all-features` passes (no new warnings)
- [x] `cargo test --all-features` passes (3/3 tests)
- [x] `just check-features` passes
- [x] Manual testing: Verified on system with NVIDIA GPU that duplicate
entries no longer appear
## Checklist
- [x] I have disclosed use of any AI generated code in my commit
messages.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the Developer Certificate of Origin and certify my
contribution under its conditions.
Signed-off-by: manascb1344 <zephop76593@gmail.com>
Calling pair() works for keyboards since they do a PIN confirmation
afterward and connect later. For headphones we can connect right away.
Calling pair and connect works for both.
BlueZ exposes `Paired` and `Connected` as separate states, but the
Bluetooth page currently conflates them in a few places.
As a result, devices that connect successfully without creating a
pairing bond can fail to appear as connected in COSMIC Settings.
This patch separates those two concepts in the UI/state handling:
- initialize a device as connected from `Connected`, not from
`Connected && Paired`,
- do not let `Paired` updates mutate connection state,
- treat paired or currently connected devices as "known" devices in
the main device list,
- keep `Forget` available only for actually paired devices.
## User-visible effect
This fixes cases such as the DualShock 3, where the controller is
successfully connected but does not show up as connected in the
Bluetooth settings page.
## Notes
This also matches the behavior already used in
`cosmic-applet-bluetooth`, which treats `Connected` and `Paired` as
separate states and reports a device as connected based on
`is_connected()`, not on pairing state.
A follow-up could rename the section/title to better reflect that it
now contains paired-or-connected devices rather than only paired ones.
- [x] I have disclosed use of any AI generated code in my commit
messages.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
COSMIC Setting's code is a mix of `crate::slab!` and manually creating
a Slab. Newer code seems to use the macro, so I replaced the older code
with the macro for consistency and cleanliness.