-
Notifications
You must be signed in to change notification settings - Fork 58
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
feat: alt tab cycle #150
base: master
Are you sure you want to change the base?
feat: alt tab cycle #150
Conversation
This could definitively be improved, by supporting shit+alt+tab, and selecting the 1 index when alt+tab is pressed, but this will require more changes. And since killing cosmic-launcher make cosmic-comp freezing, i think this can be merged as is for now. Still need pop-os/launcher#225 to be merged first because cosmic-launcher depend on it. |
@wash2 So i'm looking to resolve this part
This is my idea, wrapper around tx, to make a request: Then, we add our message to a queue: The result will set The question is, will it interfere with edit: i'm not sure |
Ya, I think a queue of unprocessed messages could work well 👍 |
3883d5a
to
aa451d9
Compare
This failed to build on the build server a few weeks ago. Testing now, it's also failing to build locally. Build log:
|
Probably because of the force push in launcher. But this comment pop-os/launcher#227 (comment) still need to be addressed before merging this ig |
Ok. @Drakulix When you have time, let us know if you have any input regarding the compositor protocol side of pop-os/launcher#227. |
I am not sure where the additional events come from (probably this represents cosmic-comps internal focus stack), but the protocol as it stands doesn't guarantee any "order" of the advertised windows. Just that the state will be eventually consistent with the compositors state. |
Just fyi, I wasn't using any stack at that moment. I will try to test further to see if it's specific to some applications. So, what would be the protocol to use in this case? |
"Focus stack" internal to cosmic-comp != stacking in cosmic-comp.
I don't think we have a protocol serving this case. What this needs is probably some protocol design to expose the necessary info. |
I asked KDE on matrix and they don't use a protocol for this. I will let you guys come up with a protocol because i don't think i'm experienced enough rn. I think we have 2 options
If the option 2 is choosed, there is some usefull code is theses PRs |
@Drakulix Could the protocol Since it is a protocol special to cosmic, i thought i would ask. |
Thank you for your service |
We added a global This should be enough to allow experimentation and figure out, if this solves the issues with this PR and allows to properly track focus. |
Ok, I will work on this soon |
9bcd261
to
caaf6d4
Compare
I've updated both PRs. Running pop-os/cosmic-comp#870 broke the applist, and i don't receive any update here for some reason @Drakulix |
Hmm, that definitely should have broken older clients, I'll have to check that. But that branch itself won't fix things. You need to use v2 of the protocol and also the |
I don't understand how both protocol can be shared. pub trait ToplevelInfoHandler: Sized {
fn toplevel_info_state(&mut self) -> &mut ToplevelInfoState;
fn new_toplevel(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
toplevel: &zcosmic_toplevel_handle_v1::ZcosmicToplevelHandleV1,
);
fn update_toplevel(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
toplevel: &zcosmic_toplevel_handle_v1::ZcosmicToplevelHandleV1,
);
fn toplevel_closed(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
toplevel: &zcosmic_toplevel_handle_v1::ZcosmicToplevelHandleV1,
);
} and pub trait ForeignToplevelListHandler: Sized {
fn foreign_toplevel_list_state(&mut self) -> &mut ForeignToplevelList;
/// A new toplevel has been opened.
fn new_toplevel(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
toplevel_handle: ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1,
);
/// An existing toplevel has changed.
fn update_toplevel(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
toplevel_handle: ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1,
);
/// A toplevel has closed.
fn toplevel_closed(
&mut self,
conn: &Connection,
qh: &QueueHandle<Self>,
toplevel_handle: ext_foreign_toplevel_handle_v1::ExtForeignToplevelHandleV1,
);
fn finished(&mut self, _conn: &Connection, _qh: &QueueHandle<Self>) {}
} Do i really need to implement both ? I'm not sure how if yes |
What you are looking at are the abstractions provided by sctk and cctk, of course they are incompatible. What was needed here was for the cctk abstraction to be updated to handle both protocols in the background and use version 2. @ids1024 just added such an update: pop-os/cosmic-protocols#35
E.g. cosmic-comp might still send events that result in five |
Ok, i've updated the launcher to use pop-os/cosmic-protocols#35, and also updated cosmic-comp. The applist is still broken, and pressing alt-tab make a black screen |
Are you sure you updated the compositor? Because the app-list works fine for me with the latest commit (it definitely was broken before, just like the missing update-toplevel-events). |
Oops, probably not, i didn't know i had to update my fork branch |
Ok, i think i understand. When info_done is called, it should only have 0 or 1 active state across all top level. However, info_done is never called in my tests |
Edit: i must have done something wrong, info_done is called as it should. I've updated pop-os/launcher#227 with the necessary changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit this is on, 88ebb79, is not building. Tried on the build server and locally.
I get this error when trying to build locally (looks like a potential issue with the justfile changes):
Compiling iced_widget v0.12.0 (https://github.com/pop-os/libcosmic/#57256e53)
Compiling iced v0.12.0 (https://github.com/pop-os/libcosmic/#57256e53)
Compiling libcosmic v0.1.0 (https://github.com/pop-os/libcosmic/#57256e53)
warning: unexpected `cfg` condition value: `a11y`
--> src/components/list.rs:289:11
|
289 | #[cfg(feature = "a11y")]
| ^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `console`, `default`, and `wgpu`
= help: consider adding `a11y` as a feature in `Cargo.toml`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
warning: `cosmic-launcher` (bin "cosmic-launcher") generated 1 warning
Finished `release` profile [optimized] target(s) in 1m 22s
make[1]: Leaving directory '/home/jacob/Work/cosmic-launcher'
create-stamp debian/debhelper-build-stamp
fakeroot debian/rules binary
dh binary
dh_testroot
dh_prep
dh_auto_install --destdir=debian/cosmic-launcher/
debian/rules override_dh_install
make[1]: Entering directory '/home/jacob/Work/cosmic-launcher'
just rootdir=debian/cosmic-launcher install
install -Dm0755 target/target/release/cosmic-launcher /home/jacob/Work/cosmic-launcher/debian/cosmic-launcher/usr/bin/cosmic-launcher
install: cannot stat 'target/target/release/cosmic-launcher': No such file or directory
error: Recipe `install` failed on line 70 with exit code 1
make[1]: *** [debian/rules:31: override_dh_install] Error 1
make[1]: Leaving directory '/home/jacob/Work/cosmic-launcher'
make: *** [debian/rules:8: binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2
@@ -44,3 +49,7 @@ switcheroo-control = { git = "https://github.com/pop-os/dbus-settings-bindings" | |||
zbus = { version = "4.2.1", default-features = false, features = ["tokio"] } | |||
unicode-truncate = "1.0.0" | |||
unicode-width = "0.1.11" | |||
|
|||
[patch."https://github.com/pop-os/launcher/"] | |||
pop-launcher = { git = "https://github.com/wiiznokes/launcher/", rev = "86a54d54a68b832d404ef83a03af84cf9ef3e694" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming we won't want to merge this reference to a fork into master.
If pop-os/launcher#227 doesn't cause any regressions for the pop-shell frontend on 22.04, then I can regression test that one and we can get it merged first, if that would help? (It'd be nice to be able to test that it works properly, and I can also still do that if we get this PR to build.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will look into it. I must say I ran into this problem, but the problem it's just the target/target (should be one target), so it's easy to work around it.
If you want to test the other pr, you must also install this one for it to work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be fixed. We probably want to merge
impl #135.
Related to this pr pop-os/launcher#227. Need to be merged at the same time. (actually, the pr in pop-launcher need to be merged first)