Skip to content
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

Implement Alt+F4 on non-Windows desktops #51

Closed
fdelapena opened this issue Oct 14, 2012 · 2 comments
Closed

Implement Alt+F4 on non-Windows desktops #51

fdelapena opened this issue Oct 14, 2012 · 2 comments
Assignees
Labels
UX For issues affecting the user experience, such annoyances, counter-intuitive or ugly design

Comments

@fdelapena
Copy link
Contributor

To proper emulate this key combination behavior used by RPG_RT even in fullscreen mode.

@ghost ghost assigned fdelapena Oct 15, 2012
@fdelapena
Copy link
Contributor Author

Removing _WIN32 ifdef works fine on GNU/Linux desktop.
Are these keysims getting issues on specific ports to have this ifdef'd?

diff --git a/src/sdl_ui.cpp b/src/sdl_ui.cpp
index 86c9244..1f04da2 100644
--- a/src/sdl_ui.cpp
+++ b/src/sdl_ui.cpp
@@ -624,13 +624,13 @@ void SdlUi::ProcessKeyDownEvent(SDL_Event &evnt) {
 #if defined(USE_KEYBOARD) && defined(SUPPORT_KEYBOARD)
        switch (evnt.key.keysym.sym) {
        case SDLK_F4:
-#ifdef _WIN32
                // Close program on LeftAlt+F4
                if (evnt.key.keysym.mod & KMOD_LALT) {
                        Player::exit_flag = true;
                        return;
                }
-#endif

                // Toggle fullscreen on F4 and no alt is pressed
                if (!(evnt.key.keysym.mod & KMOD_RALT) && !(evnt.key.keysym.mod & KMOD_LALT)) {

@Ghabry
Copy link
Member

Ghabry commented Jan 27, 2013

Possible that it was fixed by some window manager update in the last two years which resolved this issue for us ;)

Ghabry pushed a commit that referenced this issue Mar 1, 2013
Implement Alt+F4 on non-Windows desktops (closes #51)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX For issues affecting the user experience, such annoyances, counter-intuitive or ugly design
Development

No branches or pull requests

2 participants