Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
eclipse
eclipse
Commits
bcdae264
Commit
bcdae264
authored
Nov 19, 2003
by
Iban Hatchondo
Browse files
More hacking.
change get-screen-content for screen-content. Some keyword parameter added.
parent
8cbc2b22
Changes
5
Hide whitespace changes
Inline
Side-by-side
gestures.lisp
View file @
bcdae264
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
;;; $Id: gestures.lisp,v 1.
9
2003/1
0/06 17:57
:2
6
ihatchondo Exp $
;;; $Id: gestures.lisp,v 1.
10
2003/1
1/13 11:12
:2
8
ihatchondo Exp $
;;;
;;; ECLIPSE. The Common Lisp Window Manager.
;;; Copyright (C) 2002 Iban HATCHONDO
...
...
@@ -343,7 +343,7 @@
(
unless
*current-widget-info*
(
setf
*current-widget-info*
(
create-message-box
nil
:parent
root-window
)))
(
let
((
i
(
current-vscreen
root-window
)))
(
setf
*windows*
(
reverse
(
get-
screen-content
i
:iconify-p
*cycle-icons-p*
))
(
setf
*windows*
(
reverse
(
screen-content
i
:iconify-p
*cycle-icons-p*
))
*depth*
0
)))
(
defun
circulate-window-modifier-callback
(
event
)
...
...
misc.lisp
View file @
bcdae264
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
;;; $Id: misc.lisp,v 1.1
2
2003/1
0/06 17:57
:2
6
ihatchondo Exp $
;;; $Id: misc.lisp,v 1.1
3
2003/1
1/13 11:12
:2
8
ihatchondo Exp $
;;;
;;; This file is part of Eclipse.
;;; Copyright (C) 2002 Iban HATCHONDO
...
...
@@ -152,7 +152,7 @@
virtual screen that the given `window' argument belongs to. The given
window will be filtered."
(
loop
with
n
=
(
if
(
eql
i
+any-desktop+
)
(
current-desk
)
i
)
for
w
in
(
get-
screen-content
n
)
for
w
in
(
screen-content
n
)
for
nwm-state
=
(
netwm:net-wm-state
w
)
unless
(
xlib:window-equal
w
window
)
if
(
member
:_net_wm_state_above
nwm-state
)
collect
w
into
aboves
...
...
move-resize.lisp
View file @
bcdae264
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
;;; $Id: move-resize.lisp,v 1.
7
2003/10/09 1
1:36:1
8 ihatchondo Exp $
;;; $Id: move-resize.lisp,v 1.
8
2003/10/09 1
5:04:0
8 ihatchondo Exp $
;;;
;;; ECLIPSE. The Common Lisp Window Manager.
;;; Copyright (C) 2000, 2001, 2002 Iban HATCHONDO
...
...
@@ -366,7 +366,7 @@
(
with-slots
(
window
active-p
)
widget
(
setf
(
window-priority
window
)
:above
)
(
setf
active-p
t
*screen-windows*
(
get-
screen-content
(
current-desk
))
*screen-windows*
(
screen-content
(
current-desk
))
*delta-x*
(
-
(
event-root-x
event
)
(
xlib:drawable-x
window
))
*delta-y*
(
-
(
event-root-y
event
)
(
xlib:drawable-y
window
)))))
...
...
virtual-screen.lisp
View file @
bcdae264
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
;;; $Id: virtual-screen.lisp,v 1.1
0
2003/1
0/09 11:39:41
ihatchondo Exp $
;;; $Id: virtual-screen.lisp,v 1.1
1
2003/1
1/13 11:12:28
ihatchondo Exp $
;;;
;;;Copyright (C) 2002 Iban HATCHONDO
;;; contact : hatchond@yahoo.fr
...
...
@@ -23,17 +23,23 @@
;;;; Private
(
defun
window-belongs-to-vscreen-p
(
win
scr-num
iconify-p
)
(
defun
window-belongs-to-vscreen-p
(
win
scr-num
iconify-p
skip-taskbar
skip-desktop
skip-dock
)
(
when
(
lookup-widget
win
)
(
let
((
n
(
or
(
window-desktop-num
win
)
-1
))
(
wm-state
(
car
(
wm-state
win
)))
(
netwm-type
(
netwm:net-wm-window-type
win
)))
(
netwm-type
(
netwm:net-wm-window-type
win
))
(
netwm-state
(
netwm:net-wm-state
win
)))
(
and
(
or
(
=
n
scr-num
)
(
=
n
+any-desktop+
))
(
or
(
eq
wm-state
1
)
(
and
iconify-p
(
eq
wm-state
3
)))
(
not
(
member
:win_hints_skip_taskbar
(
gnome:win-hints
win
)))
(
not
(
member
:_net_wm_state_skip_taskbar
(
netwm:net-wm-state
win
)))
(
not
(
member
:_net_wm_window_type_desktop
netwm-type
))
(
not
(
member
:_net_wm_window_type_dock
netwm-type
))))))
(
not
(
and
skip-taskbar
(
member
:_net_wm_state_skip_taskbar
netwm-state
)))
(
not
(
and
skip-taskbar
(
member
:win_hints_skip_taskbar
(
gnome:win-hints
win
))))
(
not
(
and
skip-desktop
(
member
:_net_wm_window_type_desktop
netwm-type
)))
(
not
(
and
skip-dock
(
member
:_net_wm_window_type_dock
netwm-type
)))))))
(
defun
map-or-unmap-vscreen
(
fun
scr-num
)
(
loop
for
widget
being
each
hash-value
in
*widget-table*
...
...
@@ -109,16 +115,28 @@
(
or
(
nth
new
(
workspace-names
window
))
(
format
nil
"WORKSPACE ~D"
new
))))))))
(
defun
get-screen-content
(
scr-num
&key
iconify-p
)
(
defun
screen-content
(
scr-num
&key
(
predicate
#'
window-belongs-to-vscreen-p
)
iconify-p
(
skip-taskbar
t
)
(
skip-desktop
t
)
(
skip-dock
t
))
"Returns the list of application's windows that represent the contents
of the given virtual screen. Use :iconify-p t to includes iconfied windows"
(
loop
for
win
in
(
query-application-tree
*root-window*
)
when
(
window-belongs-to-vscreen-p
win
scr-num
iconify-p
)
collect
win
))
of the given virtual screen.
:iconify-p to include or not iconfied windows (default nil).
:skip-taskbar to include window with skip-taskbar hint (default t).
:skip-desktop to include window with desktop window type (default t).
:skip-dock to include window with dock window type (default t).
:predicate a function of six arguments:
window screen-number iconify-p skip-taskbar-p skip-desktop-p skip-dock-p."
(
loop
with
i
=
(
if
(
eql
scr-num
+any-desktop+
)
(
current-desk
)
scr-num
)
for
w
in
(
query-application-tree
*root-window*
)
when
(
funcall
predicate
w
i
iconify-p
skip-taskbar
skip-desktop
skip-dock
)
collect
w
))
(
defun
give-focus-to-next-widget-in-desktop
()
"Gives the focus to the window that is on top of the stacking order."
(
loop
with
given-p
=
nil
for
window
in
(
reverse
(
get-
screen-content
(
current-desk
)))
for
window
in
(
reverse
(
screen-content
(
current-desk
)))
when
(
eq
:viewable
(
xlib:window-map-state
window
))
do
(
with-slots
(
input-model
)
(
lookup-widget
window
)
(
unless
(
eq
input-model
:no-input
)
...
...
@@ -132,7 +150,7 @@
(
defmethod
circulate-window
((
root
root
)
&key
direction
(
nth
0
)
icon-p
windows
(
desk
(
current-desk
)))
(
unless
windows
(
setf
windows
(
reverse
(
get-
screen-content
desk
:iconify-p
icon-p
))))
(
setf
windows
(
reverse
(
screen-content
desk
:iconify-p
icon-p
))))
(
or
windows
(
return-from
circulate-window
nil
))
(
let
((
length
(
length
windows
)))
(
setf
nth
(
mod
nth
length
))
...
...
wm.lisp
View file @
bcdae264
;;; -*- Mode: Lisp; Package: ECLIPSE-INTERNALS -*-
;;; $Id: wm.lisp,v 1.2
1
2003/10/0
6
1
7:57:26
ihatchondo Exp $
;;; $Id: wm.lisp,v 1.2
2
2003/10/0
9
1
1:37:08
ihatchondo Exp $
;;;
;;; ECLIPSE. The Common Lisp Window Manager.
;;; Copyright (C) 2000, 2001, 2002 Iban HATCHONDO
...
...
@@ -590,7 +590,7 @@
(
3
(
uniconify
(
slot-value
(
lookup-widget
window
)
'icon
))))
(
put-on-top
(
lookup-widget
window
))))
(
make-desktop-entries
(
index
)
(
loop
for
w
in
(
get-
screen-content
index
:iconify-p
t
)
(
loop
for
w
in
(
screen-content
index
:iconify-p
t
)
for
state
=
(
=
1
(
first
(
wm-state
w
)))
collect
(
cons
(
format
nil
"~:[[ ~A ]~;~A~]"
state
(
wm-name
w
))
(
raise
w
index
)))))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment