diff mbox

[2/2] SDL2: dont try show window if it was hidden by DE/WM.

Message ID 1471984640.899954839@f422.i.mail.ru
State New
Headers show

Commit Message

Andrei Karas Aug. 23, 2016, 8:37 p.m. UTC
Signed-off-by: Andrei Karas <akaras@inbox.ru>
---
 ui/sdl2.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Gerd Hoffmann Sept. 7, 2016, 11:29 a.m. UTC | #1
On Di, 2016-08-23 at 23:37 +0300, Andrei Karas wrote:
> Signed-off-by: Andrei Karas <akaras@inbox.ru>
> ---
>  ui/sdl2.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/ui/sdl2.c b/ui/sdl2.c
> index 4441e99..9523f64 100644
> --- a/ui/sdl2.c
> +++ b/ui/sdl2.c
> @@ -584,9 +584,6 @@ static void handle_windowevent(SDL_Event *ev)
>          }
>          break;
>      case SDL_WINDOWEVENT_HIDDEN:
> -        if (!scon->hidden) {
> -            SDL_ShowWindow(scon->real_window);
> -        }

Ok, but we should update scon->hidden with the new state then I guess?
And probably also in case the DE/WM shows the window again?

cheers,
  Gerd
Andrei Karas Sept. 7, 2016, 12:43 p.m. UTC | #2
>Среда,  7 сентября 2016, 14:29 +03:00 от Gerd Hoffmann <kraxel@redhat.com>:
>
>On Di, 2016-08-23 at 23:37 +0300, Andrei Karas wrote:
>> Signed-off-by: Andrei Karas < akaras@inbox.ru >
>> ---
>>  ui/sdl2.c | 3 ---
>>  1 file changed, 3 deletions(-)
>> 
>> diff --git a/ui/sdl2.c b/ui/sdl2.c
>> index 4441e99..9523f64 100644
>> --- a/ui/sdl2.c
>> +++ b/ui/sdl2.c
>> @@ -584,9 +584,6 @@ static void handle_windowevent(SDL_Event *ev)
>>          }
>>          break;
>>      case SDL_WINDOWEVENT_HIDDEN:
>> -        if (!scon->hidden) {
>> -            SDL_ShowWindow(scon->real_window);
>> -        }
>
>Ok, but we should update scon->hidden with the new state then I guess?
>And probably also in case the DE/WM shows the window again?
Issue what i solved here is. On hide event from DE/WM old code try to show window.
This is mistake.
I will try to update scon->hidden on show/hide WM event.
diff mbox

Patch

diff --git a/ui/sdl2.c b/ui/sdl2.c
index 4441e99..9523f64 100644
--- a/ui/sdl2.c
+++ b/ui/sdl2.c
@@ -584,9 +584,6 @@  static void handle_windowevent(SDL_Event *ev)
         }
         break;
     case SDL_WINDOWEVENT_HIDDEN:
-        if (!scon->hidden) {
-            SDL_ShowWindow(scon->real_window);
-        }
         break;
     }
 }