Skip to content

Commit 2b5e1d3

Browse files
committed
PantheonShell: match function order in Gala
1 parent 28f36f7 commit 2b5e1d3

1 file changed

Lines changed: 21 additions & 21 deletions

File tree

compositor/PantheonShell.vala

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,27 @@ namespace GreeterCompositor {
296296
focus (panel_surface.wayland_surface);
297297
}
298298

299+
internal static void focus_extended_behavior (Wl.Client client, Wl.Resource resource) {
300+
unowned ExtendedBehaviorSurface? extended_behavior_surface = resource.get_user_data<ExtendedBehaviorSurface> ();
301+
if (extended_behavior_surface.wayland_surface == null) {
302+
warning ("Window tried to focus but wayland surface is null.");
303+
return;
304+
}
305+
306+
focus (extended_behavior_surface.wayland_surface);
307+
}
308+
309+
internal static void focus (Object wayland_surface) {
310+
Meta.Window? window;
311+
wayland_surface.get ("window", out window, null);
312+
if (window == null) {
313+
warning ("Window tried to focus but wayland surface had no associated window.");
314+
return;
315+
}
316+
317+
window.focus (window.get_display ().get_current_time ());
318+
}
319+
299320
internal static void set_size (Wl.Client client, Wl.Resource resource, int width, int height) {
300321
unowned PanelSurface? panel_surface = resource.get_user_data<PanelSurface> ();
301322
if (panel_surface.wayland_surface == null) {
@@ -370,27 +391,6 @@ namespace GreeterCompositor {
370391
ShellClientsManager.get_instance ().init_greeter (window);
371392
}
372393

373-
internal static void focus_extended_behavior (Wl.Client client, Wl.Resource resource) {
374-
unowned ExtendedBehaviorSurface? extended_behavior_surface = resource.get_user_data<ExtendedBehaviorSurface> ();
375-
if (extended_behavior_surface.wayland_surface == null) {
376-
warning ("Window tried to focus but wayland surface is null.");
377-
return;
378-
}
379-
380-
focus (extended_behavior_surface.wayland_surface);
381-
}
382-
383-
internal static void focus (Object wayland_surface) {
384-
Meta.Window? window;
385-
wayland_surface.get ("window", out window, null);
386-
if (window == null) {
387-
warning ("Window tried to focus but wayland surface had no associated window.");
388-
return;
389-
}
390-
391-
window.focus (window.get_display ().get_current_time ());
392-
}
393-
394394
internal static void set_keep_above (Wl.Client client, Wl.Resource resource) {
395395
unowned ExtendedBehaviorSurface? eb_surface = resource.get_user_data<ExtendedBehaviorSurface> ();
396396
if (eb_surface.wayland_surface == null) {

0 commit comments

Comments
 (0)