88public class Gala.ShellClientsManager : Object , GestureTarget {
99 private static ShellClientsManager instance;
1010
11- public static void init (WindowManager wm ) {
11+ public static void init (WindowManager wm , InputMethod im ) {
1212 if (instance != null ) {
1313 return ;
1414 }
1515
16- instance = new ShellClientsManager (wm);
16+ instance = new ShellClientsManager (wm, im );
1717 }
1818
1919 public static unowned ShellClientsManager ? get_instance () {
2020 return instance;
2121 }
2222
2323 public WindowManager wm { get ; construct; }
24+ public InputMethod im { get ; construct; }
2425
2526 private NotificationsClient notifications_client;
2627 private ManagedClient [] protocol_clients = {};
@@ -29,9 +30,10 @@ public class Gala.ShellClientsManager : Object, GestureTarget {
2930
3031 private GLib . HashTable<Meta . Window , PanelWindow > panel_windows = new GLib .HashTable<Meta . Window , PanelWindow > (null , null );
3132 private GLib . HashTable<Meta . Window , ExtendedBehaviorWindow > positioned_windows = new GLib .HashTable<Meta . Window , ExtendedBehaviorWindow > (null , null );
33+ private IBusCandidateWindow ? ibus_candidate_window = null ;
3234
33- private ShellClientsManager (WindowManager wm ) {
34- Object (wm: wm);
35+ private ShellClientsManager (WindowManager wm , InputMethod im ) {
36+ Object (wm: wm, im : im );
3537 }
3638
3739 construct {
@@ -244,6 +246,12 @@ public class Gala.ShellClientsManager : Object, GestureTarget {
244246 positioned_windows[window]. make_modal (dim);
245247 }
246248
249+ public void make_ibus_candidate_window (Meta .Window window ) requires (ibus_candidate_window == null ) {
250+ ibus_candidate_window = new IBusCandidateWindow (im, window);
251+
252+ window. unmanaged. connect_after (() = > ibus_candidate_window = null );
253+ }
254+
247255 public void propagate (UpdateType update_type , GestureAction action , double progress ) {
248256 foreach (var window in positioned_windows. get_values ()) {
249257 window. propagate (update_type, action, progress);
@@ -258,7 +266,8 @@ public class Gala.ShellClientsManager : Object, GestureTarget {
258266 return (
259267 (window in positioned_windows && positioned_windows[window]. modal) ||
260268 (window in panel_windows) ||
261- NotificationStack . is_notification (window)
269+ NotificationStack . is_notification (window) ||
270+ window == ibus_candidate_window? . window
262271 );
263272 }
264273
0 commit comments