--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: wmii: Gimp toolboxes move to screen corner when switching view
- From: Thierry Rascle <thierr26@free.fr>
- Date: Sun, 22 Sep 2013 23:26:51 +0200
- Message-id: <20130922212651.15189.75429.reportbug@akela.localdomain>
Package: wmii
Version: 3.10~20120413+hg2813-3
Severity: normal
Dear Maintainer,
With Gimp in the floating layer, and not in single-window moode, when you
switch to another view and come back, the toolbox windows of Gimp disappear.
Well, in fact they are still there but in the bottom right corner of the
screen. You have to move them back to their original position, which is
annoying.
I found a bug report for a similar issue, but in Fluxbox, not in Wmii:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=695428
I thought it might be related to grouping and tried to add a line in
/etc/X11/wmii/wmiirc to disable grouping for Gimp but it didn't solve the
issue:
# Tagging Rules
wmiir write /rules <<!
# Apps with system tray icons like to their main windows
# Give them permission.
/^Pidgin:/ allow=+activate
# MPlayer, VLC and Gimp don't float by default, but should.
/MPlayer|VLC|Gimp/ floating=on
# ROX puts all of its windows in the same group, so they open
# with the same tags. Disable grouping for ROX Filer.
/^ROX-Filer:/ group=0
# Trying to disable grouping for Gimp, does not solve the issue
/^gimp/ group=0
!
A solution which works for me is to modify function unmap_event in source
file cmd/wmii/client.c. But I'm pretty sure it wouldn't work for everybody
(people with a different locale or with a different Gimp configuration).
The unmap_event function before my modification:
static bool
unmap_event(Window *w, void *aux, XUnmapEvent *e) {
Client *c;
c = aux;
if(!e->send_event && w->parent != c->framewin)
c->w.unmapped++;
if(e->send_event || c->w.unmapped < 0)
client_destroy(c);
return false;
}
The unmap_event function after my modification:
static bool
unmap_event(Window *w, void *aux, XUnmapEvent *e) {
Client *c;
int cmp_toolbox, cmp_layers;
c = aux;
if(!e->send_event && w->parent != c->framewin)
c->w.unmapped++;
if(e->send_event || c->w.unmapped < 0) {
cmp_toolbox = strcmp(c->name, "Toolbox - Tool Options");
cmp_layers = strcmp(c->name, "Layers - Brushes");
if((cmp_toolbox != 0) && (cmp_layers != 0))
client_destroy(c);
}
return false;
}
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.10-3-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages wmii depends on:
ii libc6 2.17-92+b1
ii libx11-6 2:1.6.1-1
ii libxext6 2:1.3.2-1
ii libxinerama1 2:1.1.3-1
ii libxrandr2 2:1.4.1-1
ii libxrender1 1:0.9.8-1
ii suckless-tools 38-2
Versions of packages wmii recommends:
ii wmii-doc 1:1-14
Versions of packages wmii suggests:
ii python 2.7.5-5
pn ruby <none>
-- Configuration Files:
/etc/X11/wmii/wmiirc changed:
wmiiscript=wmiirc # For wmii.sh
.. wmii.sh
MODKEY=Mod4
UP=k
DOWN=j
LEFT=h
RIGHT=l
noticetimeout=5
noticebar=/rbar/!notice
export WMII_NORMCOLORS='#000000 #c1c48b #81654f'
export WMII_FOCUSCOLORS='#000000 #81654f #000000'
export WMII_BACKGROUND='#333333'
export WMII_FONT='-*-fixed-medium-r-*-*-*-120-75-75-c-60-iso10646-*'
set -- $(echo $WMII_NORMCOLORS $WMII_FOCUSCOLORS)
export WMII_TERM="xterm"
if ! test -d "${WMII_CONFPATH%%:*}"; then
mkdir "${WMII_CONFPATH%%:*}"
res=$(wihack -type DIALOG xmessage -nearmouse -buttons Windows,Alt -print -fn $WMII_FONT \
"Welcome to wmii,$wi_newline$wi_newline" \
"Most of wmii's default key bindings make use of the$wi_newline" \
"Windows key, or equivalent. For keyboards lacking such$wi_newline" \
"a key, many users change this to the Alt key.$wi_newline$wi_newline" \
"Which would you prefer?")
[ "$res" = "Alt" ] && MODKEY=Mod1
echo "MODKEY=$MODKEY" >"${WMII_CONFPATH%%:*}/wmiirc_local"
chmod +x "${WMII_CONFPATH%%:*}/wmiirc_local"
fi
hist="${WMII_CONFPATH%%:*}/history"
histnum=5000
wmiir write /colrules <<!
/.*/ -> 62+38 # Golden Ratio
!
wmiir write /rules <<!
# Apps with system tray icons like to their main windows
# Give them permission.
/^Pidgin:/ allow=+activate
# MPlayer, VLC and Gimp don't float by default, but should.
/MPlayer|VLC|Gimp/ floating=on
# ROX puts all of its windows in the same group, so they open
# with the same tags. Disable grouping for ROX Filer.
/^ROX-Filer:/ group=0
!
status() {
echo -n label $(uptime | sed 's/.*://; s/, / /g') '|' $(date)
}
startup() { witray & }
wi_runconf -s wmiirc_local
startup
echo colors $WMII_NORMCOLORS | wmiir create $noticebar
wi_events <<'!'
Event CreateTag
echo colors "$WMII_NORMCOLORS$wi_newline" label "$@" | wmiir create "/lbar/$@"
Event DestroyTag
wmiir remove "/lbar/$@"
Event FocusTag
wmiir xwrite "/lbar/$@" colors "$WMII_FOCUSCOLORS"
Event UnfocusTag
wmiir xwrite "/lbar/$@" colors "$WMII_NORMCOLORS"
Event UrgentTag
shift
wmiir xwrite "/lbar/$@" label "*$@"
Event NotUrgentTag
shift
wmiir xwrite "/lbar/$@" label "$@"
Event LeftBarClick LeftBarDND
shift
wmiir xwrite /ctl view "$@"
Event Unresponsive
{
client=$1; shift
msg="The following client is not responding. What would you like to do?$wi_newline"
resp=$(wihack -transient $client \
xmessage -nearmouse -buttons Kill,Wait -print \
-fn "${WMII_FONT%%,*}" "$msg $(wmiir read /client/sel/label)")
if [ "$resp" = Kill ]; then
wmiir xwrite /client/$client/ctl slay &
fi
}&
Event Notice
wmiir xwrite $noticebar $wi_arg
kill $xpid 2>/dev/null # Let's hope this isn't reused...
{ sleep $noticetimeout; wmiir xwrite $noticebar ' '; }&
xpid = $!
Menu Client-3-Delete
wmiir xwrite /client/$1/ctl kill
Menu Client-3-Kill
wmiir xwrite /client/$1/ctl slay
Menu Client-3-Fullscreen
wmiir xwrite /client/$1/ctl Fullscreen on
Event ClientMouseDown
wi_fnmenu Client $2 $1 &
Menu LBar-3-Delete
tag=$1; clients=$(wmiir read "/tag/$tag/index" | awk '/[^#]/{print $2}')
for c in $clients; do
if [ "$tag" = "$(wmiir read /client/$c/tags)" ]
then wmiir xwrite /client/$c/ctl kill
else wmiir xwrite /client/$c/ctl tags -$tag
fi
[ "$tag" = "$(wi_seltag)" ] &&
wmiir xwrite /ctl view $(wi_tags | wi_nexttag)
done
Event LeftBarMouseDown
wi_fnmenu LBar "$@" &
Action showkeys
echo "$KeysHelp" | xmessage -file - -fn ${WMII_FONT%%,*}
Action lock
xtrlock
Action quit
wmiir xwrite /ctl quit
Action rehash
wi_proglist $PATH >$progsfile
Action status
set +xv
if wmiir remove /rbar/status 2>/dev/null; then
sleep 2
fi
echo colors "$WMII_NORMCOLORS" | wmiir create /rbar/status
while status | wmiir write /rbar/status; do
sleep 1
done
Action shutdown
sudo /sbin/shutdown -h now
KeyGroup Moving around
Key $MODKEY-$LEFT # Select the client to the left
wmiir xwrite /tag/sel/ctl select left
Key $MODKEY-$RIGHT # Select the client to the right
wmiir xwrite /tag/sel/ctl select right
Key $MODKEY-$UP # Select the client above
wmiir xwrite /tag/sel/ctl select up
Key $MODKEY-$DOWN # Select the client below
wmiir xwrite /tag/sel/ctl select down
Key $MODKEY-space # Toggle between floating and managed layers
wmiir xwrite /tag/sel/ctl select toggle
KeyGroup Moving through stacks
Key $MODKEY-Control-$UP # Select the stack above
wmiir xwrite /tag/sel/ctl select up stack
Key $MODKEY-Control-$DOWN # Select the stack below
wmiir xwrite /tag/sel/ctl select down stack
KeyGroup Moving clients around
Key $MODKEY-Shift-$LEFT # Move selected client to the left
wmiir xwrite /tag/sel/ctl send sel left
Key $MODKEY-Shift-$RIGHT # Move selected client to the right
wmiir xwrite /tag/sel/ctl send sel right
Key $MODKEY-Shift-$UP # Move selected client up
wmiir xwrite /tag/sel/ctl send sel up
Key $MODKEY-Shift-$DOWN # Move selected client down
wmiir xwrite /tag/sel/ctl send sel down
Key $MODKEY-Shift-space # Toggle selected client between floating and managed layers
wmiir xwrite /tag/sel/ctl send sel toggle
KeyGroup Client actions
Key $MODKEY-f # Toggle selected client's fullsceen state
wmiir xwrite /client/sel/ctl Fullscreen toggle
Key $MODKEY-Shift-c # Close client
wmiir xwrite /client/sel/ctl kill
KeyGroup Changing column modes
Key $MODKEY-d # Set column to default mode
wmiir xwrite /tag/sel/ctl colmode sel default-max
Key $MODKEY-s # Set column to stack mode
wmiir xwrite /tag/sel/ctl colmode sel stack-max
Key $MODKEY-m # Set column to max mode
wmiir xwrite /tag/sel/ctl colmode sel stack+max
KeyGroup Running programs
Key $MODKEY-a # Open wmii actions menu
action $(wi_actions | wimenu -h "${hist}.actions" -n $histnum) &
Key $MODKEY-p # Open program menu
eval wmiir setsid "$(wimenu -h "${hist}.progs" -n $histnum <$progsfile)" &
Key $MODKEY-Return # Launch a terminal
eval wmiir setsid $WMII_TERM &
KeyGroup Other
Key $MODKEY-Control-t # Toggle all other key bindings
case $(wmiir read /keys | wc -l | tr -d ' \t\n') in
0|1)
echo -n "$Keys" | wmiir write /keys
wmiir xwrite /ctl grabmod $MODKEY;;
*)
wmiir xwrite /keys $MODKEY-Control-t
wmiir xwrite /ctl grabmod Mod3;;
esac
KeyGroup Tag actions
Key $MODKEY-t # Change to another tag
wmiir xwrite /ctl view $(wi_tags | wimenu -h "${hist}.tags" -n 50) &
Key $MODKEY-Shift-t # Retag the selected client
# Assumes left-to-right order of evaluation
wmiir xwrite /client/$(wi_selclient)/ctl tags $(wi_tags | wimenu -h "${hist}.tags" -n 50) &
Key $MODKEY-n # Move to the next tag
wmiir xwrite /ctl view $(wi_tags | wi_nexttag)
Key $MODKEY-b # Move to the previous tag
wmiir xwrite /ctl view $(wi_tags | sort -r | wi_nexttag)
!
for i in 0 1 2 3 4 5 6 7 8 9; do
wi_events <<!
Key $MODKEY-$i # Move to the numbered view
wmiir xwrite /ctl view "$i"
Key $MODKEY-Shift-$i # Retag selected client with the numbered tag
wmiir xwrite /client/sel/ctl tags "$i"
!
done
wi_events -e
wmiir write /ctl <<!
font $WMII_FONT
focuscolors $WMII_FOCUSCOLORS
normcolors $WMII_NORMCOLORS
grabmod $MODKEY
border 1
!
xsetroot -solid "$WMII_BACKGROUND" &
progsfile="$(wmiir namespace)/.proglist"
action status &
wi_proglist $PATH >$progsfile &
IFS="$wi_newline"
wmiir rm $(wmiir ls -p /lbar) >/dev/null
seltag=$(wmiir read /tag/sel/ctl | sed 1q)
unset IFS
wi_tags | while read tag
do
if [ "$tag" = "$seltag" ]; then
echo colors "$WMII_FOCUSCOLORS"
echo label $tag
else
echo colors "$WMII_NORMCOLORS"
echo label $tag
fi | wmiir create "/lbar/$tag"
done
wi_eventloop
-- no debconf information
--- End Message ---