示例#1
0
        private void WinOpenedMethod(object win, WindowOpenedArgs args)
        {
            if (!this.Connected)
            {
                return;
            }
            Window window = args.Window;

            if (!windowlist.ContainsKey(window))
            {
                String iconpath = String.Format("/tmp/{0}.png", window.Application.Pid);
                window.Icon.Save(iconpath, "png");
                WindowItem item = new WindowItem(window, iconpath);
                windowlist [window] = item;

                RaiseItemsAvailable(new ItemsAvailableEventArgs()
                {
                    newItems = new WindowItem[] { item }
                });
                Log.Debug("add window", window.Name);
            }
            else
            {
                Log.Debug("this window {0} already existed", window.Name);
            }
        }
示例#2
0
        void WnckScreenDefaultWindowOpened(object o, WindowOpenedArgs args)
        {
            if (args.Window.IsSkipTasklist)
            {
                return;
            }

            longMatchInProgress = !DockServices.WindowMatcher.WindowIsReadyForMatch(args.Window);

            // ensure we run last (more or less) so that all icons can update first
            GLib.Timeout.Add(150, delegate {
                if (DockServices.WindowMatcher.WindowIsReadyForMatch(args.Window))
                {
                    longMatchInProgress = false;
                    UpdateTransientItems();
                }
                else
                {
                    // handle applications which set their proper (matchable) window title very late,
                    // their windows will be monitored for name changes (give up after 5 seconds)
                    uint matching_timeout = 5000;
                    // wait for OpenOffice/LibreOffice up to 1min to startup before giving up
                    if (DockServices.WindowMatcher.WindowIsOpenOffice(args.Window) ||
                        DockServices.WindowMatcher.WindowIsLibreOffice(args.Window))
                    {
                        matching_timeout = 60000;
                    }
                    args.Window.NameChanged += HandleUnmatchedWindowNameChanged;
                    GLib.Timeout.Add(matching_timeout, delegate {
                        if (!DockServices.WindowMatcher.WindowIsReadyForMatch(args.Window))
                        {
                            args.Window.NameChanged -= HandleUnmatchedWindowNameChanged;
                            longMatchInProgress      = false;
                            UpdateTransientItems();
                        }
                        return(false);
                    });
                }
                return(false);
            });
        }
示例#3
0
 void WnckScreenDefaultWindowOpened(object o, WindowOpenedArgs args)
 {
     UpdateWindows(base_window);
     SetNameAndIcon();
 }
		void WnckScreenDefaultWindowOpened (object o, WindowOpenedArgs args)
		{
			SetupWindow (args.Window);
		}
示例#5
0
 void HandleWindowOpened(object sender, WindowOpenedArgs args)
 {
     UpdateWindowIntersect();
 }
		void WnckScreenDefaultWindowOpened (object o, WindowOpenedArgs args)
		{
			if (args.Window.IsSkipTasklist)
				return;
			
			longMatchInProgress = !DockServices.WindowMatcher.WindowIsReadyForMatch (args.Window);
			
			// ensure we run last (more or less) so that all icons can update first
			GLib.Timeout.Add (150, delegate {
				if (DockServices.WindowMatcher.WindowIsReadyForMatch (args.Window)) {
					longMatchInProgress = false;
					UpdateTransientItems ();
				} else {
					// handle applications which set their proper (matchable) window title very late,
					// their windows will be monitored for name changes (give up after 5 seconds)
					uint matching_timeout = 5000;
					// wait for OpenOffice/LibreOffice up to 1min to startup before giving up
					if (DockServices.WindowMatcher.WindowIsOpenOffice (args.Window)
					    || DockServices.WindowMatcher.WindowIsLibreOffice (args.Window))
						matching_timeout = 60000;
					args.Window.NameChanged += HandleUnmatchedWindowNameChanged;
					GLib.Timeout.Add (matching_timeout, delegate {
						if (!DockServices.WindowMatcher.WindowIsReadyForMatch (args.Window)) {
							args.Window.NameChanged -= HandleUnmatchedWindowNameChanged;
							longMatchInProgress = false;
							UpdateTransientItems ();
						}
						return false;
					});
				}
				return false;
			});
		}
示例#7
0
 void WnckScreenDefaultWindowOpened(object o, WindowOpenedArgs args)
 {
     UpdateWindows();
 }
示例#8
0
 void WnckScreenDefaultWindowOpened(object o, WindowOpenedArgs args)
 {
     SetupWindow(args.Window);
 }
示例#9
0
		void HandleWindowOpened (object o, WindowOpenedArgs args)
		{
			UpdateScreenRegions ();
			AnimatedDraw ();
		}
示例#10
0
		void WnckScreenDefaultWindowOpened (object o, WindowOpenedArgs args)
		{
			UpdateWindows (base_window);
			SetNameAndIcon ();
		}
示例#11
0
		void HandleWindowOpened (object sender, WindowOpenedArgs args)
		{
			UpdateWindowIntersect ();
		}
		void WnckScreenDefaultWindowOpened (object o, WindowOpenedArgs args)
		{
			UpdateWindows ();
		}