mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 15:32:38 +00:00
Added support for the Close button in the system window.
This commit is contained in:
parent
3626589229
commit
fd6f7dd156
@ -1,3 +1,8 @@
|
||||
2009-11-22 David Capello <davidcapello@gmail.com>
|
||||
|
||||
* src/jinete/jmanager.cpp (jmanager_generate_messages): Added
|
||||
support for the Close button in the system window.
|
||||
|
||||
2009-11-21 David Capello <davidcapello@gmail.com>
|
||||
|
||||
* src/modules/skinneable_theme.h (jtheme): Added SkinneableTheme
|
||||
|
@ -290,10 +290,6 @@ bool jmanager_generate_messages(JWidget manager)
|
||||
if (jlist_empty(manager->children))
|
||||
return false;
|
||||
|
||||
/* TODO check for STAGE */
|
||||
/* if (want_close_stage == STAGE_WANT_CLOSE) */
|
||||
/* return false; */
|
||||
|
||||
/* new windows to show? */
|
||||
if (!jlist_empty(new_windows)) {
|
||||
JWidget magnet;
|
||||
@ -469,6 +465,19 @@ bool jmanager_generate_messages(JWidget manager)
|
||||
jmanager_enqueue_message(msg);
|
||||
}
|
||||
|
||||
/* generate ESC key when the user press close button in the system window */
|
||||
if (want_close_stage == STAGE_WANT_CLOSE) {
|
||||
want_close_stage = STAGE_NORMAL;
|
||||
|
||||
msg = jmessage_new_key_related(JM_KEYPRESSED, (KEY_ESC << 8) | 27);
|
||||
broadcast_key_msg(manager, msg);
|
||||
jmanager_enqueue_message(msg);
|
||||
|
||||
msg = jmessage_new_key_related(JM_KEYRELEASED, (KEY_ESC << 8) | 27);
|
||||
broadcast_key_msg(manager, msg);
|
||||
jmanager_enqueue_message(msg);
|
||||
}
|
||||
|
||||
/* generate JM_CHAR/JM_KEYPRESSED messages */
|
||||
while (keypressed()) {
|
||||
int readkey_value = readkey();
|
||||
|
Loading…
x
Reference in New Issue
Block a user