Imported Upstream version 1.1.1~git20140130
Mateusz Łukasik
9 years ago
0 | ## ignore build files | |
1 | *.o | |
2 | evilwm | |
3 | ## common temporary files (really ought to be in peoples' ~/.gitignore) | |
4 | *~ | |
5 | .*.swp | |
6 | .*.swo | |
7 | .DS_Store | |
8 | ## debian rules often present, but separate | |
9 | debian/ |
0 | Version 1.1.1, unreleased | |
1 | ||
2 | * Revert client lowering behaviour from 1.1.0. Also fixes a build error | |
3 | when virtual desktops are disabled. | |
4 | * Change default to not warp pointer. | |
5 | ||
0 | 6 | Version 1.1.0, Sun Jul 3 2011 |
1 | 7 | |
2 | 8 | * Respect maximise states while resizing |
22 | 22 | # Uncomment to show the same banner on moves and resizes. Can be SLOW! |
23 | 23 | #OPT_CPPFLAGS += -DINFOBANNER_MOVERESIZE |
24 | 24 | |
25 | # Uncomment for mouse support. Recommended. | |
26 | OPT_CPPFLAGS += -DMOUSE | |
27 | ||
28 | 25 | # Uncomment to support the Xrandr extension (thanks, Yura Semashko). |
29 | 26 | OPT_CPPFLAGS += -DRANDR |
30 | 27 | OPT_LDLIBS += -lXrandr |
43 | 40 | OPT_CPPFLAGS += -DVWM |
44 | 41 | |
45 | 42 | # Uncomment to move pointer around on certain actions. |
46 | OPT_CPPFLAGS += -DWARP_POINTER | |
43 | #OPT_CPPFLAGS += -DWARP_POINTER | |
47 | 44 | |
48 | 45 | # Uncomment to use Ctrl+Alt+q instead of Ctrl+Alt+Escape. Useful for Cygwin. |
49 | 46 | #OPT_CPPFLAGS += -DKEY_KILL=XK_q |
76 | 73 | CC = gcc |
77 | 74 | |
78 | 75 | # Override if desired: |
79 | CFLAGS = -Os -std=c99 | |
76 | CFLAGS = -Os | |
80 | 77 | WARN = -Wall -W -Wstrict-prototypes -Wpointer-arith -Wcast-align \ |
81 | 78 | -Wshadow -Waggregate-return -Wnested-externs -Winline -Wwrite-strings \ |
82 | 79 | -Wundef -Wsign-compare -Wmissing-prototypes -Wredundant-decls |
99 | 96 | ############################################################################ |
100 | 97 | # You shouldn't need to change anything beyond this point |
101 | 98 | |
102 | version = 1.1.0 | |
99 | version = 1.1.1 | |
103 | 100 | distname = evilwm-$(version) |
104 | 101 | |
105 | 102 | # Generally shouldn't be overridden: |
107 | 104 | # _POSIX_C_SOURCE=200112L for sigaction |
108 | 105 | EVILWM_CPPFLAGS = $(CPPFLAGS) $(OPT_CPPFLAGS) -DVERSION=\"$(version)\" \ |
109 | 106 | -D_SVID_SOURCE=1 \ |
110 | -D_POSIX_C_SOURCE=200112L \ | |
111 | $(NULL) | |
107 | -D_POSIX_C_SOURCE=200112L | |
112 | 108 | EVILWM_CFLAGS = -std=c99 $(CFLAGS) $(WARN) |
109 | EVILWM_LDFLAGS = $(LDFLAGS) | |
113 | 110 | EVILWM_LDLIBS = -lX11 $(OPT_LDLIBS) $(LDLIBS) |
114 | 111 | |
115 | 112 | HEADERS = evilwm.h keymap.h list.h log.h xconfig.h |
124 | 121 | $(CC) $(EVILWM_CFLAGS) $(EVILWM_CPPFLAGS) -c $< |
125 | 122 | |
126 | 123 | evilwm$(EXEEXT): $(OBJS) |
127 | $(CC) -o $@ $(OBJS) $(LDFLAGS) $(EVILWM_LDLIBS) | |
124 | $(CC) -o $@ $(OBJS) $(EVILWM_LDFLAGS) $(EVILWM_LDLIBS) | |
128 | 125 | |
129 | 126 | .PHONY: install |
130 | 127 | install: evilwm$(EXEEXT) |
41 | 41 | ewmh_set_net_client_list_stacking(c->screen); |
42 | 42 | } |
43 | 43 | |
44 | /* This doesn't just call XLowerWindow(), as that could push the window | |
45 | * below "DESKTOP" type windows we're not managing. */ | |
46 | 44 | void client_lower(Client *c) { |
47 | struct list *iter; | |
48 | Client *below; | |
49 | Window order[2]; | |
50 | /* Find lowest other client in stacking order that is visible on the | |
51 | * same screen. */ | |
52 | for (iter = clients_stacking_order; iter; iter = iter->next) { | |
53 | below = iter->data; | |
54 | if (below == c) | |
55 | return; | |
56 | if (below->screen == c->screen && (is_fixed(below) || below->vdesk == c->screen->vdesk)) | |
57 | break; | |
58 | } | |
59 | if (!iter) return; | |
60 | order[0] = below->parent; | |
61 | order[1] = c->parent; | |
62 | XRestackWindows(dpy, order, 2); | |
63 | clients_stacking_order = list_delete(clients_stacking_order, c); | |
64 | clients_stacking_order = list_insert_before(clients_stacking_order, iter, c); | |
45 | XLowerWindow(dpy, c->parent); | |
46 | clients_stacking_order = list_to_head(clients_stacking_order, c); | |
65 | 47 | ewmh_set_net_client_list_stacking(c->screen); |
66 | 48 | } |
67 | 49 |
0 | evilwm (1.1.0-4) UNRELEASED; urgency=low | |
1 | ||
2 | * Patch working: | |
3 | + add use_fixed_font.patch to use fixed fonts, | |
4 | + | |
5 | * Bump standards version to 3.9.5. (no changes needed) | |
6 | ||
7 | -- Mateusz Łukasik <mati75@linuxmint.pl> Sun, 24 Aug 2014 15:50:19 +0200 | |
8 | ||
9 | evilwm (1.1.0-3) unstable; urgency=low | |
10 | ||
11 | * Update debian/docs: | |
12 | + add doc/standards.html to install with package. (Closes: #717599) | |
13 | * debian/rules: | |
14 | + fix typo with copy simple configuration. | |
15 | ||
16 | -- Mateusz Łukasik <mati75@linuxmint.pl> Wed, 24 Jul 2013 11:27:37 +0200 | |
17 | ||
18 | evilwm (1.1.0-2) unstable; urgency=low | |
19 | ||
20 | * Add show-in-login-manager.patch: | |
21 | + fix switching to another wm isn't documented. (Closes: #596427) | |
22 | + fix show up in display manager. (Closes: #703986) | |
23 | * Packages is provide x-window-manager now. (Closes: #663992) | |
24 | * Add fix-lost-focus.patch. | |
25 | * Add CFLAGS. | |
26 | * Add simple configuration file installed in /etc/xdg/.evilwmrc_simple: | |
27 | + debian/control: add xterm and xfonts-terminus to suggests. | |
28 | ||
29 | -- Mateusz Łukasik <mati75@linuxmint.pl> Tue, 26 Mar 2013 20:00:26 +0100 | |
30 | ||
31 | evilwm (1.1.0-1) unstable; urgency=low | |
32 | ||
33 | * New maintainer. | |
34 | * New upstream release. (Closes: #542343) | |
35 | + Fixes hangs with 100% CPU if no .xinirc provided (Closes: #554846) | |
36 | + Fixes hangs instead of shutting down when killed (Closes: #512548) | |
37 | * Update debian/control: | |
38 | + change maintainer. | |
39 | + bump standard options to 3.9.4 | |
40 | + add xfonts-75dpi, xfonts-100dpi to package depends (Closes LP: #217502). | |
41 | + add Vcs links. | |
42 | * Add xorg to suggest depends. | |
43 | * Change format to 3.0 (quilt). | |
44 | + Add source/format file. | |
45 | + Switching to xz compression. | |
46 | * debian/compat bump to 9. | |
47 | * Update debian/postinst and debian/prerm scripts. | |
48 | * Update debian/copyright. | |
49 | * Fix interaction with X and signal handler on shutdown (closes: #512548). | |
50 | * Call dh_installmenu (closes: #504065). | |
51 | * Don't strip by default (closes: #436821). | |
52 | * Include basic .desktop file (closes: #330046). | |
53 | * Configuration file $HOME/.evilwmrc read on startup. | |
54 | * evilwm-specific window properties track old dimensions on maximise. | |
55 | * Much larger subset of EWMH 1.3 supported. | |
56 | ||
57 | -- Mateusz Łukasik <mati75@linuxmint.pl> Fri, 22 Feb 2013 12:12:03 +0100 | |
58 | ||
59 | evilwm (1.0.0-1) unstable; urgency=low | |
60 | ||
61 | * New upstream release. (closes: #430926) | |
62 | * EWMH hints added so vdesk/sticky states persist across wm change. | |
63 | * AltTab behaviour modified. | |
64 | * Ability to resize from keyboard added. | |
65 | * New option -altmask. | |
66 | * New option -nosoliddrag. | |
67 | * Fix configure requests containing sibling information. | |
68 | * Only snap against clients on the same screen. | |
69 | * Track vdesk separately on each managed screen. | |
70 | * Keep key bindings when keyboard mapping changes (closes: #364788) | |
71 | * Add basic Xrandr support (thanks to Yura Semashko for this patch). | |
72 | * When snapping, prefer screen edge to other windows. | |
73 | ||
74 | -- Ciaran Anscomb <evilwm@6809.org.uk> Mon, 18 Jun 2007 19:21:59 +0100 | |
75 | ||
76 | evilwm (0.99.21-1) unstable; urgency=low | |
77 | ||
78 | * New upstream release. | |
79 | * Fixes positioning error introduced in 0.99.20. | |
80 | ||
81 | -- Ciaran Anscomb <evilwm@6809.org.uk> Mon, 16 Jan 2006 19:04:55 +0000 | |
82 | ||
83 | evilwm (0.99.20-1) unstable; urgency=low | |
84 | ||
85 | * New upstream release. | |
86 | * Depend on x-dev, libx11-dev, libxext-dev instead of xlibs-dev | |
87 | (closes: #346656) | |
88 | * Remove dependency on Motif/LessTif headers. | |
89 | * Simplify code to avoid enter events when moving windows around without the | |
90 | mouse. | |
91 | * Exit gracefully when no suitable font is found. | |
92 | * Change frame colouring method. Allows aterm & others to use "fast | |
93 | transparency". | |
94 | * Remove redundant window map when a new client isn't going to be visible on | |
95 | the current virtual desktop. | |
96 | ||
97 | -- Ciaran Anscomb <evilwm@6809.org.uk> Fri, 13 Jan 2006 12:05:41 +0000 | |
98 | ||
99 | evilwm (0.99.19-1) unstable; urgency=low | |
100 | ||
101 | * New upstream release. | |
102 | * Info window movement made a bit more sensible. | |
103 | * Don't remove clients from within error handler, instead flag for removal. | |
104 | * While removing client, only reparent to root if window is withdrawn | |
105 | or window manager is shutting down (fixes xpdf-in-firefox bug). | |
106 | * Window close key with shift held will XKillClient(). | |
107 | * LD: Replace logic to decide if we have a shaped window (cribbed from | |
108 | fvwm-2.5.10). | |
109 | * LD: Warp mouse pointer to a visible point in shaped windows. | |
110 | ||
111 | -- Ciaran Anscomb <evilwm@6809.org.uk> Thu, 6 Oct 2005 21:46:14 +0100 | |
112 | ||
113 | evilwm (0.99.18-1) unstable; urgency=low | |
114 | ||
115 | * New upstream release. | |
116 | * Fix AltTab crash when there are no clients. | |
117 | * Added -app, -g and -v options to specify geometry and vdesk (incl sticky), | |
118 | for new windows. | |
119 | * Fix so shape information is applied on WM startup. | |
120 | * Allow override of WM modifiers used to grab keys/mouse buttons with | |
121 | -mask1 and -mask2 (closes: #230518) | |
122 | * Merged lots of Larry Doolittle's patches; these are mostly to increase | |
123 | strictness of code. | |
124 | * Removed deprecated 'vdesk' external pager support. | |
125 | ||
126 | -- Ciaran Anscomb <evilwm@6809.org.uk> Thu, 2 Jun 2005 18:24:39 +0100 | |
127 | ||
128 | evilwm (0.99.17-1) unstable; urgency=low | |
129 | ||
130 | * New upstream release (closes: #178162) | |
131 | * evilwm now appears as x-window-manager alternative (closes: #193676) | |
132 | * Upstream: Fixes AltTab hanging bug (2002-11-18) (closes: #178166) | |
133 | ||
134 | -- Ciaran Anscomb <evilwm@6809.org.uk> Wed, 15 Oct 2003 12:44:19 +0100 | |
135 | ||
136 | evilwm (0.99.16-1) unstable; urgency=low | |
137 | ||
138 | * New upstream release. | |
139 | * lesstif2-dev is an acceptable alternative to lesstif-dev. | |
140 | ||
141 | -- Ciaran Anscomb <evilwm@6809.org.uk> Thu, 18 Sep 2003 16:36:08 +0100 | |
142 | ||
143 | evilwm (0.99.15-1) unstable; urgency=low | |
144 | ||
145 | * New upstream release. | |
146 | ||
147 | -- Ciaran Anscomb <evilwm@6809.org.uk> Sun, 29 Jun 2003 20:53:58 +0100 | |
148 | ||
149 | evilwm (0.99.14-1) unstable; urgency=low | |
150 | ||
151 | * New upstream release. | |
152 | * Add postinst/prerm scripts to deal with alternatives. | |
153 | ||
154 | -- Ciaran Anscomb <evilwm@6809.org.uk> Wed, 15 Jan 2003 10:20:04 +0000 | |
155 | ||
156 | evilwm (0.99.7-1) unstable; urgency=low | |
157 | ||
158 | * Initial Release. | |
159 | * Changed email addresses to evilwm@6809.org.uk. | |
160 | ||
161 | -- Ciaran Anscomb <evilwm@6809.org.uk> Thu, 15 Aug 2002 14:06:12 +0100 |
0 | Source: evilwm | |
1 | Section: x11 | |
2 | Priority: optional | |
3 | Maintainer: Mateusz Łukasik <mati75@linuxmint.pl> | |
4 | Build-Depends: debhelper (>= 9), x11proto-core-dev, libx11-dev, | |
5 | x11proto-xext-dev, libxrandr-dev | |
6 | Standards-Version: 3.9.5 | |
7 | Homepage: http://www.6809.org.uk/evilwm/ | |
8 | Vcs-Git: git://github.com/mati75/evilwm.git | |
9 | Vcs-Browser: https://github.com/mati75/evilwm.git | |
10 | ||
11 | Package: evilwm | |
12 | Architecture: any | |
13 | Depends: ${shlibs:Depends}, ${misc:Depends} | |
14 | Provides: x-window-manager | |
15 | Suggests: xfonts-75dpi, xfonts-100dpi, xterm, xfonts-terminus | |
16 | Description: minimalist window manager for X11 | |
17 | evilwm is based on aewm by Decklin Foster. It's minimalist | |
18 | in that it omits unnecessary stuff like window decorations | |
19 | and icons. But it's very usable in that it provides good | |
20 | keyboard control with repositioning and maximize toggles, | |
21 | solid window drags, snap-to-border support, and virtual desktops. |
0 | Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | |
1 | Upstream-Name: evilwm | |
2 | Source: http://www.6809.org.uk/evilwm/ | |
3 | Copyright: 1999-2007 Ciaran Anscomb <evilwm@6809.org.uk> | |
4 | ||
5 | Files: * | |
6 | Copyright: 1999-2007 Ciaran Anscomb <evilwm@6809.org.uk> | |
7 | License: AEWM | |
8 | ||
9 | Files: debian/* | |
10 | Copyright: 2002-2007 Ciaran Anscomb <evilwm@6809.org.uk> | |
11 | 2012 Mateusz Łukasik <mati75@linuxmint.pl> | |
12 | License: GPL-2+ | |
13 | ||
14 | License: AEWM | |
15 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS", WITHOUT ANY EXPRESS | |
16 | OR IMPLIED WARRANTIES OF ANY KIND. IN NO EVENT SHALL THE AUTHOR BE | |
17 | HELD LIABLE FOR ANY DAMAGES CONNECTED WITH THE USE OF THIS PROGRAM. | |
18 | . | |
19 | You are granted permission to copy, publish, distribute, and/or sell | |
20 | copies of this program and any modified versions or derived works, | |
21 | provided that this copyright and notice are not removed or altered. | |
22 | . | |
23 | Portions of the code were based on 9wm, which contains this license: | |
24 | . | |
25 | > 9wm is free software, and is Copyright (c) 1994 by David Hogan. | |
26 | > Permission is granted to all sentient beings to use this software, | |
27 | > to make copies of it, and to distribute those copies, provided | |
28 | > that: | |
29 | > | |
30 | > (1) the copyright and licence notices are left intact | |
31 | > (2) the recipients are aware that it is free software | |
32 | > (3) any unapproved changes in functionality are either | |
33 | > (i) only distributed as patches | |
34 | > or (ii) distributed as a new program which is not called 9wm | |
35 | > and whose documentation gives credit where it is due | |
36 | > (4) the author is not held responsible for any defects | |
37 | > or shortcomings in the software, or damages caused by it. | |
38 | > | |
39 | > There is no warranty for this software. Have a nice day. | |
40 | ||
41 | License: GPL-2+ | |
42 | This program is free software: you can redistribute it and/or modify | |
43 | it under the terms of the GNU General Public License as published by | |
44 | the Free Software Foundation, either version 2 of the License, or | |
45 | (at your option) any later version. | |
46 | . | |
47 | This package is distributed in the hope that it will be useful, | |
48 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
49 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
50 | GNU General Public License for more details. | |
51 | . | |
52 | On Debian systems, the complete text of the GNU General Public License | |
53 | version 2 can be found in `/usr/share/common-licenses/GPL-2'. | |
54 |
0 | /usr/share/applications/evilwm.desktop /usr/share/xsessions/evilwm.desktop |
0 | #!/bin/sh | |
1 | # | |
2 | # evilwm postinst | |
3 | # | |
4 | # Shamelessly ripped off of Marcelo Magallon's script | |
5 | # by Brent Fulgham <bfulgham@debian.org> | |
6 | # | |
7 | # | |
8 | # Ripped off blackbox's postinst, by Matt Hope <dopey@debian.org> | |
9 | # and ripped off once again by Nobuhoro Iwamatsu <hemamu@t-base.ne.jp> | |
10 | # and also ripped off by Mateusz Łukasik <mati75@linuxmint.pl> | |
11 | # | |
12 | set -e | |
13 | ||
14 | WMentry="/usr/bin/evilwm" | |
15 | ||
16 | add_wm_entry () | |
17 | { | |
18 | update-alternatives --install /usr/bin/x-window-manager \ | |
19 | x-window-manager $WMentry 20 \ | |
20 | --slave /usr/share/man/man1/x-window-manager.1.gz \ | |
21 | x-window-manager.1.gz /usr/share/man/man1/evilwm.1.gz | |
22 | } | |
23 | ||
24 | case "$1" in | |
25 | configure) | |
26 | ||
27 | add_wm_entry | |
28 | ||
29 | ;; | |
30 | ||
31 | abort-*) | |
32 | # how did we get here? Force a non-zero exit code | |
33 | exit 1 | |
34 | ;; | |
35 | ||
36 | *) | |
37 | ;; | |
38 | esac | |
39 | ||
40 | #DEBHELPER# |
0 | #!/bin/sh | |
1 | set -e | |
2 | ||
3 | WMentry="/usr/bin/evilwm" | |
4 | PACKAGE="evilwm" | |
5 | ||
6 | case "$1" in | |
7 | remove) | |
8 | #rm -rf /etc/X11/$PACKAGE | |
9 | update-alternatives --remove x-window-manager \ | |
10 | $WMentry | |
11 | ;; | |
12 | *) | |
13 | ;; | |
14 | esac | |
15 | ||
16 | #DEBHELPER# |
0 | #Simple configuration for EvilWM | |
1 | term xterm | |
2 | snap 10 | |
3 | bw 2 | |
4 | fg #cccccc | |
5 | fc #6699cc | |
6 | mask1 mod4 | |
7 | altmask shift | |
8 | bg #999999 | |
9 | fn terminus:pixelsize=8 | |
10 | ||
11 |
0 | Description: Lost focus bug fix | |
1 | . | |
2 | Some users suffer from a bug where evilwm loses focus after closing a window. | |
3 | This means that evilwm stops responding to keyboard shortcuts, and if no other | |
4 | window is open which the mouse can be moved over to regain focus evilwm becomes | |
5 | unusable and has to be restarted. | |
6 | . | |
7 | Origin: Other, <https://wiki.archlinux.org/index.php/Evilwm#Lost_focus_bug_fix> | |
8 | ||
9 | --- evilwm-1.1.0.orig/client.c | |
10 | +++ evilwm-1.1.0/client.c | |
11 | @@ -190,6 +190,7 @@ void remove_client(Client *c) { | |
12 | * _NET_WM_STATE) */ | |
13 | if (c->remove) { | |
14 | LOG_DEBUG("setting WithdrawnState\n"); | |
15 | + XSetInputFocus(dpy, PointerRoot, RevertToPointerRoot, CurrentTime); | |
16 | set_wm_state(c, WithdrawnState); | |
17 | ewmh_withdraw_client(c); | |
18 | } else { |
0 | Description: Fix show up window manager in display manager. | |
1 | Author: Mateusz Łukasik <mati75@linuxmint.pl> | |
2 | Bug-Debian: http://bugs.debian.org/596427 | |
3 | Bug-Debian: http://bugs.debian.org/703986 | |
4 | --- evilwm-1.1.0.orig/evilwm.desktop | |
5 | +++ evilwm-1.1.0/evilwm.desktop | |
6 | @@ -3,7 +3,7 @@ Type=Application | |
7 | Encoding=UTF-8 | |
8 | Name=evilwm | |
9 | Exec=evilwm | |
10 | -NoDisplay=true | |
11 | +NoDisplay=false | |
12 | X-GNOME-WMName=evilwm | |
13 | # evilwm doesn't talk XSMP yet, so don't start in the WindowManager phase: | |
14 | X-GNOME-Autostart-Phase=Applications |
0 | #!/usr/bin/make -f | |
1 | LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS) | |
2 | LDFLAGS+=-Wl,-z,defs -Wl,--as-needed | |
3 | ||
4 | export LDFLAGS | |
5 | # Default to normal "small" binary | |
6 | CFLAGS = -Os | |
7 | ||
8 | %: | |
9 | dh $@ --parallel | |
10 | ||
11 | override_dh_install: | |
12 | mkdir debian/evilwm/etc/ | |
13 | mkdir debian/evilwm/etc/xdg | |
14 | install -m 644 debian/evilwmrc_simple \ | |
15 | $(CURDIR)/debian/evilwm/etc/xdg/.evilwmrc_simple | |
16 | ||
17 | override_dh_builddeb: | |
18 | dh_builddeb -- -Zxz -z9 |
5 | 5 | #include <string.h> |
6 | 6 | #include <errno.h> |
7 | 7 | #include <sys/select.h> |
8 | #include <X11/XKBlib.h> | |
8 | 9 | #include "evilwm.h" |
9 | 10 | #include "log.h" |
10 | 11 | |
22 | 23 | #endif |
23 | 24 | |
24 | 25 | static void handle_key_event(XKeyEvent *e) { |
25 | KeySym key = XKeycodeToKeysym(dpy,e->keycode,0); | |
26 | KeySym key = XkbKeycodeToKeysym(dpy, e->keycode, 0, 0); | |
26 | 27 | Client *c; |
27 | 28 | int width_inc, height_inc; |
28 | 29 | ScreenInfo *current_screen = find_current_screen(); |
37 | 38 | XEvent ev; |
38 | 39 | do { |
39 | 40 | XMaskEvent(dpy, KeyPressMask|KeyReleaseMask, &ev); |
40 | if (ev.type == KeyPress && XKeycodeToKeysym(dpy,ev.xkey.keycode,0) == KEY_NEXT) | |
41 | if (ev.type == KeyPress && XkbKeycodeToKeysym(dpy, ev.xkey.keycode, 0, 0) == KEY_NEXT) | |
41 | 42 | next(); |
42 | } while (ev.type == KeyPress || XKeycodeToKeysym(dpy,ev.xkey.keycode,0) == KEY_NEXT); | |
43 | } while (ev.type == KeyPress || XkbKeycodeToKeysym(dpy, ev.xkey.keycode, 0, 0) == KEY_NEXT); | |
43 | 44 | XUngrabKeyboard(dpy, CurrentTime); |
44 | 45 | } |
45 | 46 | ewmh_select_client(current); |
168 | 169 | return; |
169 | 170 | } |
170 | 171 | |
171 | #ifdef MOUSE | |
172 | 172 | static void handle_button_event(XButtonEvent *e) { |
173 | 173 | Client *c = find_client(e->window); |
174 | 174 | |
184 | 184 | } |
185 | 185 | } |
186 | 186 | } |
187 | #endif | |
188 | 187 | |
189 | 188 | static void do_window_changes(int value_mask, XWindowChanges *wc, Client *c, |
190 | 189 | int gravity) { |
511 | 510 | switch (ev.xevent.type) { |
512 | 511 | case KeyPress: |
513 | 512 | handle_key_event(&ev.xevent.xkey); break; |
514 | #ifdef MOUSE | |
515 | 513 | case ButtonPress: |
516 | 514 | handle_button_event(&ev.xevent.xbutton); break; |
517 | #endif | |
518 | 515 | case ConfigureRequest: |
519 | 516 | handle_configure_request(&ev.xevent.xconfigurerequest); break; |
520 | 517 | case MapRequest: |
160 | 160 | { |
161 | 161 | client_show(c); |
162 | 162 | client_raise(c); |
163 | #ifndef MOUSE | |
164 | 163 | select_client(c); |
165 | 164 | #ifdef WARP_POINTER |
166 | 165 | setmouse(c->window, c->width + c->border - 1, |
167 | 166 | c->height + c->border - 1); |
168 | 167 | #endif |
169 | 168 | discard_enter_events(c); |
170 | #endif | |
171 | 169 | } |
172 | 170 | #ifdef VWM |
173 | 171 | else { |
254 | 252 | c->x = attr.x; |
255 | 253 | c->y = attr.y; |
256 | 254 | } else { |
257 | #ifdef MOUSE | |
258 | 255 | int xmax = DisplayWidth(dpy, c->screen->screen); |
259 | 256 | int ymax = DisplayHeight(dpy, c->screen->screen); |
260 | 257 | int x, y; |
261 | 258 | get_mouse_position(&x, &y, c->screen->root); |
262 | 259 | c->x = (x * (xmax - c->border - c->width)) / xmax; |
263 | 260 | c->y = (y * (ymax - c->border - c->height)) / ymax; |
264 | #else | |
265 | c->x = c->y = 0; | |
266 | #endif | |
267 | 261 | send_config(c); |
268 | 262 | } |
269 | 263 | |
294 | 288 | XSetWindowBorderWidth(dpy, c->window, 0); |
295 | 289 | XReparentWindow(dpy, c->window, c->parent, 0, 0); |
296 | 290 | XMapWindow(dpy, c->window); |
297 | #ifdef MOUSE | |
298 | 291 | grab_button(c->parent, grabmask2, AnyButton); |
299 | 292 | grab_button(c->parent, grabmask2 | altmask, AnyButton); |
300 | #endif | |
301 | 293 | } |
302 | 294 | |
303 | 295 | /* Get WM_NORMAL_HINTS property */ |
69 | 69 | } |
70 | 70 | #endif /* INFOBANNER */ |
71 | 71 | |
72 | #if defined(MOUSE) || !defined(INFOBANNER) | |
73 | 72 | static void draw_outline(Client *c) { |
74 | 73 | #ifndef INFOBANNER_MOVERESIZE |
75 | 74 | char buf[27]; |
89 | 88 | buf, strlen(buf)); |
90 | 89 | #endif /* ndef INFOBANNER_MOVERESIZE */ |
91 | 90 | } |
92 | #endif | |
93 | ||
94 | #ifdef MOUSE | |
91 | ||
95 | 92 | static void recalculate_sweep(Client *c, int x1, int y1, int x2, int y2, unsigned force) { |
96 | 93 | if (force || c->oldw == 0) { |
97 | 94 | c->oldw = 0; |
161 | 158 | } |
162 | 159 | } |
163 | 160 | } |
164 | #endif | |
165 | 161 | |
166 | 162 | /** predicate_keyrepeatpress: |
167 | 163 | * predicate function for use with XCheckIfEvent. |
220 | 216 | XUngrabKeyboard(dpy, CurrentTime); |
221 | 217 | } |
222 | 218 | |
223 | #ifdef MOUSE | |
224 | 219 | static int absmin(int a, int b) { |
225 | 220 | if (abs(a) < abs(b)) |
226 | 221 | return a; |
338 | 333 | } |
339 | 334 | } |
340 | 335 | } |
341 | #endif /* def MOUSE */ | |
342 | 336 | |
343 | 337 | void moveresize(Client *c) { |
344 | 338 | client_raise(c); |