~eliasnaur/gio#58:
Way to close a window programmatically

Is there a way to close a window programmatically, for example in response to a user clicking a button or entering a key combination?

Status
REPORTED
Submitter
Alessandro Arzilli
Assigned to
No-one
Submitted
12 days ago
Updated
11 days ago
Labels
No labels applied.

~eliasnaur 11 days ago

On Tue Nov 5, 2019 at 1:18 PM Alessandro Arzilli wrote:

Is there a way to close a window programmatically, for example in response to a user clicking a button or entering a key combination?

Not yet, other than operating system defined close window shortcuts. May I ask what you need it for? I can imagine a are you sure you want to quit-style dialogs, but then you also need a way to detect (and cancel) close events.

~theclapp 11 days ago

Gio currently supports only a single top-level window, so exiting the program will close the window. There may be a better way.

Alessandro Arzilli 11 days ago

On Wed, Nov 06, 2019 at 12:32:30PM -0000, ~eliasnaur wrote:

On Tue Nov 5, 2019 at 1:18 PM Alessandro Arzilli wrote:

Is there a way to close a window programmatically, for example in response to a user clicking a button or entering a key combination?

Not yet, other than operating system defined close window shortcuts. May I ask what you need it for?

Gdlv has a 'quit' command, entered through the command line.

I can imagine a are you sure you want to quit-style dialogs, but then you also need a way to detect (and

cancel) close events.

That could also be useful (but it would be a different thing).

View on the web: https://todo.sr.ht/~eliasnaur/gio/58#comment-4581

~eliasnaur 11 days ago

On Wed Nov 6, 2019 at 2:13 PM Alessandro Arzilli wrote:

May I ask what you need it for?

Gdlv has a 'quit' command, entered through the command line.

I see. Would os.Exit work for you for now?

Alessandro Arzilli 11 days ago

I can definitely find workarounds for this, it just seems like a thing that should exist.

On Wed, Nov 06, 2019 at 02:15:30PM -0000, ~eliasnaur wrote:

On Wed Nov 6, 2019 at 2:13 PM Alessandro Arzilli wrote:

May I ask

what you need it for?

Gdlv has a 'quit' command,

entered through the command line.

I see. Would os.Exit work for you for now?

View on the web: https://todo.sr.ht/~eliasnaur/gio/58#comment-4585

Register here or Log in to comment, or comment via email.