mirror of
https://github.com/elementary/gala.git
synced 2024-11-27 15:45:31 +03:00
PantheonShell: Add more warnings (#1929)
This commit is contained in:
parent
8e361c31c2
commit
3a40014d6a
@ -228,12 +228,14 @@ namespace Gala {
|
||||
internal static void set_anchor (Wl.Client client, Wl.Resource resource, [CCode (type = "uint32_t")] Pantheon.Desktop.Anchor anchor) {
|
||||
unowned PanelSurface? panel_surface = resource.get_user_data<PanelSurface> ();
|
||||
if (panel_surface.wayland_surface == null) {
|
||||
warning ("Window tried to set anchor but wayland surface is null.");
|
||||
return;
|
||||
}
|
||||
|
||||
Meta.Window? window;
|
||||
panel_surface.wayland_surface.get ("window", out window, null);
|
||||
if (window == null) {
|
||||
warning ("Window tried to set anchor but wayland surface had no associated window.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -261,12 +263,14 @@ namespace Gala {
|
||||
internal static void focus (Wl.Client client, Wl.Resource resource) {
|
||||
unowned PanelSurface? panel_surface = resource.get_user_data<PanelSurface> ();
|
||||
if (panel_surface.wayland_surface == null) {
|
||||
warning ("Window tried to focus but wayland surface is null.");
|
||||
return;
|
||||
}
|
||||
|
||||
Meta.Window? window;
|
||||
panel_surface.wayland_surface.get ("window", out window, null);
|
||||
if (window == null) {
|
||||
warning ("Window tried to focus but wayland surface had no associated window.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -276,12 +280,14 @@ namespace Gala {
|
||||
internal static void set_size (Wl.Client client, Wl.Resource resource, int width, int height) {
|
||||
unowned PanelSurface? panel_surface = resource.get_user_data<PanelSurface> ();
|
||||
if (panel_surface.wayland_surface == null) {
|
||||
warning ("Window tried to set size but wayland surface is null.");
|
||||
return;
|
||||
}
|
||||
|
||||
Meta.Window? window;
|
||||
panel_surface.wayland_surface.get ("window", out window, null);
|
||||
if (window == null) {
|
||||
warning ("Window tried to set size but wayland surface had no associated window.");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -291,12 +297,14 @@ namespace Gala {
|
||||
internal static void set_hide_mode (Wl.Client client, Wl.Resource resource, [CCode (type = "uint32_t")] Pantheon.Desktop.HideMode hide_mode) {
|
||||
unowned PanelSurface? panel_surface = resource.get_user_data<PanelSurface> ();
|
||||
if (panel_surface.wayland_surface == null) {
|
||||
warning ("Window tried to set hide mode but wayland surface is null.");
|
||||
return;
|
||||
}
|
||||
|
||||
Meta.Window? window;
|
||||
panel_surface.wayland_surface.get ("window", out window, null);
|
||||
if (window == null) {
|
||||
warning ("Window tried to set hide mode but wayland surface had no associated window.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user