Shell: Hook up protocol and implementation

This commit is contained in:
Leonhard 2024-05-24 13:07:25 +02:00 committed by Leonhard
parent c0f377b294
commit 74fcd4a891
5 changed files with 25 additions and 15 deletions

View File

@ -237,7 +237,25 @@ namespace Gala {
return;
}
// TODO
Meta.Side side = TOP;
switch (anchor) {
case TOP:
break;
case BOTTOM:
side = BOTTOM;
break;
case LEFT:
side = LEFT;
break;
case RIGHT:
side = RIGHT;
break;
}
ShellClientsManager.get_instance ().set_anchor (window, side);
}
internal static void focus (Wl.Client client, Wl.Resource resource) {
@ -267,7 +285,7 @@ namespace Gala {
return;
}
// TODO
ShellClientsManager.get_instance ().set_size (window, width, height);
}
internal static void set_hide_mode (Wl.Client client, Wl.Resource resource, [CCode (type = "uint32_t")] Pantheon.Desktop.HideMode hide_mode) {
@ -282,7 +300,7 @@ namespace Gala {
return;
}
// TODO
ShellClientsManager.get_instance ().set_hide_mode (window, hide_mode);
}
internal static void set_keep_above (Wl.Client client, Wl.Resource resource) {

View File

@ -13,7 +13,7 @@ public class Gala.HideTracker : Object {
public Meta.Display display { get; construct; }
public PanelWindow panel { get; construct; }
public PanelWindow.HideMode hide_mode { get; set; default = NEVER; }
public Pantheon.Desktop.HideMode hide_mode { get; set; default = NEVER; }
private bool hovered = false;

View File

@ -11,7 +11,7 @@ public class Gala.PanelClone : Object {
public WindowManager wm { get; construct; }
public PanelWindow panel { get; construct; }
public PanelWindow.HideMode hide_mode {
public Pantheon.Desktop.HideMode hide_mode {
get {
return hide_tracker.hide_mode;
}

View File

@ -6,14 +6,6 @@
*/
public class Gala.PanelWindow : Object {
public enum HideMode {
NEVER,
MAXIMIZED_FOCUS_WINDOW,
OVERLAPPING_FOCUS_WINDOW,
OVERLAPPING_WINDOW,
ALWAYS
}
private const int BARRIER_OFFSET = 50; // Allow hot corner trigger
private static HashTable<Meta.Window, Meta.Strut?> window_struts = new HashTable<Meta.Window, Meta.Strut?> (null, null);
@ -137,7 +129,7 @@ public class Gala.PanelWindow : Object {
});
}
public void set_hide_mode (HideMode hide_mode) {
public void set_hide_mode (Pantheon.Desktop.HideMode hide_mode) {
clone.hide_mode = hide_mode;
destroy_barrier ();

View File

@ -79,7 +79,7 @@ public class Gala.ShellClientsManager : Object {
windows[window].set_size (width, height);
}
public void set_hide_mode (Meta.Window window, PanelWindow.HideMode hide_mode) {
public void set_hide_mode (Meta.Window window, Pantheon.Desktop.HideMode hide_mode) {
if (!(window in windows)) {
warning ("Set anchor for window before hide mode.");
return;