184 void
185 MIR_SetWindowFullscreen(_THIS, SDL_Window* window,
186 SDL_VideoDisplay* display,
187 SDL_bool fullscreen)
188 {
189 MIR_Data* mir_data = _this->driverdata;
190 MIR_Window* mir_window = window->driverdata;
191 MirSurfaceSpec* spec;
192 MirSurfaceState state;
193
194 if (IsSurfaceValid(mir_window) < 0)
195 return;
196
197 if (fullscreen) {
198 SDL_Log("slvn MIR_SetWindowFullscreen ON");
199 state = mir_surface_state_fullscreen;
200 } else {
201 SDL_Log("slvn MIR_SetWindowFullscreen OFF");
202 state = mir_surface_state_restored;
203
204 SDL_Log("slvn Force to ON");
205 state = mir_surface_state_fullscreen;
206
207
208 }
209
210 spec = MIR_mir_connection_create_spec_for_changes(mir_data->connection);
211 SDL_Log("Before SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... %d", (MIR_mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen));
212 MIR_mir_surface_spec_set_state(spec, state);
213 MIR_mir_surface_apply_spec(mir_window->surface, spec);
214 MIR_mir_surface_spec_release(spec);
215 SDL_Log("After SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... %d", (MIR_mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen));
216 SDL_Delay(100);
217 SDL_Log("After delay SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... %d", (MIR_mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen));
218
219 /*
220 SDL_Log("Before NO_SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... %d", (MIR_mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen));
221 {
222 SDL_Log("Apply to surface without wait for");
223 MIR_mir_wait_for(MIR_mir_surface_set_state(mir_window->surface,state));
224 }
225 SDL_Log("After NO_SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... %d", (MIR_mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen));
226 */
227
228 }
shm_open() failed: Permission denied
INFO: slvn MIR_SetWindowFullscreen OFF
INFO: slvn Force to ON
INFO: Before SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: After SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: After delay SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: slvn MIR_SetWindowFullscreen ON
INFO: Before SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: After SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: After delay SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: slvn MIR_SetWindowFullscreen OFF
INFO: slvn Force to ON
INFO: Before SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: After SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: After delay SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: slvn MIR_SetWindowFullscreen OFF
INFO: slvn Force to ON
INFO: Before SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: After SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: After delay SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: slvn MIR_SetWindowFullscreen ON
INFO: Before SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: After SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
INFO: After delay SPEC mir_surface_get_state(mir_window->surface) == mir_surface_state_fullscreen is ... 0
shm_open() failed: Permission denied