Ubuntu Pastebin

Paste from slvn_ at Mon, 23 Nov 2015 17:46:09 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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("... forcing to ON");
205         state = mir_surface_state_fullscreen;
206     }
207     
208     spec = MIR_mir_connection_create_spec_for_changes(mir_data->connection);
209     MIR_mir_surface_spec_set_state(spec, state);
210     
211     {
212 
213         SDL_Log("... done");
214         MIR_mir_wait_for(MIR_mir_surface_set_state(mir_window->surface,state));
215         SDL_Log("... wait done");
216     }
217     
218     
219     MIR_mir_surface_apply_spec(mir_window->surface, spec);
220     MIR_mir_surface_spec_release(spec);
221  
222     {
223 
224         SDL_Log("... done");
225         MIR_mir_wait_for(MIR_mir_surface_set_state(mir_window->surface,state));
226         SDL_Log("... wait done");
227     }
228     
229 
230 }
Download as text