コード例 #1
0
ファイル: X11Event.cs プロジェクト: kobbst/X11_Xlib
        public TBoolean   same_screen; /* same screen flag */

        /// <summary>Provide a deep copy.</summary>
        /// <returns>A deep copy.<see cref="XButtonEvent"/></returns>
        public XButtonEvent Copy()
        {
            XButtonEvent e = new XButtonEvent();

            e.type        = this.type;
            e.serial      = this.serial;
            e.send_event  = this.send_event;
            e.display     = this.display;
            e.window      = this.window;
            e.root        = this.root;
            e.subwindow   = this.subwindow;
            e.time        = this.time;
            e.x           = this.x;
            e.y           = this.y;
            e.x_root      = this.x_root;
            e.y_root      = this.y_root;
            e.state       = this.state;
            e.button      = this.button;
            e.same_screen = this.same_screen;

            return(e);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: bjaminn/cswm
        private void OnButtonPressEvent(X11.XButtonEvent ev)
        {
            var client = ev.window;

            if (WindowIndexByClient.ContainsKey(ev.window) && ev.button == (uint)Button.LEFT)
            {
                LeftClickClientWindow(ev);
            }

            else if (WindowIndexByTitle.ContainsKey(ev.window) && ev.button == (uint)Button.LEFT)
            {
                LeftClickTitleBar(ev);
                client = WindowIndexByTitle[ev.window].child;
            }

            else if (WindowIndexByFrame.ContainsKey(ev.window) && ev.button == (uint)Button.LEFT)
            {
                LeftClickFrame(ev);
                client = WindowIndexByFrame[ev.window].child;
            }
            FocusAndRaiseWindow(client);
        }