Skip to content

Commit

Permalink
Fix mutter 45 build (#2039)
Browse files Browse the repository at this point in the history
  • Loading branch information
lenemter authored Aug 21, 2024
1 parent 350e586 commit 489de02
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/DaemonManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ public class Gala.DaemonManager : GLib.Object {
break;

case "MODAL":
#if HAS_MUTTER46
daemon_client.make_dock (window);
#endif
window.move_frame (false, 0, 0);
window.make_above ();
break;
Expand Down
2 changes: 1 addition & 1 deletion src/ShellClients/PanelWindow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class Gala.PanelWindow : Object {
workspace_manager.workspace_removed.connect (update_strut);
}

#if HAS_MUTTER46
#if HAS_MUTTER45
public Mtk.Rectangle get_custom_window_rect () {
#else
public Meta.Rectangle get_custom_window_rect () {
Expand Down
2 changes: 2 additions & 0 deletions src/ShellClients/ShellClientsManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ public class Gala.ShellClientsManager : Object {
private void make_dock_wayland (Meta.Window window) requires (Meta.Util.is_wayland_compositor ()) {
foreach (var client in protocol_clients) {
if (client.wayland_client.owns_window (window)) {
#if HAS_MUTTER46
client.wayland_client.make_dock (window);
#endif
break;
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/WindowManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,10 @@ namespace Gala {
op,
event.get_device (),
event.get_event_sequence (),
event.get_time (),
null
event.get_time ()
#if HAS_MUTTER46
, null
#endif
);
} else if (event.get_type () == LEAVE) {
/* We get leave emitted when beginning a grab op, so we have
Expand Down
8 changes: 7 additions & 1 deletion vapi/libmutter.vapi
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,11 @@ namespace Meta {
[CCode (cheader_filename = "meta/meta-selection-source-memory.h", type_id = "meta_selection_source_memory_get_type ()")]
public sealed class SelectionSourceMemory : Meta.SelectionSource {
[CCode (has_construct_function = false, type = "MetaSelectionSource*")]
#if HAS_MUTTER46
public SelectionSourceMemory (string mimetype, GLib.Bytes content) throws GLib.Error;
#else
public SelectionSourceMemory (string mimetype, GLib.Bytes content);
#endif
}
[CCode (cheader_filename = "meta/meta-settings.h", has_type_id = false)]
[Compact]
Expand Down Expand Up @@ -917,8 +921,10 @@ namespace Meta {
public WaylandClient (GLib.SubprocessLauncher launcher) throws GLib.Error;
#endif
public void hide_from_window_list (Meta.Window window);
#if HAS_MUTTER46
#if HAS_MUTTER45
public void make_desktop (Meta.Window window);
#endif
#if HAS_MUTTER46
public void make_dock (Meta.Window window);
#endif
public bool owns_window (Meta.Window window);
Expand Down

0 comments on commit 489de02

Please sign in to comment.