88public class Gala.ShellClientsManager : Object , GestureTarget {
99 private static ShellClientsManager instance;
1010
11- public static void init (WindowManager wm , InputMethod im ) {
11+ public static void init (WindowManager wm , InputMethod im , OSKManager osk_manager ) {
1212 if (instance != null ) {
1313 return ;
1414 }
1515
16- instance = new ShellClientsManager (wm, im);
16+ instance = new ShellClientsManager (wm, im, osk_manager );
1717 }
1818
1919 public static unowned ShellClientsManager ? get_instance () {
@@ -22,6 +22,7 @@ public class Gala.ShellClientsManager : Object, GestureTarget {
2222
2323 public WindowManager wm { get ; construct; }
2424 public InputMethod im { get ; construct; }
25+ public OSKManager osk_manager { get ; construct; }
2526
2627 private NotificationsClient notifications_client;
2728 private ManagedClient [] protocol_clients = {};
@@ -31,9 +32,10 @@ public class Gala.ShellClientsManager : Object, GestureTarget {
3132 private GLib . HashTable<Meta . Window , PanelWindow > panel_windows = new GLib .HashTable<Meta . Window , PanelWindow > (null , null );
3233 private GLib . HashTable<Meta . Window , ExtendedBehaviorWindow > positioned_windows = new GLib .HashTable<Meta . Window , ExtendedBehaviorWindow > (null , null );
3334 private IBusCandidateWindow ? ibus_candidate_window = null ;
35+ private OSKWindow ? osk_window = null ;
3436
35- private ShellClientsManager (WindowManager wm , InputMethod im ) {
36- Object (wm: wm, im: im);
37+ private ShellClientsManager (WindowManager wm , InputMethod im , OSKManager osk_manager ) {
38+ Object (wm: wm, im: im, osk_manager : osk_manager );
3739 }
3840
3941 construct {
@@ -252,6 +254,12 @@ public class Gala.ShellClientsManager : Object, GestureTarget {
252254 window. unmanaged. connect_after (() = > ibus_candidate_window = null );
253255 }
254256
257+ public void make_osk_window (Meta .Window window ) requires (osk_window == null ) {
258+ osk_window = new OSKWindow (osk_manager, window);
259+
260+ window. unmanaged. connect_after (() = > osk_window = null );
261+ }
262+
255263 public void propagate (UpdateType update_type , GestureAction action , double progress ) {
256264 foreach (var window in positioned_windows. get_values ()) {
257265 window. propagate (update_type, action, progress);
0 commit comments