Comments (8)
A close button is a better solution.
- Loosing focus by mistake is too easy - in which case you also risk looking the URL/path if it came from a ephemeral source
- Junction may also loose focus because you want to check something first by alt-tabbing.
- Or something unexpectedly grabs the focus.
from junction.
I have been thinking of making Junction keeping the history of requested locations, in which case I would be open to this being default since closing by accident could be recovered.
I had a look how to do this out of curiosity and unless I'm missing something, it is rather tricky
window.connect("notify::is-active", () => {
if (window.is_active) {
window.close();
}
});
On GNOME Shell / wayland ; the window closes when
- moving it
- when opening the application menu
- when opening the window menu (right click on header bar)
- when opening the entry menu (right click on the resource location)
there is also no way to skip the task bar on GTK4 or Wayland so AFAIK Junction will never really feel like a modal.
There are probably ways to workaround these but unless we want close on blur as standard behavior I don't think it's worth it.
from junction.
The problem with a close button is that it still requires action from the user. Since the app opens on the middle of the screen, that would make it harder to close than hitting escape, negating the usefulness of it.
I would still argue that having the option to close of focus lost would be good to have, even if it would be an opt-in option, instead of being the default. Maybe with an on-window option to keep it open on a per-window basis, if losing an ephemeral sourced URL is a concern.
from junction.
Loosing focus also requires an action from the user right?
I concede that it's slightly harder to press the close button but
- it's familiar and unsurprising
- if Junction popups it's likely in response to user action so dismissing Junction is less of a concern
Do you have a special use case for this feature that I may not be thinking of?
from junction.
I guess this comes out more from how i use the application - for myself, this works as a browser selector per link that i click.
Hence i expect it to act more like a pop-up, than a full-fledged application - meaning that if focus is lost to it, it goes away. That's the expectation i have based on my use-case.
I recognize that i am not everyone, hence was considering whether adding the option to do so, even if not enabled by default would bring value to the app.
from junction.
Ok, I also use it the same way but don't feel the need for this.
Anyway, feel free to send a PR, should be quite simple
You want to do something like (pseudo code ahead)
in window.js
when window
object looses focus, call action win.close
(or directly method window.close
)
Once you have that - you can put it behind a setting by using https://docs.gtk.org/gio/class.Settings.html
We don't have a preferences window yet and I'm not sure I want this to have UI anyway but users can use dconf or gsettings CLI to set/unset this
Happy to help
from junction.
see https://github.com/sonnyp/Junction#development
from junction.
sad.
I think it would be the most intuitive option since e.g. the android dialogues behave the same.
It is definetly a flaw of gtk4 (or wayland) that such a usecase is not thought of.
So there should be comunicated somehow i guess...
from junction.
Related Issues (20)
- Use system title-bar. HOT 1
- Vertical list (rather than current horizontal). HOT 2
- Feature Request: Keyboard Shortcuts for Desktop Actions HOT 2
- Build failure HOT 7
- Junction doesn't remember it's previous window size HOT 4
- Junction switched to alphabetical listing no longer ordered by most recently used
- Feature Request: Reorder List and Change Icon size
- Feature request: Close main windows if clicked outside HOT 1
- Feature request: Allow Chrome/Brave shortcuts as browsers HOT 1
- Please tag releases for packagers? HOT 5
- "Info: runtime org.gtk.Gtk3theme.Breeze-Dark branch 3.22 is end-of-life" HOT 1
- Weblate sync
- Mangles spotify login link HOT 1
- Crash on startup HOT 3
- [Feature] Add proxy default browser option HOT 2
- Applications installed through Nix (and home-manager) are not showing up HOT 2
- After application is selected with mouse, whatever was behind Junction's GUI is also clicked HOT 1
- Weblate project being locked due to conflicts HOT 1
- [Feature] Pin favorite apps HOT 1
- [Feature] X out URL option, Don't open
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from junction.