1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +01:00

- Removed support for legacy systems: OpenLook, KDE-2.x, Gnome-1.x

- Removed #define and #ifdef XFT constructs, as XFT is on all the time
This commit is contained in:
dan
2004-10-14 23:05:20 +00:00
parent 884a3f1647
commit 0c09179f01
49 changed files with 72 additions and 4593 deletions

View File

@@ -35,9 +35,6 @@ to bugs@windowmaker.org
[ ] --enable-kanji [ ] --enable-kanji
[ ] --disable-shape [ ] --disable-shape
[ ] --enable-single-icon [ ] --enable-single-icon
[ ] --enable-kde
[ ] --enable-gnome
[ ] --enable-openlook
[ ] --enable-modelock [ ] --enable-modelock
[ ] Others: ....................... [ ] Others: .......................

2
BUGS
View File

@@ -3,8 +3,6 @@ Newly added
show their windows minimized. normal restart is unaffected show their windows minimized. normal restart is unaffected
- after a crash, wmaker will completely mess the window's saved geometries - after a crash, wmaker will completely mess the window's saved geometries
and maximizing will have weird results. restart is unaffected and maximizing will have weird results. restart is unaffected
- after a crash/restart the child process keeps accumulating command line
options (one for each restart/crash)
- wmaker will not stop managing a screen even if another window manager - wmaker will not stop managing a screen even if another window manager
requests that, through the ICCCM 2.0 manager selection stuff requests that, through the ICCCM 2.0 manager selection stuff

21
FAQ
View File

@@ -365,8 +365,8 @@ for your convenience.
2.8 Can I use WindowMaker with KDE or GNOME or CDE? 2.8 Can I use WindowMaker with KDE or GNOME or CDE?
---------------------------------- ---------------------------------------------------
Contrary to a lot of people thinks, KDE is NOT a window manager. KDE is Contrary to a lot of people think, KDE is NOT a window manager. KDE is
a suite of various applications that includes a custom window manager (kwm). a suite of various applications that includes a custom window manager (kwm).
The same is true for CDE. The same is true for CDE.
@@ -386,7 +386,7 @@ mouse.
2.9 How do I get Window Maker working with xdm in Redhat 5.[01]? 2.9 How do I get Window Maker working with xdm in Redhat 5.[01]?
---------------------------------- ----------------------------------------------------------------
After running wmaker.inst and letting it write to .xinitrc, After running wmaker.inst and letting it write to .xinitrc,
cp .xinitrc .xsession cp .xinitrc .xsession
and make sure that /usr/local/bin is in your $PATH for the Xserver. You can and make sure that /usr/local/bin is in your $PATH for the Xserver. You can
@@ -1311,14 +1311,8 @@ in routines/xsci/jpc_SGraph.c
5.12 Netscape shows black and white icons 5.12 Netscape shows black and white icons
---------------------------------- ----------------------------------
This is because Netscape uses monochrome icons when running under olwm I have seen this happen on some systems if you run Netscape in a high
and you are using the OPEN LOOK emulation option. If you do not use any XView colour depth (32bpp). That is a Netscape bug. Therefore, bug Netscape.
apps anyway, recompile Window Maker without the --enable-openlook option.
If you need OPEN LOOK emulation, you will have to get used to the monochrome
icons or change then manually in the Attributes panel for each window.
I have also seen this happen on some systems if you run Netscape in a high
colour depth (32bpp) regardless of whether you're using openlook or not.
That is a Netscape bug. Therefore, bug Netscape.
5.13 Snow flakes from xsnow don't acumulate on titlebars! 5.13 Snow flakes from xsnow don't acumulate on titlebars!
@@ -1470,11 +1464,14 @@ the files manually. Or download the whole distribution.
7.5 Will you add GNOME or KDE support? 7.5 Will you add GNOME or KDE support?
---------------------------------- --------------------------------------
Support for GNOME (and KDE) hints is included since 0.50.0. You have to Support for GNOME (and KDE) hints is included since 0.50.0. You have to
enable them at compile-time using the appropriate arguments to ./configure. enable them at compile-time using the appropriate arguments to ./configure.
Please read the INSTALL file for more details. Please read the INSTALL file for more details.
Note: starting with version 0.90.0, support for legacy Gnome-1.x and KDE-2.x
was dropped in favor of NETWM support (used by both Gnome-2.x and KDE-3.x)
-=-=-=-=- -=-=-=-=-
Themes: Themes:

17
INSTALL
View File

@@ -128,9 +128,9 @@ CONFIGURE OPTIONS:
These options can be passed to the configure script to enable/disable These options can be passed to the configure script to enable/disable
some Window Maker features. Example: some Window Maker features. Example:
./configure --enable-kde --enable-gnome ./configure --enable-modelock --disable-gif
will configure Window Maker with KDE and GNOME supported compiled in. will configure Window Maker with modelock supported and disable gif support.
To get a list of other options, run ./configure --help To get a list of other options, run ./configure --help
@@ -153,15 +153,6 @@ To get a list of other options, run ./configure --help
--disable-motif --disable-motif
disable support for mwm window manager hints disable support for mwm window manager hints
--enable-openlook
enable support for OPEN LOOK(tm) window manager hints
--enable-gnome
enable support for GNOME window manager hints
--enable-kde
enable support for kde/kwm window manager hints
--enable-lite --enable-lite
remove things that are already supported in desktop environments, remove things that are already supported in desktop environments,
like KDE and GNOME. Disabled things are: window list, root like KDE and GNOME. Disabled things are: window list, root
@@ -352,9 +343,9 @@ following.
to get a complete listing of other options that are available. to get a complete listing of other options that are available.
2. Run configure with the options you want. For example, if you 2. Run configure with the options you want. For example, if you
want to use the --enable-kde option, type: want to use the --enable-modelock option, type:
./configure --enable-kde ./configure --enable-modelock
3. (optional) Edit src/wconfig.h with your favorite text editor 3. (optional) Edit src/wconfig.h with your favorite text editor
and browse through it for some options you might want to change. and browse through it for some options you might want to change.

View File

@@ -153,15 +153,6 @@ Seznam ostatn
--disable-motif --disable-motif
zak<EFBFBD><EFBFBD>e podporu pokyn<EFBFBD> pro okenn<EFBFBD> mana<EFBFBD>er mwm. zak<EFBFBD><EFBFBD>e podporu pokyn<EFBFBD> pro okenn<EFBFBD> mana<EFBFBD>er mwm.
--enable-openlook
povol<EFBFBD> podporu pokyn<EFBFBD> pro okenn<EFBFBD> mana<EFBFBD>er OPEN LOOK(tm).
--enable-gnome
povol<EFBFBD> podporu pokyn<EFBFBD> pro GNOME.
--enable-kde
povol<EFBFBD> podporu pokyn<EFBFBD> pro KDE.
--enable-lite --enable-lite
odstran<EFBFBD> n<EFBFBD>stroje a funkce, kter<EFBFBD> jsou u<EFBFBD> dostupn<EFBFBD> v desktopov<EFBFBD>ch odstran<EFBFBD> n<EFBFBD>stroje a funkce, kter<EFBFBD> jsou u<EFBFBD> dostupn<EFBFBD> v desktopov<EFBFBD>ch
pros<EFBFBD>ed<EFBFBD>ch KDE a GNOME. Odstran<EFBFBD> se: seznam oken, menu aplikac<EFBFBD>, pros<EFBFBD>ed<EFBFBD>ch KDE a GNOME. Odstran<EFBFBD> se: seznam oken, menu aplikac<EFBFBD>,

View File

@@ -165,15 +165,6 @@ Para obtener una lista de otras opciones, ejecute ./configure --help
--disable-motif --disable-motif
desactiva el soporte para el gestor de ventanas mwm. desactiva el soporte para el gestor de ventanas mwm.
--enable-openlook
activa el soporte para el gestor de ventanas OPEN LOOK(tm)
--enable-gnome
activa el soporte para el gestor de ventanas GNOME.
--enable-kde
activa el soporte para el gestor de ventanas kde/kwm.
--enable-lite --enable-lite
quita cosas que ya est<EFBFBD>n soportadas en los entornos de escritorio, quita cosas que ya est<EFBFBD>n soportadas en los entornos de escritorio,
tal como KDE y Gnome. Desactiva cosas como: lista de ventanas, tal como KDE y Gnome. Desactiva cosas como: lista de ventanas,

View File

@@ -167,18 +167,6 @@ Afin d'obtenir la liste des autres options, ex
d<>sactive le support pour les fonctionnalit<69>s en rapport avec le gestionnaire d<>sactive le support pour les fonctionnalit<69>s en rapport avec le gestionnaire
de fen<65>tres mwm. de fen<65>tres mwm.
--enable-openlook
d<>sactive le support pour les fonctionnalit<69>s en rapport avec le gestionnaire
de fen<65>tres OPEN LOOK(tm).
--enable-gnome
d<>sactive le support pour les fonctionnalit<69>s en rapport avec le gestionnaire
de fen<65>tres GNOME.
--enable-kde
d<>sactive le support pour les fonctionnalit<69>s en rapport avec le gestionnaire
de fen<65>tres kde/kwm.
--enable-lite --enable-lite
d<>sactive des fonctionnalit<69>s d<>j<EFBFBD> prises en compte par les gestionnaires de d<>sactive des fonctionnalit<69>s d<>j<EFBFBD> prises en compte par les gestionnaires de
bureau tels que KDE et GNOME. Cel<65> concerne : la liste de fen<65>tres, le menu bureau tels que KDE et GNOME. Cel<65> concerne : la liste de fen<65>tres, le menu

View File

@@ -155,15 +155,6 @@ Para obter uma lista com outras opcoes, execute ./configure --help:
--disable-motif --disable-motif
Desativa compatibilidade com gerenciador de janelas mwm. Desativa compatibilidade com gerenciador de janelas mwm.
--enable-openlook
Ativa compatibilidade com gerenciador de janelas OPEN LOOK(tm).
--enable-gnome
Ativa compatibilidade com gerenciador de janelas GNOME.
--enable-kde
Ativa compatibilidade com gerenciador de janelas kde/kwm.
--enable-lite --enable-lite
Remove coisas que j<> s<>o suportadas em ambientes desktops como o KDE Remove coisas que j<> s<>o suportadas em ambientes desktops como o KDE
e o GNOME. As op<6F><70>es desativadas s<>o: lista de janelas (window list), menu de e o GNOME. As op<6F><70>es desativadas s<>o: lista de janelas (window list), menu de

View File

@@ -161,15 +161,6 @@ Zoznam v
--disable-motif --disable-motif
zak<61><6B>e podporu pre pokyny mana<6E><61>ra okien wmw zak<61><6B>e podporu pre pokyny mana<6E><61>ra okien wmw
--enable-openlook
povol<6F> podporu pre pokyny mana<6E><61>ra okien OPEN LOOK(tm)
--enable-gnome
povol<6F> podporu pre pokyny mana<6E><61>ra okien GNOME
--enable-kde
povol<6F> podporu pre pokyny mana<6E><61>ra okien kde/kwm
--enable-lite --enable-lite
odstr<74>ni veci, ktor<6F> sa u<> nach<63>dzaj<61> v desktopov<6F>ch prostrediach odstr<74>ni veci, ktor<6F> sa u<> nach<63>dzaj<61> v desktopov<6F>ch prostrediach
ako KDE a GNOME. Odstr<74>nen<65> veci s<>: zoznam okien, menu aplik<69>ci<63>, ako KDE a GNOME. Odstr<74>nen<65> veci s<>: zoznam okien, menu aplik<69>ci<63>,

27
Install
View File

@@ -124,33 +124,6 @@ echo
echo "Option Selection" echo "Option Selection"
echo "================" echo "================"
######################## KDE
echo
echo "Do you want KDE support?"
echo -n "<y/n> [n] "
read kde
if [ "$kde" = y -o "$kde" = Y ]; then
OPTIONS="$OPTIONS --enable-kde"
fi
######################## GNOME
echo
echo "Do you want GNOME support?"
echo -n "<y/n> [n] "
read gnome
if [ "$gnome" = y -o "$gnome" = Y ]; then
OPTIONS="$OPTIONS --enable-gnome"
fi
######################## OLWM
echo
echo "Do you want OPEN LOOK(tm)/olwm support?"
echo -n "<y/n> [n] "
read olwm
if [ "$olwm" = y -o "$olwm" = Y ]; then
OPTIONS="$OPTIONS --enable-openlook"
fi
######################## NLS ######################## NLS
echo echo
echo "Do you want National Language Support?" echo "Do you want National Language Support?"

View File

@@ -5,8 +5,8 @@ SUBDIRS = wrlib WINGs src util po WindowMaker wmlib test WPrefs.app doc\
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N FAQ.I18N.cs FAQ.I18N.sk \ EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N FAQ.I18N.cs FAQ.I18N.sk \
Install INSTALL.cs INSTALL.fr INSTALL.es INSTALL.pt INSTALL.sk \ Install INSTALL.cs INSTALL.fr INSTALL.es INSTALL.pt INSTALL.sk \
README.definable-cursor README.pt README.KDE README.GNOME \ README.definable-cursor README.pt MIRRORS COPYING.WTFPL mkpatch \
MIRRORS COPYING.WTFPL mkpatch WindowMaker.lsm.in WindowMaker.lsm.in
# libwmfun-0.0.3.tar.gz # libwmfun-0.0.3.tar.gz
WindowMaker.lsm: WindowMaker.lsm.in WindowMaker.lsm: WindowMaker.lsm.in

28
README
View File

@@ -51,7 +51,8 @@ Window Maker was designed keeping integration with GNUstep in mind and is the
(www.gnu.org) Read more about GNUstep further on this file. (www.gnu.org) Read more about GNUstep further on this file.
Hints (information given by applications to integrate well with the window Hints (information given by applications to integrate well with the window
manager) for Motif(tm), OPEN LOOK(tm), KDE and GNOME are also supported. manager) for Motif(tm) and NETWM are also supported (NETWM is used by KDE
and GNOME, so they are automatically supported as a result).
So you can replace any of the window managers for these environments So you can replace any of the window managers for these environments
with Window Maker while keeping most, if not all, of the native window manager with Window Maker while keeping most, if not all, of the native window manager
functionality. functionality.
@@ -220,31 +221,6 @@ Note that you must compile Window Maker with the --enable-sound configure
flag and set the DisableSound option to NO. flag and set the DisableSound option to NO.
OpenL**k support
================
I guess many users, mainly from the academic world, have to use
applications written using the OpenL**k toolkits, so having support
for these apps must be of some use.
To enable, use --enable-openlook when doing the configure. Note that
not everything is implemented.
Implemented stuff include decoration hints and the push-pin. Not implemented
stuff include _SUN_WINDOW_STATE (the compose led state stuff), drag and drop
interest stuff, header (not sure what's it) and footer strings.
Please give me feedback if something doesn't work. If the feature is
already implemented, but is not working because of a bug, I'll try to
have that fixed. If it's a non-implemented feature and you mention that
it's important (ie: not just cosmetical), I'll consider implementing it.
The "out" state of the pushpin is emulated as a pushed-in close button.
Just click on the button to make it pushed-out, which corresponds
to the pinned-in state of the pushpin. If you push again in the pushed-out
close button, it will act as a normal close button: it will close the window.
Performance Tuning Performance Tuning
================== ==================

View File

@@ -1,53 +0,0 @@
Information on Using Window Maker with GNOME
--------------------------------------------
Status of GNOME support
-----------------------
GNOME window manager protocols seem to be a work in progress.
Things still change fairly frequently, so, the stuff implemented
may not reflect the latest protocol. If something doesn't work,
that's probably because the protocols have changed again and I still
didn't have time to reimplement everything or noticed that it
changed. If that happens, please tell me exactly what doesn't work.
Other than that, the so called "GNOME Window Manager Compliance - How to
write a GNOME compliant Window Manager" document, says this:
"There are currently a set of other hints available that are, at the
current time, not essential and therefore not documented here. It is,
however envisaged that they will be finalized and added to this
document, but for now are not needed."
Since they are non-essential and undocumented they are not yet implemented.
Implemented stuff:
- GNOME window manager hints
- Motif window manager hints
On the works:
- R6 style session management
Compilation/Installation
------------------------
To compile Window Maker with GNOME support, just configure it as:
./configure --enable-gnome
before compiling.
Also, do not disable mwm hints support (they are enabled by default).
Configuration
-------------
In WPrefs, go to the last section and toggle the "Disable miniwindows" option.

View File

@@ -1,125 +0,0 @@
Information on Using Window Maker with KDE
------------------------------------------
Window Maker supports almost all KDE/KWM specific client
communication protocols, so you can simply replace kwm with
Window Maker, if you think these advantages are worthy:
Window Maker KWM
=============================================================================
Looks NEXTSTEP(tm)/NEXTSTEP(tm) Original, but reminds
enhanced Windows(tm)
Decoration solid, gradient, multi-color solid, vertical and
Textures gradient, pixmaps, textured horizontal gradient,
gradient - all gradients are pixmap
supported in horizontal,
vertical and diagonal
directions
Configurable No Yes, but not totally
Titlebar Buttons
Mini CLI Yes, but limited Yes
Window Specific Yes In KDE 1.1, yes.
Configuration In KDE 1.0, no.
Quick Keyboard Yes In KDE 1.1, yes
Navigation In KDE 1.0, no.
Pager KDE pagers will work as Yes
well as GNOME pagers
Session Not yet supported, but Yes, old (pre-X11R6) style
Management X11R6 style SM is being worked.
Dock kpanel, GNOME panel and Dock kpanel
Built-in Yes No
krootbgwm
GNOME support Yes No
Memory Usage(1) 1.85Mb In KDE 1.0, 3.13Mb
In KDE 1.1, probably more
(1) Memory usage was tested by running wmaker and kwm at the same machine
with the same windows, on the same screen and similar window texture
configurations (at different times, of course). I looked in the output of
ps -m, in the SIZE field, right after starting the window managers.
Enabling KDE Support
--------------------
To enable KDE support in Window Maker, you must compile it after
configuring it as follows:
./configure --enable-kde
Then, just replace kwm with wmaker in your startkde script.
If you are going to use Window Makers sound server, comment out
kwmsound in startkde. Also if wmaker sets your root window
background, comment out kbgndwm, kde's wallpaper setter.
Make sure to disable workspace background setting in KDE. If you
wont be using Window Maker themes anyway, you can set
WorkspaceBack = (none);
in ~/GNUstep/Defaults/WindowMaker
Enhancing Integration
---------------------
Window Maker adds some extensions to KDE's messaging stuff, so you can run
Window Maker specific commands from places like kpanel, krootwm or even
kwmcom. Recently KDE developers have kindly added support for these extensions
in the more recent KDE versions from CVS. The added stuff are the following
kwm like commands:
wm:wmaker - select Window Maker support mode
wmaker:info - show info panel
wmaker:legal - show legal panel
wmaker:arrangeIcons - arrange icons
wmaker:showAll - show all windows
wmaker:hideOthers - hide others
wmaker:restart - restart wmaker
wmaker:exit - exit wmaker
You can test them with kwmcom, like:
kwmcom wmaker:info
Problems
--------
* kpanel will not be kept always on top. That's because kpanel is an
OverrideRedirect window, so Window Maker can't do anything about that.
Before requesting for a hack to work around that in Window Maker, please
request the kpanel author to fix it.
* because the KDE protocol for letting the window manager know the usable
window region is broken, you might find some problems with the window
positioning/maximization code and kpanel's position.
* It seems kpanel (and maybe KDE in general) doesn't like dynamically
changing the number of workspaces. So, don't create or destroy workspaces
while running on KDE, unless you really need.
* If kpanel, kwmpager or kpager becomes confused about the number of
windows present, restart them.
* Wmaker opens windows by default under/over the panel, when the panel is
at top or left of screen. Use the GUI configuration tool WPrefs to change
this.
* Some commands, such as cascade windows and rearrange windows are not
yet implemented.

View File

@@ -217,31 +217,6 @@ http://shadowmere.student.utwente.nl/
Note que debe compilar Window Maker con el par<EFBFBD>metro --enable-sound Note que debe compilar Window Maker con el par<EFBFBD>metro --enable-sound
y definir la opci<EFBFBD>n DisableSound a NO. y definir la opci<EFBFBD>n DisableSound a NO.
Soporte para OpenL**k
=====================
Calculo que muchos usuarios, principalmente del mundo acad<EFBFBD>mico,
tienen que usar aplicaciones escritas usando los toolkits OpenL**k,
as<EFBFBD> que tener soporte para estas aplicaciones debe ser de alg<EFBFBD>n uso.
Para activarlo, use --enable-openlook al hacer el configure. Note que
no todo est<EFBFBD> implementado.
Las cosas implementadas incluyen consejos de adorno y el push-pin. Las cosas
no implementadas incluyen _SUN_WINDOW_STATE (la cosa compuesta que lleva el estado),
cosas que interesan sobre arrastrar y soltar, cabecera (no estoy seguro de que sea as<EFBFBD>)
y cadenas footer.
Por favor h<EFBFBD>game saber si algo no funciona. Si la caracter<EFBFBD>stica ya est<EFBFBD> implimentada,
pero no funciona por un error, intentar<EFBFBD> arreglarlo. Si esta es una caracter<EFBFBD>stica no
implementada y menciona que es importante (obs: no solo superficial), considerar<EFBFBD>
implementarlo.
El estado "out" del pushpin es emular un bot<EFBFBD>n presionado. Solo cliquee
en el bot<EFBFBD>n para hacer que se libere, lo cu<EFBFBD>l corresponde al estado
pinned-in del pushpin. Si pulsa otra vez en el boton liberado, servir<EFBFBD> de
bot<EFBFBD>n normal de cerrado: cerrar<EFBFBD> la ventana.
Ajuste de Rendimiento. Ajuste de Rendimiento.
===================== =====================

View File

@@ -210,34 +210,6 @@ Observe que voc
flag --enable-sound e definindo a op<6F><70>o DisableSound para NO. flag --enable-sound e definindo a op<6F><70>o DisableSound para NO.
Suporte ao OpenL**k
===================
Acredito que muitos usu<73>rios, principalmente os do mundo acad<61>mico,
tenham que usar aplica<63><61>es escritas em toolkits OpenL**k, ent<6E>o o suporte
para estes aplicativos deve ser de algum uso.
Para ativar, use o --enable-openlook quando rodar o configure. Note
que nem tudo est<73> implementado.
As op<6F><70>es implementadas incluem hints de decora<72><61>o e o push-pin.
Coisas n<>o implementadas incluem _SUN_WINDOW_STATE (the compose led
state stuff), coisas relacionadas ao "drag and drop", cabe<62>alho (n<>o
tenho certeza do que <20>) e o string footer.
Por favor me d<>em retorno se algo n<>o funcionar. Se a op<6F><70>o j<> est<73>
implementada, mas n<>o est<73> funcionando por causa de um bug, eu tentarei
corrig<EFBFBD>-la. Se <20> uma caracter<65>stica ainda n<>o implementada e voc<6F> mencionar
que <20> importante (ie: n<>o somente cosm<73>tica), eu considerarei a sua
implementa<EFBFBD><EFBFBD>o.
O estado "out" do pushpin <20> emulado como um bot<6F>o de fechar pressionado.
Clique no bot<6F>o para fazer com que ele fique despressionado, o que
corresponde ao estado "pinned-in" do pushpin. Se voc<6F> pressionar de novo
o bot<6F>o de fechar despressionado, ele vai agir como um bot<6F>o de fechar
normal: vai fechar a janela.
Ajuste da Performance Ajuste da Performance
==================== ====================

1
TODO
View File

@@ -16,7 +16,6 @@ To do before next release:
- clean up netwm hints on exit - clean up netwm hints on exit
- check whether window states are being saved/restored properly via netwm - check whether window states are being saved/restored properly via netwm
on restart/crash-restart (grep for XXX/TODO) on restart/crash-restart (grep for XXX/TODO)
- remove legacy stuff for openlook/gnome-1/kde-1 (don't forget to remove README.KDE/.GNOME)
- review wmaker.inst - review wmaker.inst
remake wrlib rule to not compile with -fomit-frame-pointer and stuff remake wrlib rule to not compile with -fomit-frame-pointer and stuff

View File

@@ -43,20 +43,12 @@ typedef struct W_Application {
typedef struct W_Font { typedef struct W_Font {
struct W_Screen *screen; struct W_Screen *screen;
#ifdef XFT
struct _XftFont *font; struct _XftFont *font;
#else
// pick one
//XFontSet font;
XFontStruct *font;
#endif
short height; short height;
short y; short y;
short refCount; short refCount;
char *name; char *name;
//unsigned int notFontSet:1;
//unsigned int antialiased:1;
} W_Font; } W_Font;

View File

@@ -103,12 +103,8 @@ W_ReadConfigurations(void)
WINGsConfiguration.boldSystemFont = WINGsConfiguration.boldSystemFont =
WMGetUDStringForKey(defaults, "BoldSystemFont"); WMGetUDStringForKey(defaults, "BoldSystemFont");
#ifdef XFT
WINGsConfiguration.antialiasedText = WINGsConfiguration.antialiasedText =
WMGetUDBoolForKey(defaults, "AntialiasedText"); WMGetUDBoolForKey(defaults, "AntialiasedText");
#else
WINGsConfiguration.antialiasedText = False;
#endif
WINGsConfiguration.useMultiByte = False; WINGsConfiguration.useMultiByte = False;
str = WMGetUDStringForKey(defaults, "MultiByteText"); str = WMGetUDStringForKey(defaults, "MultiByteText");

View File

@@ -1,8 +1,6 @@
#include "wconfig.h" #include "wconfig.h"
#ifdef XFT
#include <X11/Xft/Xft.h> #include <X11/Xft/Xft.h>
#include <fontconfig/fontconfig.h> #include <fontconfig/fontconfig.h>
@@ -381,6 +379,4 @@ WMCopyFontWithStyle(WMScreen *scrPtr, WMFont *font, WMFontStyle style)
} }
#endif /* XFT */

View File

@@ -9,10 +9,8 @@
#include <ctype.h> #include <ctype.h>
#include <string.h> #include <string.h>
#ifdef XFT
#include <X11/Xft/Xft.h> #include <X11/Xft/Xft.h>
#include <fontconfig/fontconfig.h> #include <fontconfig/fontconfig.h>
#endif
/* XXX TODO */ /* XXX TODO */
@@ -85,9 +83,7 @@ static int scalableFontSizes[] = {
#ifdef XFT
static void setFontPanelFontName(FontPanel *panel, FcChar8 *family, FcChar8 *style, double size); static void setFontPanelFontName(FontPanel *panel, FcChar8 *family, FcChar8 *style, double size);
#endif
static int isXLFD(char *font, int *length_ret); static int isXLFD(char *font, int *length_ret);
@@ -367,7 +363,6 @@ WMGetFontPanelFont(WMFontPanel *panel)
void void
WMSetFontPanelFont(WMFontPanel *panel, char *fontName) WMSetFontPanelFont(WMFontPanel *panel, char *fontName)
{ {
#ifdef XFT
int fname_len; int fname_len;
FcPattern *pattern; FcPattern *pattern;
FcChar8 *family, *style; FcChar8 *family, *style;
@@ -391,7 +386,6 @@ WMSetFontPanelFont(WMFontPanel *panel, char *fontName)
setFontPanelFontName(panel, family, style, size); setFontPanelFontName(panel, family, style, size);
FcPatternDestroy(pattern); FcPatternDestroy(pattern);
#endif
} }
@@ -485,66 +479,7 @@ isXLFD(char *font, int *length_ret)
return c==NUM_FIELDS; return c==NUM_FIELDS;
} }
#ifndef XFT
static Bool
parseFont(char *font, char values[NUM_FIELDS][256])
{
char *ptr;
int part;
char buffer[256], *bptr;
part = FOUNDRY;
ptr = font;
ptr++; /* skip first - */
bptr = buffer;
while (*ptr) {
if (*ptr == '-') {
*bptr = 0;
strcpy(values[part], buffer);
bptr = buffer;
part++;
} else {
*bptr++ = *ptr;
}
ptr++;
}
*bptr = 0;
strcpy(values[part], buffer);
return True;
}
typedef struct {
char *weight;
char *slant;
char *setWidth;
char *addStyle;
char showSetWidth; /* when duplicated */
char showAddStyle; /* when duplicated */
WMArray *sizes;
} Typeface;
typedef struct {
char *name;
char *foundry;
char *registry, *encoding;
char showFoundry; /* when duplicated */
char showRegistry; /* when duplicated */
WMArray *typefaces;
} Family;
#endif
#ifdef XFT
typedef struct { typedef struct {
char *typeface; char *typeface;
WMArray *sizes; WMArray *sizes;
@@ -554,9 +489,6 @@ typedef struct {
char *name; /* gotta love simplicity */ char *name; /* gotta love simplicity */
WMArray *typefaces; WMArray *typefaces;
} Xft_Family; } Xft_Family;
#endif
static int static int
@@ -575,11 +507,7 @@ compare_int(const void *a, const void *b)
static void static void
#ifdef XFT
addSizeToTypeface(Xft_Typeface *face, int size) addSizeToTypeface(Xft_Typeface *face, int size)
#else
addSizeToTypeface(Typeface *face, int size)
#endif
{ {
if (size == 0) { if (size == 0) {
int j; int j;
@@ -600,7 +528,6 @@ addSizeToTypeface(Typeface *face, int size)
} }
} }
#ifdef XFT
static void static void
addTypefaceToXftFamily(Xft_Family *fam, char *style) addTypefaceToXftFamily(Xft_Family *fam, char *style)
{ {
@@ -628,57 +555,11 @@ addTypefaceToXftFamily(Xft_Family *fam, char *style)
WMAddToArray(fam->typefaces, face); WMAddToArray(fam->typefaces, face);
} }
#else /* XFT */
static void
addTypefaceToFamily(Family *family, char fontFields[NUM_FIELDS][256])
{
Typeface *face;
WMArrayIterator i;
if (family->typefaces) {
WM_ITERATE_ARRAY(family->typefaces, face, i) {
int size;
if (strcmp(face->weight, fontFields[WEIGHT]) != 0) {
continue;
}
if (strcmp(face->slant, fontFields[SLANT]) != 0) {
continue;
}
size = atoi(fontFields[PIXEL_SIZE]);
addSizeToTypeface(face, size);
return;
}
} else {
family->typefaces = WMCreateArray(4);
}
face = wmalloc(sizeof(Typeface));
memset(face, 0, sizeof(Typeface));
face->weight = wstrdup(fontFields[WEIGHT]);
face->slant = wstrdup(fontFields[SLANT]);
face->setWidth = wstrdup(fontFields[SETWIDTH]);
face->addStyle = wstrdup(fontFields[ADD_STYLE]);
face->sizes = WMCreateArray(4);
addSizeToTypeface(face, atoi(fontFields[PIXEL_SIZE]));
WMAddToArray(family->typefaces, face);
}
#endif
/* /*
* families (same family name) (Hashtable of family -> array) * families (same family name) (Hashtable of family -> array)
* registries (same family but different registries) * registries (same family but different registries)
* *
*/ */
#ifdef XFT
static void static void
addFontToXftFamily(WMHashTable *families, char *name, char *style) addFontToXftFamily(WMHashTable *families, char *name, char *style)
{ {
@@ -709,138 +590,18 @@ addFontToXftFamily(WMHashTable *families, char *name, char *style)
WMHashInsert(families, fam->name, array); WMHashInsert(families, fam->name, array);
} }
#else /* XFT */
static void
addFontToFamily(WMHashTable *families, char fontFields[NUM_FIELDS][256])
{
WMArrayIterator i;
Family *fam;
WMArray *family;
family = WMHashGet(families, fontFields[FAMILY]);
if (family) {
/* look for same encoding/registry and foundry */
WM_ITERATE_ARRAY(family, fam, i) {
int enc, reg, found;
enc = (strcmp(fam->encoding, fontFields[ENCODING]) == 0);
reg = (strcmp(fam->registry, fontFields[REGISTRY]) == 0);
found = (strcmp(fam->foundry, fontFields[FOUNDRY]) == 0);
if (enc && reg && found) {
addTypefaceToFamily(fam, fontFields);
return;
}
}
/* look for same encoding/registry */
WM_ITERATE_ARRAY(family, fam, i) {
int enc, reg;
enc = (strcmp(fam->encoding, fontFields[ENCODING]) == 0);
reg = (strcmp(fam->registry, fontFields[REGISTRY]) == 0);
if (enc && reg) {
/* has the same encoding, but the foundry is different */
fam->showFoundry = 1;
fam = wmalloc(sizeof(Family));
memset(fam, 0, sizeof(Family));
fam->name = wstrdup(fontFields[FAMILY]);
fam->foundry = wstrdup(fontFields[FOUNDRY]);
fam->registry = wstrdup(fontFields[REGISTRY]);
fam->encoding = wstrdup(fontFields[ENCODING]);
fam->showFoundry = 1;
addTypefaceToFamily(fam, fontFields);
WMAddToArray(family, fam);
return;
}
}
/* look for same foundry */
WM_ITERATE_ARRAY(family, fam, i) {
int found;
found = (strcmp(fam->foundry, fontFields[FOUNDRY]) == 0);
if (found) {
/* has the same foundry, but encoding is different */
fam->showRegistry = 1;
fam = wmalloc(sizeof(Family));
memset(fam, 0, sizeof(Family));
fam->name = wstrdup(fontFields[FAMILY]);
fam->foundry = wstrdup(fontFields[FOUNDRY]);
fam->registry = wstrdup(fontFields[REGISTRY]);
fam->encoding = wstrdup(fontFields[ENCODING]);
fam->showRegistry = 1;
addTypefaceToFamily(fam, fontFields);
WMAddToArray(family, fam);
return;
}
}
/* foundry and encoding do not match anything known */
fam = wmalloc(sizeof(Family));
memset(fam, 0, sizeof(Family));
fam->name = wstrdup(fontFields[FAMILY]);
fam->foundry = wstrdup(fontFields[FOUNDRY]);
fam->registry = wstrdup(fontFields[REGISTRY]);
fam->encoding = wstrdup(fontFields[ENCODING]);
fam->showFoundry = 1;
fam->showRegistry = 1;
addTypefaceToFamily(fam, fontFields);
WMAddToArray(family, fam);
return;
}
family = WMCreateArray(8);
fam = wmalloc(sizeof(Family));
memset(fam, 0, sizeof(Family));
fam->name = wstrdup(fontFields[FAMILY]);
fam->foundry = wstrdup(fontFields[FOUNDRY]);
fam->registry = wstrdup(fontFields[REGISTRY]);
fam->encoding = wstrdup(fontFields[ENCODING]);
addTypefaceToFamily(fam, fontFields);
WMAddToArray(family, fam);
WMHashInsert(families, fam->name, family);
}
#endif /* XFT */
static void static void
listFamilies(WMScreen *scr, WMFontPanel *panel) listFamilies(WMScreen *scr, WMFontPanel *panel)
{ {
#ifdef XFT
FcObjectSet *os = 0; FcObjectSet *os = 0;
FcFontSet *fs; FcFontSet *fs;
FcPattern *pat; FcPattern *pat;
#else /* XFT */
char **fontList;
char fields[NUM_FIELDS][256];
int count;
#endif /* XFT */
WMHashTable *families; WMHashTable *families;
WMHashEnumerator enumer; WMHashEnumerator enumer;
WMArray *array; WMArray *array;
int i; int i;
#ifdef XFT
pat = FcPatternCreate(); pat = FcPatternCreate();
os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, 0); os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, 0);
fs = FcFontList(0, pat, os); fs = FcFontList(0, pat, os);
@@ -851,19 +612,9 @@ listFamilies(WMScreen *scr, WMFontPanel *panel)
} }
if (pat) if (pat)
FcPatternDestroy (pat); FcPatternDestroy (pat);
#else /* XFT */
fontList = XListFonts(scr->display, ALL_FONTS_MASK, MAX_FONTS_TO_RETRIEVE,
&count);
if (!fontList) {
WMRunAlertPanel(scr, panel->win, _("Error"),
_("Could not retrieve font list"), _("OK"), NULL, NULL);
return;
}
#endif /* XFT */
families = WMCreateHashTable(WMStringPointerHashCallbacks); families = WMCreateHashTable(WMStringPointerHashCallbacks);
#ifdef XFT
if(fs) { if(fs) {
for (i = 0; i < fs->nfont; i++) { for (i = 0; i < fs->nfont; i++) {
FcChar8 *family; FcChar8 *family;
@@ -875,31 +626,9 @@ listFamilies(WMScreen *scr, WMFontPanel *panel)
} }
FcFontSetDestroy(fs); FcFontSetDestroy(fs);
} }
#else /* XFT */
for (i = 0; i < count; i++) {
int fname_len;
if (!isXLFD(fontList[i], &fname_len)) {
*fontList[i] = '\0';
continue;
}
if (fname_len > 255) {
wwarning(_("font name %s is longer than 256, which is invalid."),
fontList[i]);
*fontList[i] = '\0';
continue;
}
if (!parseFont(fontList[i], fields)) {
*fontList[i] = '\0';
continue;
}
addFontToFamily(families, fields);
}
#endif /* XFT */
enumer = WMEnumerateHashTable(families); enumer = WMEnumerateHashTable(families);
#ifdef XFT
while ((array = WMNextHashEnumeratorItem(&enumer))) { while ((array = WMNextHashEnumeratorItem(&enumer))) {
WMArrayIterator i; WMArrayIterator i;
Xft_Family *fam; Xft_Family *fam;
@@ -915,35 +644,7 @@ listFamilies(WMScreen *scr, WMFontPanel *panel)
WMFreeArray(array); WMFreeArray(array);
} }
#else /* XFT */
while ((array = WMNextHashEnumeratorItem(&enumer))) {
WMArrayIterator i;
Family *fam;
char buffer[256];
WMListItem *item;
WM_ITERATE_ARRAY(array, fam, i) {
strcpy(buffer, fam->name);
if (fam->showFoundry) {
strcat(buffer, " ");
strcat(buffer, fam->foundry);
strcat(buffer, " ");
}
if (fam->showRegistry) {
strcat(buffer, " (");
strcat(buffer, fam->registry);
strcat(buffer, "-");
strcat(buffer, fam->encoding);
strcat(buffer, ")");
}
item = WMAddListItem(panel->famLs, buffer);
item->clientData = fam;
}
WMFreeArray(array);
}
#endif /* XFT */
WMSortListItems(panel->famLs); WMSortListItems(panel->famLs);
WMFreeHashTable(families); WMFreeHashTable(families);
@@ -954,53 +655,28 @@ static void
getSelectedFont(FontPanel *panel, char buffer[], int bufsize) getSelectedFont(FontPanel *panel, char buffer[], int bufsize)
{ {
WMListItem *item; WMListItem *item;
#ifdef XFT
Xft_Family *family; Xft_Family *family;
Xft_Typeface *face; Xft_Typeface *face;
#else
Family *family;
Typeface *face;
#endif
char *size; char *size;
item = WMGetListSelectedItem(panel->famLs); item = WMGetListSelectedItem(panel->famLs);
if (!item) if (!item)
return; return;
#ifdef XFT
family = (Xft_Family*)item->clientData; family = (Xft_Family*)item->clientData;
#else
family = (Family*)item->clientData;
#endif
item = WMGetListSelectedItem(panel->typLs); item = WMGetListSelectedItem(panel->typLs);
if (!item) if (!item)
return; return;
#ifdef XFT
face = (Xft_Typeface*)item->clientData; face = (Xft_Typeface*)item->clientData;
#else
face = (Typeface*)item->clientData;
#endif
size = WMGetTextFieldText(panel->sizT); size = WMGetTextFieldText(panel->sizT);
#ifdef XFT
snprintf(buffer, bufsize, "%s:style=%s:pixelsize=%s", snprintf(buffer, bufsize, "%s:style=%s:pixelsize=%s",
family->name, family->name,
face->typeface, face->typeface,
size); size);
#else
snprintf(buffer, bufsize, "-%s-%s-%s-%s-%s-%s-%s-*-*-*-*-*-%s-%s",
family->foundry,
family->name,
face->weight,
face->slant,
face->setWidth,
face->addStyle,
size,
family->registry,
family->encoding);
#endif /* XFT */
wfree(size); wfree(size);
} }
@@ -1027,13 +703,8 @@ familyClick(WMWidget *w, void *data)
{ {
WMList *lPtr = (WMList*)w; WMList *lPtr = (WMList*)w;
WMListItem *item; WMListItem *item;
#ifdef XFT
Xft_Family *family; Xft_Family *family;
Xft_Typeface *face; Xft_Typeface *face;
#else
Family *family;
Typeface *face;
#endif
FontPanel *panel = (FontPanel*)data; FontPanel *panel = (FontPanel*)data;
WMArrayIterator i; WMArrayIterator i;
/* current typeface and size */ /* current typeface and size */
@@ -1051,11 +722,7 @@ familyClick(WMWidget *w, void *data)
item = WMGetListSelectedItem(lPtr); item = WMGetListSelectedItem(lPtr);
#ifdef XFT
family = (Xft_Family*)item->clientData; family = (Xft_Family*)item->clientData;
#else
family = (Family*)item->clientData;
#endif
WMClearList(panel->typLs); WMClearList(panel->typLs);
@@ -1065,44 +732,11 @@ familyClick(WMWidget *w, void *data)
int top=0; int top=0;
WMListItem *fitem; WMListItem *fitem;
#ifdef XFT
strcpy(buffer, face->typeface); strcpy(buffer, face->typeface);
if(strcasecmp(face->typeface, "Roman") == 0) if(strcasecmp(face->typeface, "Roman") == 0)
top = 1; top = 1;
if(strcasecmp(face->typeface, "Regular") == 0) if(strcasecmp(face->typeface, "Regular") == 0)
top = 1; top = 1;
#else
if (strcmp(face->weight, "medium") == 0) {
buffer[0] = 0;
} else {
if (*face->weight) {
strcpy(buffer, face->weight);
buffer[0] = toupper(buffer[0]);
strcat(buffer, " ");
} else {
buffer[0] = 0;
}
}
if (strcmp(face->slant, "r") == 0) {
strcat(buffer, _("Roman"));
top = 1;
} else if (strcmp(face->slant, "i") == 0) {
strcat(buffer, _("Italic"));
} else if (strcmp(face->slant, "o") == 0) {
strcat(buffer, _("Oblique"));
} else if (strcmp(face->slant, "ri") == 0) {
strcat(buffer, _("Rev Italic"));
} else if (strcmp(face->slant, "ro") == 0) {
strcat(buffer, _("Rev Oblique"));
} else {
strcat(buffer, face->slant);
}
if (buffer[0] == 0) {
strcpy(buffer, _("Normal"));
}
#endif
if (top) if (top)
fitem = WMInsertListItem(panel->typLs, 0, buffer); fitem = WMInsertListItem(panel->typLs, 0, buffer);
else else
@@ -1141,11 +775,7 @@ typefaceClick(WMWidget *w, void *data)
{ {
FontPanel *panel = (FontPanel*)data; FontPanel *panel = (FontPanel*)data;
WMListItem *item; WMListItem *item;
#ifdef XFT
Xft_Typeface *face; Xft_Typeface *face;
#else
Typeface *face;
#endif
WMArrayIterator i; WMArrayIterator i;
char buffer[32]; char buffer[32];
@@ -1157,11 +787,7 @@ typefaceClick(WMWidget *w, void *data)
item = WMGetListSelectedItem(panel->typLs); item = WMGetListSelectedItem(panel->typLs);
#ifdef XFT
face = (Xft_Typeface*)item->clientData; face = (Xft_Typeface*)item->clientData;
#else
face = (Typeface*)item->clientData;
#endif
WMClearList(panel->sizLs); WMClearList(panel->sizLs);
@@ -1207,7 +833,6 @@ sizeClick(WMWidget *w, void *data)
} }
#ifdef XFT
static void static void
setFontPanelFontName(FontPanel *panel, FcChar8 *family, FcChar8 *style, double size) setFontPanelFontName(FontPanel *panel, FcChar8 *family, FcChar8 *style, double size)
{ {
@@ -1290,5 +915,4 @@ setFontPanelFontName(FontPanel *panel, FcChar8 *family, FcChar8 *style, double s
return; return;
} }
#endif

View File

@@ -3,9 +3,7 @@
#include "WINGsP.h" #include "WINGsP.h"
#include "wconfig.h" #include "wconfig.h"
#ifdef XFT #include <X11/Xft/Xft.h>
# include <X11/Xft/Xft.h>
#endif
#include <X11/Xutil.h> #include <X11/Xutil.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
@@ -627,10 +625,8 @@ WMCreateScreenWithRContext(Display *display, int screen, RContext *context)
scrPtr->fontCache = WMCreateHashTable(WMStringPointerHashCallbacks); scrPtr->fontCache = WMCreateHashTable(WMStringPointerHashCallbacks);
#ifdef XFT
scrPtr->xftdraw = XftDrawCreate(scrPtr->display, W_DRAWABLE(scrPtr), scrPtr->xftdraw = XftDrawCreate(scrPtr->display, W_DRAWABLE(scrPtr),
scrPtr->visual, scrPtr->colormap); scrPtr->visual, scrPtr->colormap);
#endif
/* create input method stuff */ /* create input method stuff */
W_InitIMStuff(scrPtr); W_InitIMStuff(scrPtr);

View File

@@ -4,11 +4,11 @@ Version: VERSION
Entered-date: DATE Entered-date: DATE
Description: N*EXTSTEP alike, good looking, fast and easy to use/configure Description: N*EXTSTEP alike, good looking, fast and easy to use/configure
window manager for X11. Features support for GNUstep, ICCCM, window manager for X11. Features support for GNUstep, ICCCM,
Motif(tm), OPEN LOOK(tm), KDE and GNOME hints. Multiple Motif(tm) and NETWM hints. Multiple workspaces, easy to use
workspaces, easy to use application dock, very flexible menus, application dock, very flexible menus, graphical configuration,
graphical configuration, 13 types of decoration textures, 13 types of decoration textures, national language support,
national language support, themes etc themes etc
Keywords: window-manager X11 GNUstep NEXTSTEP GNOME KDE OpenLook Motif Keywords: window-manager X11 GNUstep NEXTSTEP NETWM Motif XFT
Author: kojima@windowmaker.org (Alfredo K. Kojima) Author: kojima@windowmaker.org (Alfredo K. Kojima)
Maintained-by: kojima@windowmaker.org (Alfredo K. Kojima) Maintained-by: kojima@windowmaker.org (Alfredo K. Kojima)
dan@windowmaker.org (Dan Pascu) dan@windowmaker.org (Dan Pascu)

View File

@@ -19,18 +19,18 @@ AM_INIT_AUTOMAKE(WindowMaker, 0.85.0)
AC_PROG_LIBTOOL AC_PROG_LIBTOOL
# by Marcelo Magallon <mmagallo@efis.ucr.ac.cr> dnl # by Marcelo Magallon <mmagallo@efis.ucr.ac.cr>
# Turn around -rpath problem with libtool 1.0c dnl # Turn around -rpath problem with libtool 1.0c
# This define should be improbable enough to not conflict with anything dnl # This define should be improbable enough to not conflict with anything
case ${host} in dnl case ${host} in
*-pc-linux-gnu) dnl *-pc-linux-gnu)
AC_MSG_RESULT([Fixing libtool for -rpath problems.]) dnl AC_MSG_RESULT([Fixing libtool for -rpath problems.])
sed < libtool > libtool-2 \ dnl sed < libtool > libtool-2 \
's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/' dnl 's/^hardcode_libdir_flag_spec.*$/hardcode_libdir_flag_spec=" -D__LIBTOOL_IS_A_FOOL__ "/'
mv libtool-2 libtool dnl mv libtool-2 libtool
chmod 755 libtool dnl chmod 755 libtool
;; dnl ;;
esac dnl esac
AM_CONFIG_HEADER(src/config.h) AM_CONFIG_HEADER(src/config.h)
@@ -102,8 +102,7 @@ AC_FUNC_VPRINTF
AC_FUNC_ALLOCA AC_FUNC_ALLOCA
AC_CHECK_FUNCS(gethostname select poll strerror strcasecmp strncasecmp \ AC_CHECK_FUNCS(gethostname select poll strerror strcasecmp strncasecmp \
setsid atexit mallinfo mkstemp snprintf vsnprintf asprintf \ setsid atexit mallinfo mkstemp snprintf vsnprintf asprintf \
vasprintf mbsnrtowcs mbsrtowcs mbrtowc mbrlen wcsnrtombs \ vasprintf)
wcsrtombs wcstombs)
dnl ripped from samba dnl ripped from samba
dnl dnl
@@ -181,7 +180,7 @@ AC_HEADER_SYS_WAIT
AC_HEADER_TIME AC_HEADER_TIME
AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h sys/types.h \ AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h sys/types.h \
libintl.h sys/select.h poll.h malloc.h ctype.h string.h \ libintl.h sys/select.h poll.h malloc.h ctype.h string.h \
strings.h wchar.h) strings.h)
@@ -381,37 +380,8 @@ AC_SUBST(supported_locales)
dnl Support for various hint things dnl Support for various hint things
dnl =============================== dnl ===============================
gnome_on="no"
kde_on="no"
openlook_on="no"
netwm_on="no"
vdesktop_on="no" vdesktop_on="no"
AC_ARG_ENABLE(gnome,
[ --enable-gnome enable stuff needed for GNOME ],
[if test x$enableval = xyes; then
AC_DEFINE(GNOME_STUFF, 1, [define if you want GNOME stuff support])
gnome_on=yes
fi])
AC_ARG_ENABLE(kde,
[ --enable-kde enable support for KDE window manager (kwm) hints ],
[if test x$enableval = xyes; then
AC_DEFINE(KWM_HINTS, 1, [define if you want KDE hint support])
kde_on=yes
fi])
AC_ARG_ENABLE(openlook,
[ --enable-openlook enable support for OPEN LOOK(tm) (olwm) hints ],
[if test x$enableval = xyes; then
AC_DEFINE(OLWM_HINTS, 1, [define if you want OPEN LOOK(tm) hint support])
openlook_on=yes
fi])
AC_ARG_ENABLE(vdesktop, AC_ARG_ENABLE(vdesktop,
[ --enable-vdesktop enable virtual desktop], [ --enable-vdesktop enable virtual desktop],
[if test x$enableval = xyes; then [if test x$enableval = xyes; then
@@ -583,7 +553,6 @@ fi
AC_SUBST(XFTFLAGS) AC_SUBST(XFTFLAGS)
AC_SUBST(XFTLIBS) AC_SUBST(XFTLIBS)
AC_DEFINE(XFT, 1, [define if you want support for antialiased fonts (set by configure)])
dnl XINERAMA support dnl XINERAMA support
@@ -1124,20 +1093,6 @@ else
languages=`echo $MOFILES | sed 's/.mo//g'` languages=`echo $MOFILES | sed 's/.mo//g'`
fi fi
extrasupport=''
if test "$openlook_on" = "yes"; then
extrasupport="OpenLook $extrasupport"
fi
if test "$gnome_on" = "yes"; then
extrasupport="Gnome-1.x $extrasupport"
fi
if test "$kde_on" = "yes"; then
extrasupport="KDE-1.x $extrasupport"
fi
if test "x$extrasupport" = "x"; then
extrasupport="None"
fi
echo echo
echo "Window Maker was configured as follows:" echo "Window Maker was configured as follows:"
echo echo
@@ -1150,7 +1105,6 @@ echo "Use inline MMX(tm) x86 assembly : $mmx_support"
echo "Antialiased text support in WINGs : $xft" echo "Antialiased text support in WINGs : $xft"
echo "Xinerama extension support : $xinerama" echo "Xinerama extension support : $xinerama"
echo "Virtual desktop support : $vdesktop_on" echo "Virtual desktop support : $vdesktop_on"
echo "Supported legacy environments : $extrasupport"
echo "Translated message files to install : $mof" echo "Translated message files to install : $mof"
dnl echo "Supported languages beside English : $languages" dnl echo "Supported languages beside English : $languages"
if test "x$MOFILES" != "x"; then if test "x$MOFILES" != "x"; then

View File

@@ -50,7 +50,6 @@ export CFLAGS LINGUAS NLSDIR GNUSTEP_LOCAL_ROOT;
./configure --prefix=/usr --exec-prefix=/usr/X11R6 \ ./configure --prefix=/usr --exec-prefix=/usr/X11R6 \
--sysconfdir=/etc/X11 --enable-modelock \ --sysconfdir=/etc/X11 --enable-modelock \
--enable-kde --enable-gnome --enable-openlook \
--enable-usermenu --enable-usermenu
make make

View File

@@ -17,9 +17,7 @@ POTFILES = \
$(top_builddir)/src/dock.c \ $(top_builddir)/src/dock.c \
$(top_builddir)/src/dockedapp.c \ $(top_builddir)/src/dockedapp.c \
$(top_builddir)/src/framewin.c \ $(top_builddir)/src/framewin.c \
$(top_builddir)/src/gnome.c \
$(top_builddir)/src/icon.c \ $(top_builddir)/src/icon.c \
$(top_builddir)/src/kwm.c \
$(top_builddir)/src/main.c \ $(top_builddir)/src/main.c \
$(top_builddir)/src/menu.c \ $(top_builddir)/src/menu.c \
$(top_builddir)/src/menureader.c \ $(top_builddir)/src/menureader.c \

View File

@@ -38,14 +38,10 @@ wmaker_SOURCES = \
framewin.h \ framewin.h \
geomview.c \ geomview.c \
geomview.h \ geomview.h \
gnome.c \
gnome.h \
funcs.h \ funcs.h \
icon.c \ icon.c \
icon.h \ icon.h \
keybind.h \ keybind.h \
kwm.h \
kwm.c \
main.c \ main.c \
menu.c \ menu.c \
menu.h \ menu.h \
@@ -54,8 +50,6 @@ wmaker_SOURCES = \
motif.c \ motif.c \
motif.h \ motif.h \
moveres.c \ moveres.c \
openlook.c \
openlook.h \
pixmap.c \ pixmap.c \
pixmap.h \ pixmap.h \
placement.c \ placement.c \

View File

@@ -50,14 +50,6 @@
#include "wsound.h" #include "wsound.h"
#include "xinerama.h" #include "xinerama.h"
#ifdef GNOME_STUFF
# include "gnome.h"
#endif
#ifdef KWM_HINTS
# include "kwm.h"
#endif
/****** Global Variables ******/ /****** Global Variables ******/
extern Time LastTimestamp; extern Time LastTimestamp;
@@ -434,10 +426,6 @@ wMaximizeWindow(WWindow *wwin, int directions)
} }
wwin->flags.maximized = directions; wwin->flags.maximized = directions;
#ifdef KWM_HINTS
wKWMUpdateClientGeometryRestore(wwin);
#endif
if (directions & MAX_HORIZONTAL) { if (directions & MAX_HORIZONTAL) {
new_width = (usableArea.x2-usableArea.x1)-FRAME_BORDER_WIDTH*2; new_width = (usableArea.x2-usableArea.x1)-FRAME_BORDER_WIDTH*2;
new_x = usableArea.x1; new_x = usableArea.x1;
@@ -1014,30 +1002,20 @@ wIconifyWindow(WWindow *wwin)
iw = wwin->icon->core->width; iw = wwin->icon->core->width;
ih = wwin->icon->core->height; ih = wwin->icon->core->height;
} else { } else {
#ifdef KWM_HINTS
WArea area;
if (wKWMGetIconGeometry(wwin, &area)) {
ix = area.x1;
iy = area.y1;
iw = area.x2 - ix;
ih = area.y2 - iy;
} else
#endif /* KWM_HINTS */
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
if (wwin->flags.net_handle_icon) { if (wwin->flags.net_handle_icon) {
ix = wwin->icon_x; ix = wwin->icon_x;
iy = wwin->icon_y; iy = wwin->icon_y;
iw = wwin->icon_w; iw = wwin->icon_w;
ih = wwin->icon_h; ih = wwin->icon_h;
} else } else
#endif #endif
{ {
ix = 0; ix = 0;
iy = 0; iy = 0;
iw = wwin->screen_ptr->scr_width; iw = wwin->screen_ptr->scr_width;
ih = wwin->screen_ptr->scr_height; ih = wwin->screen_ptr->scr_height;
} }
} }
animateResize(wwin->screen_ptr, wwin->frame_x, wwin->frame_y, animateResize(wwin->screen_ptr, wwin->frame_x, wwin->frame_y,
wwin->frame->core->width, wwin->frame->core->height, wwin->frame->core->width, wwin->frame->core->height,
@@ -1192,30 +1170,20 @@ wDeiconifyWindow(WWindow *wwin)
iw = wwin->icon->core->width; iw = wwin->icon->core->width;
ih = wwin->icon->core->height; ih = wwin->icon->core->height;
} else { } else {
#ifdef KWM_HINTS
WArea area;
if (wKWMGetIconGeometry(wwin, &area)) {
ix = area.x1;
iy = area.y1;
iw = area.x2 - ix;
ih = area.y2 - iy;
} else
#endif /* KWM_HINTS */
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
if (wwin->flags.net_handle_icon) { if (wwin->flags.net_handle_icon) {
ix = wwin->icon_x; ix = wwin->icon_x;
iy = wwin->icon_y; iy = wwin->icon_y;
iw = wwin->icon_w; iw = wwin->icon_w;
ih = wwin->icon_h; ih = wwin->icon_h;
} else } else
#endif #endif
{ {
ix = 0; ix = 0;
iy = 0; iy = 0;
iw = wwin->screen_ptr->scr_width; iw = wwin->screen_ptr->scr_width;
ih = wwin->screen_ptr->scr_height; ih = wwin->screen_ptr->scr_height;
} }
} }
animateResize(wwin->screen_ptr, ix, iy, iw, ih, animateResize(wwin->screen_ptr, ix, iy, iw, ih,
wwin->frame_x, wwin->frame_y, wwin->frame_x, wwin->frame_y,

View File

@@ -43,9 +43,6 @@
#include "stacking.h" #include "stacking.h"
#include "appicon.h" #include "appicon.h"
#include "appmenu.h" #include "appmenu.h"
#ifdef KWM_HINTS
#include "kwm.h"
#endif
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
# include "wmspec.h" # include "wmspec.h"
#endif #endif
@@ -339,9 +336,6 @@ wClientCheckProperty(WWindow *wwin, XPropertyEvent *event)
break; break;
case XA_WM_ICON_NAME: case XA_WM_ICON_NAME:
#ifdef KWM_HINTS
wKWMSendEventMessage(wwin, WKWMChangedClient);
#endif
if (!wwin->icon) if (!wwin->icon)
break; break;
else { else {
@@ -504,9 +498,6 @@ wClientCheckProperty(WWindow *wwin, XPropertyEvent *event)
if (wapp && wapp->app_icon) { if (wapp && wapp->app_icon) {
wIconUpdate(wapp->app_icon->icon); wIconUpdate(wapp->app_icon->icon);
} }
#ifdef KWM_HINTS
wKWMSendEventMessage(wwin, WKWMIconChange);
#endif
} }
if (wwin->wm_hints->flags & UrgencyHint) if (wwin->wm_hints->flags & UrgencyHint)
@@ -663,17 +654,8 @@ wClientCheckProperty(WWindow *wwin, XPropertyEvent *event)
XFree(attr); XFree(attr);
} else { } else {
#if defined(KWM_HINTS) || defined(NETWM_HINTS)
Bool done = False;
#endif
#ifdef KWM_HINTS
if (!done)
done = wKWMCheckClientHintChange(wwin, event);
#endif /* KWM_HINTS */
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
if (!done) { wNETWMCheckClientHintChange(wwin, event);
done = wNETWMCheckClientHintChange(wwin, event);
}
#endif #endif
} }
} }

View File

@@ -1370,21 +1370,12 @@ wShowInfoPanel(WScreen *scr)
char buf[80]; char buf[80];
int j = 0; int j = 0;
#ifdef MWM_HINTS
list[j++] = "MWM";
#endif
#ifdef KWM_HINTS
list[j++] = "KDE";
#endif
#ifdef GNOME_STUFF
list[j++] = "GNOME";
#endif
#ifdef OLWM_HINTS
list[j++] = "OLWM";
#endif
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
list[j++] = "WMSPEC"; list[j++] = "WMSPEC";
#endif #endif
#ifdef MWM_HINTS
list[j++] = "MWM";
#endif
buf[0] = 0; buf[0] = 0;
for (i = 0; i < j; i++) { for (i = 0; i < j; i++) {
@@ -1405,12 +1396,10 @@ wShowInfoPanel(WScreen *scr)
strbuf = wstrappend(strbuf, _("\nSound enabled")); strbuf = wstrappend(strbuf, _("\nSound enabled"));
} }
#ifdef XFT
strbuf = wstrappend(strbuf, _("; Antialiased text")); strbuf = wstrappend(strbuf, _("; Antialiased text"));
#endif
#ifdef VIRTUAL_DESKTOP #ifdef VIRTUAL_DESKTOP
strbuf = wstrappend(strbuf, _("; VirtualDesktop")); strbuf = wstrappend(strbuf, _(", VirtualDesktop"));
#endif #endif
#ifdef XINERAMA #ifdef XINERAMA

View File

@@ -60,12 +60,6 @@
#include "balloon.h" #include "balloon.h"
#include "xinerama.h" #include "xinerama.h"
#ifdef GNOME_STUFF
# include "gnome.h"
#endif
#ifdef KWM_HINTS
# include "kwm.h"
#endif
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
# include "wmspec.h" # include "wmspec.h"
#endif #endif
@@ -627,10 +621,6 @@ handleDestroyNotify(XEvent *event)
} }
wApplicationDestroy(app); wApplicationDestroy(app);
} }
#ifdef KWM_HINTS
wKWMCheckDestroy(&event->xdestroywindow);
#endif
} }
@@ -724,10 +714,6 @@ handleButtonPress(XEvent *event)
wPreferences.mouse_wheel!=WA_NONE) { wPreferences.mouse_wheel!=WA_NONE) {
wWorkspaceRelativeChange(scr, -1); wWorkspaceRelativeChange(scr, -1);
} }
#ifdef GNOME_STUFF
else if (wGNOMEProxyizeButtonEvent(scr, event))
return;
#endif
} }
#endif /* !LITE */ #endif /* !LITE */
@@ -897,11 +883,6 @@ handlePropertyNotify(XEvent *event)
} }
scr = wScreenForWindow(event->xproperty.window); scr = wScreenForWindow(event->xproperty.window);
if (scr && scr->root_win == event->xproperty.window) {
#ifdef KWM_HINTS
wKWMCheckRootHintChange(scr, &event->xproperty);
#endif
}
} }
@@ -1001,14 +982,6 @@ handleClientMessage(XEvent *event)
} else if (wNETWMProcessClientMessage(&event->xclient)) { } else if (wNETWMProcessClientMessage(&event->xclient)) {
/* do nothing */ /* do nothing */
#endif #endif
#ifdef GNOME_STUFF
} else if (wGNOMEProcessClientMessage(&event->xclient)) {
/* do nothing */
#endif /* GNOME_STUFF */
#ifdef KWM_HINTS
} else if (wKWMProcessClientMessage(&event->xclient)) {
/* do nothing */
#endif /* KWM_HINTS */
#ifdef XDND #ifdef XDND
} else if (wXDNDProcessClientMessage(&event->xclient)) { } else if (wXDNDProcessClientMessage(&event->xclient)) {
/* do nothing */ /* do nothing */

View File

@@ -1272,19 +1272,6 @@ wFrameWindowChangeTitle(WFrameWindow *fwin, char *new_title)
} }
#ifdef OLWM_HINTS
void
wFrameWindowUpdatePushButton(WFrameWindow *fwin, Bool pushed)
{
fwin->flags.right_button_pushed_in = pushed;
paintButton(fwin->right_button, fwin->title_texture[fwin->flags.state],
WMColorPixel(fwin->title_color[fwin->flags.state]),
fwin->rbutton_image, pushed);
}
#endif /* OLWM_HINTS */
#ifdef XKB_BUTTON_HINT #ifdef XKB_BUTTON_HINT
void void
wFrameWindowUpdateLanguageButton(WFrameWindow *fwin) wFrameWindowUpdateLanguageButton(WFrameWindow *fwin)
@@ -1467,16 +1454,9 @@ handleButtonExpose(WObjDescriptor *desc, XEvent *event)
WMColorPixel(fwin->title_color[fwin->flags.state]), WMColorPixel(fwin->title_color[fwin->flags.state]),
fwin->lbutton_image, False); fwin->lbutton_image, False);
} else { } else {
Bool pushed = False;
#ifdef OLWM_HINTS
if (fwin->flags.right_button_pushed_in)
pushed = True;
#endif
/* emulate the olwm pushpin in the "out" state */
paintButton(button, fwin->title_texture[fwin->flags.state], paintButton(button, fwin->title_texture[fwin->flags.state],
WMColorPixel(fwin->title_color[fwin->flags.state]), WMColorPixel(fwin->title_color[fwin->flags.state]),
fwin->rbutton_image, pushed); fwin->rbutton_image, False);
} }
} }

View File

@@ -143,10 +143,6 @@ typedef struct WFrameWindow {
unsigned int is_client_window_frame:1; unsigned int is_client_window_frame:1;
unsigned int incomplete_title:1; unsigned int incomplete_title:1;
#ifdef OLWM_HINTS
unsigned int right_button_pushed_in:1;
#endif
} flags; } flags;
} WFrameWindow; } WFrameWindow;
@@ -176,10 +172,6 @@ void wFrameWindowHideButton(WFrameWindow *fwin, int flags);
int wFrameWindowChangeTitle(WFrameWindow *fwin, char *new_title); int wFrameWindowChangeTitle(WFrameWindow *fwin, char *new_title);
#ifdef OLWM_HINTS
void wFrameWindowUpdatePushButton(WFrameWindow *fwin, Bool pushed);
#endif
#ifdef XKB_BUTTON_HINT #ifdef XKB_BUTTON_HINT
void wFrameWindowUpdateLanguageButton(WFrameWindow *fwin); void wFrameWindowUpdateLanguageButton(WFrameWindow *fwin);
#endif #endif

View File

@@ -1,731 +0,0 @@
/* gnome.c-- support for the GNOME Hints
*
* Window Maker window manager
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
/*
* According to the author of this thing, it should not be taken seriously.
* IMHO, there are lot's of weirdnesses and it's quite unelegant. I'd
* rather not support it, but here it goes anyway.
*/
#include "wconfig.h"
#ifdef GNOME_STUFF
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "WindowMaker.h"
#include "screen.h"
#include "wcore.h"
#include "framewin.h"
#include "window.h"
#include "workspace.h"
#include "funcs.h"
#include "actions.h"
#include "stacking.h"
#include "client.h"
#include "xinerama.h"
#include "gnome.h"
#define WIN_HINTS_SKIP_FOCUS (1<<0) /*"alt-tab" skips this win*/
#define WIN_HINTS_SKIP_WINLIST (1<<1) /*do not show in window list*/
#define WIN_HINTS_SKIP_TASKBAR (1<<2) /*do not show on taskbar*/
#define WIN_HINTS_GROUP_TRANSIENT (1<<3) /*Reserved - definition is unclear*/
#define WIN_HINTS_FOCUS_ON_CLICK (1<<4) /*app only accepts focus if clicked*/
#define WIN_HINTS_DO_NOT_COVER (1<<5) /* attempt to not cover this window */
#define WIN_STATE_STICKY (1<<0) /*everyone knows sticky*/
#define WIN_STATE_MINIMIZED (1<<1) /*Reserved - definition is unclear*/
#define WIN_STATE_MAXIMIZED_VERT (1<<2) /*window in maximized V state*/
#define WIN_STATE_MAXIMIZED_HORIZ (1<<3) /*window in maximized H state*/
#define WIN_STATE_HIDDEN (1<<4) /*not on taskbar but window visible*/
#define WIN_STATE_SHADED (1<<5) /*shaded (MacOS / Afterstep style)*/
/* these are bogus states defined in "the spec" */
#define WIN_STATE_HID_WORKSPACE (1<<6) /*not on current desktop*/
#define WIN_STATE_HID_TRANSIENT (1<<7) /*owner of transient is hidden*/
#define WIN_STATE_FIXED_POSITION (1<<8) /*window is fixed in position even*/
#define WIN_STATE_ARRANGE_IGNORE (1<<9) /*ignore for auto arranging*/
#define WIN_LAYER_DESKTOP 0
#define WIN_LAYER_BELOW 2
#define WIN_LAYER_NORMAL 4
#define WIN_LAYER_ONTOP 6
#define WIN_LAYER_DOCK 8
#define WIN_LAYER_ABOVE_DOCK 10
#define WIN_LAYER_MENU 12
static Atom _XA_WIN_SUPPORTING_WM_CHECK = 0;
static Atom _XA_WIN_PROTOCOLS;
static Atom _XA_WIN_LAYER;
static Atom _XA_WIN_STATE;
static Atom _XA_WIN_HINTS;
static Atom _XA_WIN_APP_STATE;
static Atom _XA_WIN_EXPANDED_SIZE;
static Atom _XA_WIN_ICONS;
static Atom _XA_WIN_WORKSPACE;
static Atom _XA_WIN_WORKSPACE_COUNT;
static Atom _XA_WIN_WORKSPACE_NAMES;
static Atom _XA_WIN_CLIENT_LIST;
static Atom _XA_WIN_DESKTOP_BUTTON_PROXY;
static void observer(void *self, WMNotification *notif);
static void wsobserver(void *self, WMNotification *notif);
void
wGNOMEInitStuff(WScreen *scr)
{
Atom supportedStuff[10];
int count;
if (!_XA_WIN_SUPPORTING_WM_CHECK) {
_XA_WIN_SUPPORTING_WM_CHECK =
XInternAtom(dpy, "_WIN_SUPPORTING_WM_CHECK", False);
_XA_WIN_PROTOCOLS = XInternAtom(dpy, "_WIN_PROTOCOLS", False);
_XA_WIN_LAYER = XInternAtom(dpy, "_WIN_LAYER", False);
_XA_WIN_STATE = XInternAtom(dpy, "_WIN_STATE", False);
_XA_WIN_HINTS = XInternAtom(dpy, "_WIN_HINTS", False);
_XA_WIN_APP_STATE = XInternAtom(dpy, "_WIN_APP_STATE", False);
_XA_WIN_EXPANDED_SIZE = XInternAtom(dpy, "_WIN_EXPANDED_SIZE", False);
_XA_WIN_ICONS = XInternAtom(dpy, "_WIN_ICONS", False);
_XA_WIN_WORKSPACE = XInternAtom(dpy, "_WIN_WORKSPACE", False);
_XA_WIN_WORKSPACE_COUNT =
XInternAtom(dpy, "_WIN_WORKSPACE_COUNT", False);
_XA_WIN_WORKSPACE_NAMES =
XInternAtom(dpy, "_WIN_WORKSPACE_NAMES", False);
_XA_WIN_CLIENT_LIST = XInternAtom(dpy, "_WIN_CLIENT_LIST", False);
_XA_WIN_DESKTOP_BUTTON_PROXY =
XInternAtom(dpy, "_WIN_DESKTOP_BUTTON_PROXY", False);
}
/* I'd rather use the ICCCM 2.0 mechanisms, but
* since some people prefer to reinvent the wheel instead of
* conforming to standards... */
/* setup the "We're compliant, you idiot!" hint */
/* why XA_CARDINAL instead of XA_WINDOW? */
XChangeProperty(dpy, scr->root_win, _XA_WIN_SUPPORTING_WM_CHECK,
XA_CARDINAL, 32, PropModeReplace,
(unsigned char*)&scr->no_focus_win, 1);
XChangeProperty(dpy, scr->no_focus_win, _XA_WIN_SUPPORTING_WM_CHECK,
XA_CARDINAL, 32, PropModeReplace,
(unsigned char*)&scr->no_focus_win, 1);
/* setup the "desktop button proxy" thing */
XChangeProperty(dpy, scr->root_win, _XA_WIN_DESKTOP_BUTTON_PROXY,
XA_CARDINAL, 32, PropModeReplace,
(unsigned char*)&scr->no_focus_win, 1);
XChangeProperty(dpy, scr->no_focus_win, _XA_WIN_DESKTOP_BUTTON_PROXY,
XA_CARDINAL, 32, PropModeReplace,
(unsigned char*)&scr->no_focus_win, 1);
/* setup the list of supported protocols */
count = 0;
supportedStuff[count++] = _XA_WIN_LAYER;
supportedStuff[count++] = _XA_WIN_STATE;
supportedStuff[count++] = _XA_WIN_HINTS;
supportedStuff[count++] = _XA_WIN_APP_STATE;
supportedStuff[count++] = _XA_WIN_EXPANDED_SIZE;
supportedStuff[count++] = _XA_WIN_ICONS;
supportedStuff[count++] = _XA_WIN_WORKSPACE;
supportedStuff[count++] = _XA_WIN_WORKSPACE_COUNT;
supportedStuff[count++] = _XA_WIN_WORKSPACE_NAMES;
supportedStuff[count++] = _XA_WIN_CLIENT_LIST;
XChangeProperty(dpy, scr->root_win, _XA_WIN_PROTOCOLS, XA_ATOM, 32,
PropModeReplace, (unsigned char*)supportedStuff, count);
XFlush(dpy);
WMAddNotificationObserver(observer, NULL, WMNManaged, NULL);
WMAddNotificationObserver(observer, NULL, WMNUnmanaged, NULL);
WMAddNotificationObserver(observer, NULL, WMNChangedWorkspace, NULL);
WMAddNotificationObserver(observer, NULL, WMNChangedState, NULL);
WMAddNotificationObserver(observer, NULL, WMNChangedFocus, NULL);
WMAddNotificationObserver(observer, NULL, WMNChangedStacking, NULL);
WMAddNotificationObserver(observer, NULL, WMNChangedName, NULL);
WMAddNotificationObserver(wsobserver, NULL, WMNWorkspaceCreated, NULL);
WMAddNotificationObserver(wsobserver, NULL, WMNWorkspaceDestroyed, NULL);
WMAddNotificationObserver(wsobserver, NULL, WMNWorkspaceChanged, NULL);
WMAddNotificationObserver(wsobserver, NULL, WMNWorkspaceNameChanged, NULL);
}
void
wGNOMEUpdateClientListHint(WScreen *scr)
{
WWindow *wwin;
Window *windows;
int count;
windows = malloc(sizeof(Window)*scr->window_count);
if (!windows) {
wwarning(_("out of memory while updating GNOME hints"));
return;
}
count = 0;
wwin = scr->focused_window;
while (wwin) {
if (!wwin->flags.internal_window &&
!wwin->client_flags.skip_window_list) {
windows[count++] = wwin->client_win;
}
wwin = wwin->prev;
}
XChangeProperty(dpy, scr->root_win, _XA_WIN_CLIENT_LIST, XA_CARDINAL, 32,
PropModeReplace, (unsigned char *)windows, count);
wfree(windows);
XFlush(dpy);
}
void
wGNOMEUpdateWorkspaceHints(WScreen *scr)
{
long val;
val = scr->workspace_count;
XChangeProperty(dpy, scr->root_win, _XA_WIN_WORKSPACE_COUNT, XA_CARDINAL,
32, PropModeReplace, (unsigned char*)&val, 1);
wGNOMEUpdateWorkspaceNamesHint(scr);
}
void
wGNOMEUpdateWorkspaceNamesHint(WScreen *scr)
{
char *wsNames[MAX_WORKSPACES];
XTextProperty textProp;
int i;
for (i = 0; i < scr->workspace_count; i++) {
wsNames[i] = scr->workspaces[i]->name;
}
if (XStringListToTextProperty(wsNames, scr->workspace_count, &textProp)) {
XSetTextProperty(dpy, scr->root_win, &textProp,
_XA_WIN_WORKSPACE_NAMES);
XFree(textProp.value);
}
}
void
wGNOMEUpdateCurrentWorkspaceHint(WScreen *scr)
{
long val;
val = scr->current_workspace;
XChangeProperty(dpy, scr->root_win, _XA_WIN_WORKSPACE, XA_CARDINAL,
32, PropModeReplace, (unsigned char*)&val, 1);
}
static int
getWindowLevel(int layer)
{
int level;
if (layer <= WIN_LAYER_DESKTOP)
level = WMDesktopLevel;
else if (layer <= WIN_LAYER_BELOW)
level = WMSunkenLevel;
else if (layer <= WIN_LAYER_NORMAL)
level = WMNormalLevel;
else if (layer <= WIN_LAYER_ONTOP)
level = WMFloatingLevel;
else if (layer <= WIN_LAYER_DOCK)
level = WMDockLevel;
else if (layer <= WIN_LAYER_ABOVE_DOCK)
level = WMSubmenuLevel;
else if (layer <= WIN_LAYER_MENU)
level = WMMainMenuLevel;
else
level = WMOuterSpaceLevel;
return level;
}
Bool
wGNOMECheckClientHints(WWindow *wwin, int *layer, int *workspace)
{
Atom type_ret;
int fmt_ret;
unsigned long nitems_ret;
unsigned long bytes_after_ret;
long flags, val, *data = 0;
Bool hasHints = False;
/* hints */
if (XGetWindowProperty(dpy, wwin->client_win, _XA_WIN_HINTS, 0, 1, False,
/* should be XA_INTEGER, but spec is broken */
XA_CARDINAL, &type_ret, &fmt_ret, &nitems_ret,
&bytes_after_ret,
(unsigned char**)&data)==Success && data) {
flags = *data;
XFree(data);
if (flags & (WIN_HINTS_SKIP_FOCUS|WIN_HINTS_SKIP_WINLIST
|WIN_HINTS_SKIP_TASKBAR)) {
wwin->client_flags.skip_window_list = 1;
}
/* client reserved area, for the panel */
if (flags & (WIN_HINTS_DO_NOT_COVER)) {
WReservedArea *area;
area = malloc(sizeof(WReservedArea));
if (!area) {
wwarning(_("out of memory while updating GNOME hints"));
} else {
XWindowAttributes wattribs;
XGetWindowAttributes(dpy, wwin->client_win, &wattribs);
wClientGetNormalHints(wwin, &wattribs, False,
&area->area.x1, &area->area.y1,
&area->area.x2, &area->area.y2);
area->area.x2 = area->area.x2 + area->area.x1;
area->area.y2 = area->area.y2 + area->area.y1;
area->window = wwin->client_win;
}
area->next = wwin->screen_ptr->reservedAreas;
wwin->screen_ptr->reservedAreas = area;
wScreenUpdateUsableArea(wwin->screen_ptr);
}
hasHints = True;
}
/* layer */
if (XGetWindowProperty(dpy, wwin->client_win, _XA_WIN_LAYER, 0, 1, False,
XA_CARDINAL, &type_ret, &fmt_ret, &nitems_ret,
&bytes_after_ret,
(unsigned char**)&data)==Success && data) {
val = *data;
XFree(data);
*layer = getWindowLevel(val);
hasHints = True;
}
/* workspace */
if (XGetWindowProperty(dpy, wwin->client_win, _XA_WIN_WORKSPACE, 0, 1,
False, XA_CARDINAL, &type_ret, &fmt_ret,
&nitems_ret, &bytes_after_ret,
(unsigned char**)&data)==Success && data) {
val = *data;
XFree(data);
if (val > 0)
*workspace = val;
hasHints = True;
}
/* reserved area */
if (XGetWindowProperty(dpy, wwin->client_win, _XA_WIN_EXPANDED_SIZE, 0, 1,
False, XA_CARDINAL, &type_ret, &fmt_ret,
&nitems_ret, &bytes_after_ret,
(unsigned char**)&data)==Success && data) {
WReservedArea *area;
area = malloc(sizeof(WReservedArea));
if (!area) {
wwarning(_("out of memory while updating GNOME hints"));
} else {
area->area.x1 = data[0];
area->area.y1 = data[1];
area->area.x2 = data[2] - data[0];
area->area.y2 = data[3] - data[1];
XFree(data);
area->window = wwin->client_win;
}
area->next = wwin->screen_ptr->reservedAreas;
wwin->screen_ptr->reservedAreas = area;
wScreenUpdateUsableArea(wwin->screen_ptr);
hasHints = True;
}
return hasHints;
}
Bool
wGNOMEGetUsableArea(WScreen *scr, int head, WArea *area)
{
WReservedArea *cur;
WMRect rect;
if(!scr->reservedAreas)
return False;
area->x1 = area->y1 = area->x2 = area->y2 = 0;
for(cur = scr->reservedAreas ; cur ; cur = cur->next) {
WWindow * wwin = wWindowFor(cur->window);
if (wWindowTouchesHead(wwin, head)) {
if(cur->area.x1 > area->x1)
area->x1 = cur->area.x1;
if(cur->area.y1 > area->y1)
area->y1 = cur->area.y1;
if(cur->area.x2 > area->x2)
area->x2 = cur->area.x2;
if(cur->area.y2 > area->y2)
area->y2 = cur->area.y2;
}
}
if (area->x1==0 && area->x2==0 &&
area->y1==0 && area->y2==0) return False;
rect = wGetRectForHead(scr, head);
area->x1 = rect.pos.x + area->x1;
area->x2 = rect.pos.x + rect.size.width - area->x2;
area->y1 = rect.pos.y + area->y1;
area->y2 = rect.pos.y + rect.size.height - area->y2;
return True;
}
Bool
wGNOMECheckInitialClientState(WWindow *wwin)
{
Atom type_ret;
int fmt_ret;
unsigned long nitems_ret;
unsigned long bytes_after_ret;
long flags, *data = 0;
if (XGetWindowProperty(dpy, wwin->client_win, _XA_WIN_STATE, 0, 1, False,
XA_CARDINAL, &type_ret, &fmt_ret, &nitems_ret,
&bytes_after_ret,
(unsigned char**)&data)!=Success || !data)
return False;
flags = *data;
XFree(data);
if (flags & WIN_STATE_STICKY)
wwin->client_flags.omnipresent = 1;
if (flags & (WIN_STATE_MAXIMIZED_VERT|WIN_STATE_MAXIMIZED_HORIZ)) {
if (flags & WIN_STATE_MAXIMIZED_VERT)
wwin->flags.maximized |= MAX_VERTICAL;
if (flags & WIN_STATE_MAXIMIZED_HORIZ)
wwin->flags.maximized |= MAX_HORIZONTAL;
}
if (flags & WIN_STATE_SHADED)
wwin->flags.shaded = 1;
return True;
}
void
wGNOMEUpdateClientStateHint(WWindow *wwin, Bool changedWorkspace)
{
long val;
long flags = 0;
if (changedWorkspace) {
val = wwin->frame->workspace;
XChangeProperty(dpy, wwin->client_win, _XA_WIN_WORKSPACE, XA_CARDINAL,
32, PropModeReplace, (unsigned char*)&val, 1);
if (val != wwin->screen_ptr->current_workspace)
flags |= WIN_STATE_HID_WORKSPACE;
}
if (IS_OMNIPRESENT(wwin))
flags |= WIN_STATE_STICKY;
if (wwin->flags.miniaturized)
flags |= WIN_STATE_MINIMIZED;
if (wwin->flags.maximized & MAX_VERTICAL)
flags |= WIN_STATE_MAXIMIZED_VERT;
if (wwin->flags.maximized & MAX_HORIZONTAL)
flags |= WIN_STATE_MAXIMIZED_HORIZ;
if (wwin->flags.shaded)
flags |= WIN_STATE_SHADED;
if (wwin->transient_for != None) {
WWindow *owner = wWindowFor(wwin->transient_for);
if (owner && !owner->flags.mapped)
flags |= WIN_STATE_HID_TRANSIENT;
}
/* ? */
if (wwin->flags.hidden)
flags |= WIN_STATE_HIDDEN;
XChangeProperty(dpy, wwin->client_win, _XA_WIN_STATE, XA_CARDINAL,
32, PropModeReplace, (unsigned char*)&flags, 1);
}
Bool
wGNOMEProcessClientMessage(XClientMessageEvent *event)
{
WScreen *scr;
WWindow *wwin;
Bool done = True;
scr = wScreenForWindow(event->window);
if (scr) {
/* generic client messages */
if (event->message_type == _XA_WIN_WORKSPACE) {
wWorkspaceChange(scr, event->data.l[0]);
} else {
done = False;
}
if (done)
return True;
}
/* window specific client messages */
wwin = wWindowFor(event->window);
if (!wwin)
return False;
if (event->message_type == _XA_WIN_LAYER) {
int level = getWindowLevel(event->data.l[0]);
if (WINDOW_LEVEL(wwin) != level) {
ChangeStackingLevel(wwin->frame->core, level);
}
} else if (event->message_type == _XA_WIN_STATE) {
int flags, mask;
int maximize = 0;
mask = event->data.l[0];
flags = event->data.l[1];
if (mask & WIN_STATE_STICKY) {
if ((flags & WIN_STATE_STICKY) != WFLAGP(wwin, omnipresent)) {
wWindowSetOmnipresent(wwin, (flags & WIN_STATE_STICKY)!=0);
}
}
if (mask & WIN_STATE_MAXIMIZED_VERT) {
if (flags & WIN_STATE_MAXIMIZED_VERT)
maximize = MAX_VERTICAL;
else
maximize = 0;
} else {
maximize = wwin->flags.maximized & MAX_VERTICAL;
}
if (mask & WIN_STATE_MAXIMIZED_HORIZ) {
if (flags & WIN_STATE_MAXIMIZED_HORIZ)
maximize |= MAX_HORIZONTAL;
else
maximize |= 0;
} else {
maximize |= wwin->flags.maximized & MAX_HORIZONTAL;
}
if (maximize != wwin->flags.maximized) {
if (maximize) {
wMaximizeWindow(wwin, maximize);
} else {
wUnmaximizeWindow(wwin);
}
}
if (mask & WIN_STATE_SHADED) {
if ((flags & WIN_STATE_SHADED) != wwin->flags.shaded) {
if (wwin->flags.shaded)
wUnshadeWindow(wwin);
else
wShadeWindow(wwin);
}
}
} else if (event->message_type == _XA_WIN_WORKSPACE) {
if (event->data.l[0] != wwin->frame->workspace) {
wWindowChangeWorkspace(wwin, event->data.l[0]);
}
} else {
done = False;
}
return done;
}
Bool
wGNOMEProxyizeButtonEvent(WScreen *scr, XEvent *event)
{
if (event->type == ButtonPress)
XUngrabPointer(dpy, CurrentTime);
XSendEvent(dpy, scr->no_focus_win, False, SubstructureNotifyMask, event);
return True;
}
void
wGNOMERemoveClient(WWindow *wwin)
{
int flag = 0;
WReservedArea *area;
wGNOMEUpdateClientListHint(wwin->screen_ptr);
area = wwin->screen_ptr->reservedAreas;
if (area) {
if (area->window == wwin->client_win) {
wwin->screen_ptr->reservedAreas = area->next;
wfree(area);
flag = 1;
} else {
while (area->next && area->next->window != wwin->client_win)
area = area->next;
if (area->next) {
WReservedArea *next;
next = area->next->next;
wfree(area->next);
area->next = next;
flag = 1;
}
}
}
if (flag) {
wScreenUpdateUsableArea(wwin->screen_ptr);
}
}
static void
observer(void *self, WMNotification *notif)
{
WWindow *wwin = (WWindow*)WMGetNotificationObject(notif);
const char *name = WMGetNotificationName(notif);
if (strcmp(name, WMNManaged) == 0 && wwin) {
wGNOMEUpdateClientStateHint(wwin, True);
wGNOMEUpdateClientListHint(wwin->screen_ptr);
} else if (strcmp(name, WMNUnmanaged) == 0 && wwin) {
wGNOMERemoveClient(wwin);
} else if (strcmp(name, WMNChangedWorkspace) == 0 && wwin) {
wGNOMEUpdateClientStateHint(wwin, True);
} else if (strcmp(name, WMNChangedState) == 0 && wwin) {
wGNOMEUpdateClientStateHint(wwin, False);
}
}
static void
wsobserver(void *self, WMNotification *notif)
{
WScreen *scr = (WScreen*)WMGetNotificationObject(notif);
const char *name = WMGetNotificationName(notif);
if (strcmp(name, WMNWorkspaceCreated) == 0) {
wGNOMEUpdateWorkspaceHints(scr);
} else if (strcmp(name, WMNWorkspaceDestroyed) == 0) {
wGNOMEUpdateWorkspaceHints(scr);
} else if (strcmp(name, WMNWorkspaceNameChanged) == 0) {
wGNOMEUpdateWorkspaceNamesHint(scr);
} else if (strcmp(name, WMNWorkspaceChanged) == 0) {
wGNOMEUpdateCurrentWorkspaceHint(scr);
} else if (strcmp(name, WMNResetStacking) == 0) {
}
}
#endif /* GNOME_STUFF */

View File

@@ -1,53 +0,0 @@
/* gnome.h-- stuff for support for gnome hints
*
* Window Maker window manager
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _GNOME_H_
#define _GNOME_H_
void wGNOMEInitStuff(WScreen *scr);
void wGNOMEUpdateClientListHint(WScreen *scr);
void wGNOMEUpdateWorkspaceHints(WScreen *scr);
void wGNOMEUpdateCurrentWorkspaceHint(WScreen *scr);
void wGNOMEUpdateWorkspaceNamesHint(WScreen *scr);
Bool wGNOMECheckClientHints(WWindow *wwin, int *layer, int *workspace);
void wGNOMEUpdateClientStateHint(WWindow *wwin, Bool changedWorkspace);
Bool wGNOMEProcessClientMessage(XClientMessageEvent *event);
void wGNOMERemoveClient(WWindow *wwin);
Bool wGNOMECheckInitialClientState(WWindow *wwin);
Bool wGNOMEProxyizeButtonEvent(WScreen *scr, XEvent *event);
Bool wGNOMEGetUsableArea(WScreen *scr, int head, WArea *area);
#endif

1955
src/kwm.c

File diff suppressed because it is too large Load Diff

102
src/kwm.h
View File

@@ -1,102 +0,0 @@
/* kde.h-- stuff for support for kde hints
*
* Window Maker window manager
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _KWM_H_
#define _KWM_H_
typedef enum {
KWMStickyFlag = (1<<0),
KWMMaximizedFlag = (1<<1),
KWMIconifiedFlag = (1<<2),
KWMAllFlags = 7
} WKWMStateFlag;
typedef enum {
WKWMAddWindow,
WKWMRemoveWindow,
WKWMFocusWindow,
WKWMRaiseWindow,
WKWMLowerWindow,
WKWMChangedClient,
WKWMIconChange
} WKWMEventMessage;
void wKWMInitStuff(WScreen *scr);
Bool wKWMGetUsableArea(WScreen *scr, int head, WArea *area);
Bool wKWMCheckClientHints(WWindow *wwin, int *layer, int *workspace);
Bool wKWMCheckClientHintChange(WWindow *wwin, XPropertyEvent *event);
Bool wKWMCheckRootHintChange(WScreen *scr, XPropertyEvent *event);
void wKWMUpdateWorkspaceCountHint(WScreen *scr);
void wKWMUpdateWorkspaceNameHint(WScreen *scr, int workspace);
void wKWMUpdateCurrentWorkspaceHint(WScreen *scr);
Bool wKWMProcessClientMessage(XClientMessageEvent *event);
void wKWMUpdateClientGeometryRestore(WWindow *wwin);
void wKWMUpdateClientWorkspace(WWindow *wwin);
void wKWMUpdateClientStateHint(WWindow *wwin, WKWMStateFlag flags);
Bool wKWMManageableClient(WScreen *scr, Window win, char *title);
Bool wKWMCheckClientInitialState(WWindow *wwin);
#ifdef not_used
void wKWMSetUsableAreaHint(WScreen *scr, int workspace);
#endif
void wKWMSetInitializedHint(WScreen *scr);
void wKWMShutdown(WScreen *scr, Bool closeModules);
void wKWMCheckModule(WScreen *scr, Window window);
void wKWMSendWindowCreateMessage(WWindow *wwin, Bool create);
void wKWMSendEventMessage(WWindow *wwin, WKWMEventMessage message);
void wKWMCheckDestroy(XDestroyWindowEvent *event);
void wKWMUpdateActiveWindowHint(WScreen *scr);
void wKWMSendStacking(WScreen *scr, Window module);
void wKWMBroadcastStacking(WScreen *scr);
char *wKWMGetWorkspaceName(WScreen *scr, int workspace);
Bool wKWMGetIconGeometry(WWindow *wwin, WArea *area);
void wKWMSelectRootRegion(WScreen *scr, int x, int y, int w, int h,
Bool control);
#endif

View File

@@ -47,10 +47,6 @@
#include <WINGs/WINGsP.h> #include <WINGs/WINGsP.h>
#ifdef KWM_HINTS
#include "kwm.h"
#endif
/* How many different types of geometry/position /* How many different types of geometry/position
display thingies are there? */ display thingies are there? */
#define NUM_DISPLAYS 5 #define NUM_DISPLAYS 5
@@ -2327,11 +2323,6 @@ wSelectWindows(WScreen *scr, XEvent *ev)
XUngrabPointer(dpy, CurrentTime); XUngrabPointer(dpy, CurrentTime);
selectWindowsInside(scr, x, y, x + w, y + h); selectWindowsInside(scr, x, y, x + w, y + h);
#ifdef KWM_HINTS
wKWMSelectRootRegion(scr, xp, yp, w, h,
event.xbutton.state & ControlMask);
#endif /* KWM_HINTS */
#ifdef DEBUG #ifdef DEBUG
puts("End window selection"); puts("End window selection");
#endif #endif

View File

@@ -1,429 +0,0 @@
/*
* openlook.c - OPEN LOOK (tm) compatibility stuff
*
* Window Maker window manager
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
/*
* Semantics and hint information taken from olwm code
*/
#include "wconfig.h"
#ifdef OLWM_HINTS
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "WindowMaker.h"
#include "wcore.h"
#include "framewin.h"
#include "window.h"
#include "properties.h"
#include "icon.h"
#include "client.h"
#include "funcs.h"
#include "openlook.h"
/* pin states */
#define OL_PIN_OUT 0
#define OL_PIN_IN 1
/* flags */
#define OL_DECORATION_HEADER (1<<0)
#define OL_DECORATION_FOOTER (1<<1)
#define OL_DECORATION_PUSHPIN (1<<2)
#define OL_DECORATION_CLOSEBUTTON (1<<3)
#define OL_DECORATION_RESIZEABLE (1<<4)
#define OL_DECORATION_ICONNAME (1<<5)
#define OL_DECORATION_WARPTOPIN (1<<6)
#define OL_DECORATION_NONE (1<<7)
typedef struct {
long flags;
Atom winType;
Atom menuType;
long pinInitState;
long cancel;
} OLHints;
#define OL_WINTYPE (1<<0)
#define OL_MENUTYPE (1<<1)
#define OL_PINSTATE (1<<2)
#define OL_CANCEL (1<<3)
typedef struct {
unsigned used:1;
unsigned semantic:1;
unsigned semantic_compose:1;
unsigned semantic_capslock:1;
unsigned semantic_numlock:1;
unsigned semantic_scrolllock:1;
} WOLWindowState;
static Atom _XA_SUN_WM_PROTOCOLS = 0;
#ifdef unused
static Bool
getWindowState(Window win, OLWindowState *state)
{
static Atom _XA_SUN_WINDOW_STATE = 0;
unsigned long *data;
if (!_XA_SUN_WINDOW_STATE) {
_XA_SUN_WINDOW_STATE = XInternAtom(dpy, "_SUN_WINDOW_STATE", False);
}
data = (unsigned long*)PropGetCheckProperty(win, _XA_SUN_WINDOW_STATE,
XA_INTEGER, 32, 2, NULL);
if (!data) {
return False;
}
state->flags = data[0];
state->state = data[1];
XFree(data);
return True;
}
#endif
static Bool
getWindowHints(Window window, OLHints *hints)
{
long *data;
int count;
static Atom _XA_OL_WIN_ATTR = 0;
if (!_XA_OL_WIN_ATTR) {
_XA_OL_WIN_ATTR = XInternAtom(dpy, "_OL_WIN_ATTR", False);
}
data = (long*)PropGetCheckProperty(window, _XA_OL_WIN_ATTR,
_XA_OL_WIN_ATTR, 32, 0, &count);
if (!data)
return False;
if (count == 3) {
/* old format */
hints->flags = OL_WINTYPE|OL_MENUTYPE|OL_PINSTATE;
hints->winType = data[0];
hints->menuType = data[1];
hints->pinInitState = data[2];
hints->cancel = 0;
} else if (count == 5) {
/* new format */
hints->flags = data[0];
hints->winType = data[1];
hints->menuType = data[2];
hints->pinInitState = data[3];
hints->cancel = data[4];
} else {
XFree(data);
return False;
}
XFree(data);
/* do backward compatibility stuff */
if (hints->flags & OL_PINSTATE) {
static Atom pinIn = 0, pinOut;
if (!pinIn) {
pinIn = XInternAtom(dpy, "_OL_PIN_IN", False);
pinOut = XInternAtom(dpy, "_OL_PIN_OUT", False);
}
if (hints->pinInitState == pinIn)
hints->pinInitState = OL_PIN_IN;
else if (hints->pinInitState == pinOut)
hints->pinInitState = OL_PIN_OUT;
}
return True;
}
static void
applyDecorationHints(Window win, int *flags)
{
Atom *atoms;
static Atom _XA_OL_DECOR_ADD = 0;
static Atom _XA_OL_DECOR_DEL = 0;
static Atom _XA_CLOSE, _XA_FOOTER, _XA_RESIZE, _XA_HEADER, _XA_PIN,
_XA_ICONNAME;
int count;
int i;
if (!_XA_OL_DECOR_DEL) {
_XA_OL_DECOR_ADD = XInternAtom(dpy, "_OL_DECOR_ADD", False);
_XA_OL_DECOR_DEL = XInternAtom(dpy, "_OL_DECOR_DEL", False);
_XA_CLOSE = XInternAtom(dpy, "_OL_DECOR_CLOSE", False);
_XA_FOOTER = XInternAtom(dpy, "_OL_DECOR_FOOTER", False);
_XA_RESIZE = XInternAtom(dpy, "_OL_DECOR_RESIZE", False);
_XA_HEADER = XInternAtom(dpy, "_OL_DECOR_HEADER", False);
_XA_PIN = XInternAtom(dpy, "_OL_DECOR_PIN", False);
_XA_ICONNAME = XInternAtom(dpy, "_OL_DECOR_ICON_NAME", False);
}
atoms = (Atom*)PropGetCheckProperty(win, _XA_OL_DECOR_ADD, XA_ATOM, 32, 0,
&count);
if (atoms) {
for (i=0; i < count; i++) {
if (atoms[i] == _XA_CLOSE)
*flags |= OL_DECORATION_CLOSEBUTTON;
else if (atoms[i] == _XA_FOOTER)
*flags |= OL_DECORATION_FOOTER;
else if (atoms[i] == _XA_RESIZE)
*flags |= OL_DECORATION_RESIZEABLE;
else if (atoms[i] == _XA_HEADER)
*flags |= OL_DECORATION_HEADER;
else if (atoms[i] == _XA_PIN)
*flags |= OL_DECORATION_PUSHPIN;
else if (atoms[i] == _XA_ICONNAME)
*flags |= OL_DECORATION_ICONNAME;
}
XFree(atoms);
}
atoms = (Atom*)PropGetCheckProperty(win, _XA_OL_DECOR_DEL, XA_ATOM, 32, 0,
&count);
if (atoms) {
for (i=0; i < count; i++) {
if (atoms[i] == _XA_CLOSE)
*flags &= ~OL_DECORATION_CLOSEBUTTON;
else if (atoms[i] == _XA_FOOTER)
*flags &= ~OL_DECORATION_FOOTER;
else if (atoms[i] == _XA_RESIZE)
*flags &= ~OL_DECORATION_RESIZEABLE;
else if (atoms[i] == _XA_HEADER)
*flags &= ~OL_DECORATION_HEADER;
else if (atoms[i] == _XA_PIN)
*flags &= ~OL_DECORATION_PUSHPIN;
else if (atoms[i] == _XA_ICONNAME)
*flags &= ~OL_DECORATION_ICONNAME;
}
XFree(atoms);
}
}
void
wOLWMInitStuff(WScreen *scr)
{
static Atom _SUN_OL_WIN_ATTR_5;
if (!_XA_SUN_WM_PROTOCOLS) {
_XA_SUN_WM_PROTOCOLS = XInternAtom(dpy, "_SUN_WM_PROTOCOLS", False);
_SUN_OL_WIN_ATTR_5 = XInternAtom(dpy, "_SUN_OL_WIN_ATTR_5", False);
}
XChangeProperty(dpy, scr->root_win, _XA_SUN_WM_PROTOCOLS, XA_ATOM, 32,
PropModeReplace, (unsigned char*)&_SUN_OL_WIN_ATTR_5, 1);
}
void
wOLWMChangePushpinState(WWindow *wwin, Bool state)
{
static Atom pinState = 0;
if (!pinState) {
pinState = XInternAtom(dpy, "_OL_PIN_STATE", False);
}
XChangeProperty(dpy, wwin->client_win, pinState, XA_INTEGER, 32,
PropModeReplace, (unsigned char *)&state, 1);
}
void
wOLWMShutdown(WScreen *scr)
{
XDeleteProperty(dpy, scr->root_win, _XA_SUN_WM_PROTOCOLS);
}
#ifdef unfinished
void
wOLWMUpdateWindowState(WWindow *wwin)
{
if (wwin->ol_window_state.used) {
if (wwin->ol_window_state.semantic) {
if (wwin->ol_window_state.semantic_compose)
setComposeLed(True);
else
setComposeLed(False);
}
} else {
setComposeLed(False);
}
}
#endif /* unfinished */
void
wOLWMCheckClientHints(WWindow *wwin)
{
OLHints hints;
static Atom WT_BASE = 0, WT_CMD, WT_NOTICE, WT_HELP, WT_OTHER;
static Atom MT_FULL, MT_LIMITED, MT_NONE;
int decoration;
int pinInitState = OL_PIN_IN;
Atom menuType;
if (!WT_BASE) {
WT_BASE = XInternAtom(dpy, "_OL_WT_BASE", False);
WT_CMD = XInternAtom(dpy, "_OL_WT_CMD", False);
WT_NOTICE = XInternAtom(dpy, "_OL_WT_NOTICE", False);
WT_HELP = XInternAtom(dpy, "_OL_WT_HELP", False);
WT_OTHER = XInternAtom(dpy, "_OL_WT_OTHER", False);
MT_FULL = XInternAtom(dpy, "_OL_MENU_FULL", False);
MT_LIMITED = XInternAtom(dpy, "_OL_MENU_LIMITED", False);
MT_NONE = XInternAtom(dpy, "_OL_NONE", False);
}
/* get attributes */
if (!getWindowHints(wwin->client_win, &hints) ||
!(hints.flags & OL_WINTYPE)) {
decoration = OL_DECORATION_CLOSEBUTTON|OL_DECORATION_RESIZEABLE
|OL_DECORATION_HEADER|OL_DECORATION_ICONNAME;
menuType = MT_FULL;
} else {
if (hints.winType == WT_BASE) {
decoration = OL_DECORATION_CLOSEBUTTON|OL_DECORATION_RESIZEABLE
|OL_DECORATION_HEADER|OL_DECORATION_ICONNAME;
menuType = MT_FULL;
} else if (hints.winType == WT_CMD) {
decoration = OL_DECORATION_PUSHPIN|OL_DECORATION_RESIZEABLE
|OL_DECORATION_HEADER|OL_DECORATION_ICONNAME;
menuType = MT_LIMITED;
/* this is a transient-like window */
wwin->client_flags.olwm_transient = 1;
} else if (hints.winType == WT_NOTICE) {
decoration = OL_DECORATION_ICONNAME;
menuType = MT_NONE;
} else if (hints.winType == WT_HELP) {
decoration = OL_DECORATION_PUSHPIN|OL_DECORATION_HEADER
|OL_DECORATION_ICONNAME|OL_DECORATION_WARPTOPIN;
menuType = MT_LIMITED;
} else if (hints.winType == WT_OTHER) {
decoration = OL_DECORATION_ICONNAME;
menuType = MT_NONE;
if (hints.flags & OL_MENUTYPE) {
menuType = hints.menuType;
}
}
if (hints.flags & OL_PINSTATE) {
pinInitState = hints.pinInitState;
} else {
pinInitState = OL_PIN_OUT;
}
}
/* mask attributes with decoration hints */
applyDecorationHints(wwin->client_win, &decoration);
if ((decoration & OL_DECORATION_CLOSEBUTTON)
&& (decoration & OL_DECORATION_PUSHPIN))
decoration &= ~OL_DECORATION_CLOSEBUTTON;
if (!(decoration & OL_DECORATION_PUSHPIN))
decoration &= ~OL_DECORATION_WARPTOPIN;
/* map the hints to our attributes */
if (menuType == MT_FULL)
wwin->flags.olwm_limit_menu = 0;
else
wwin->flags.olwm_limit_menu = 1;
/*
* Emulate olwm pushpin.
* If the initial state of the pin is in, then put the normal close
* button. If not, make the close button different and when the
* user moves the window or clicks in the close button, turn it
* into a normal close button.
*/
if ((decoration & OL_DECORATION_PUSHPIN) && pinInitState==OL_PIN_OUT) {
wwin->flags.olwm_push_pin_out = 1;
wOLWMChangePushpinState(wwin, False);
} else {
wOLWMChangePushpinState(wwin, True);
}
if (!(decoration & OL_DECORATION_RESIZEABLE)) {
wwin->client_flags.no_resizable = 1;
wwin->client_flags.no_resizebar = 1;
}
if (decoration & OL_DECORATION_WARPTOPIN) {
wwin->client_flags.olwm_warp_to_pin = 1;
}
}
#endif

View File

@@ -1,37 +0,0 @@
/*
* openlook.h - OPEN LOOK (tm) compatibility stuff
*
* Window Maker window manager
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef _OPENLOOK_H_
#define _OPENLOOK_H_
void wOLWMInitStuff(WScreen *scr);
void wOLWMShutdown(WScreen *scr);
void wOLWMCheckClientHints(WWindow *wwin);
void wOLWMChangePushpinState(WWindow *wwin, Bool state);
#endif

View File

@@ -373,10 +373,6 @@ PropCleanUp(Window root)
XDeleteProperty(dpy, root, _XA_WINDOWMAKER_NOTICEBOARD); XDeleteProperty(dpy, root, _XA_WINDOWMAKER_NOTICEBOARD);
XDeleteProperty(dpy, root, XA_WM_ICON_SIZE); XDeleteProperty(dpy, root, XA_WM_ICON_SIZE);
#ifdef KWM_HINTS
XDeleteProperty(dpy, root, XInternAtom(dpy, "KWM_RUNNING", False));
#endif
} }

View File

@@ -53,15 +53,6 @@
#include "session.h" #include "session.h"
#include "balloon.h" #include "balloon.h"
#include "geomview.h" #include "geomview.h"
#ifdef KWM_HINTS
# include "kwm.h"
#endif
#ifdef GNOME_STUFF
# include "gnome.h"
#endif
#ifdef OLWM_HINTS
# include "openlook.h"
#endif
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
# include "wmspec.h" # include "wmspec.h"
#endif #endif
@@ -778,18 +769,6 @@ wScreenInit(int screen_number)
createInternalWindows(scr); createInternalWindows(scr);
#ifdef KWM_HINTS
wKWMInitStuff(scr);
#endif
#ifdef GNOME_STUFF
wGNOMEInitStuff(scr);
#endif
#ifdef OLWM_HINTS
wOLWMInitStuff(scr);
#endif
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
wNETWMInitStuff(scr); wNETWMInitStuff(scr);
#endif #endif
@@ -892,30 +871,6 @@ wScreenUpdateUsableArea(WScreen *scr)
} }
#endif #endif
#ifdef GNOME_STUFF
{
WArea area;
if (wGNOMEGetUsableArea(scr, i, &area)) {
scr->totalUsableArea[i].x1 = WMAX(scr->totalUsableArea[i].x1, area.x1);
scr->totalUsableArea[i].y1 = WMAX(scr->totalUsableArea[i].y1, area.y1);
scr->totalUsableArea[i].x2 = WMIN(scr->totalUsableArea[i].x2, area.x2);
scr->totalUsableArea[i].y2 = WMIN(scr->totalUsableArea[i].y2, area.y2);
}
}
#endif
#ifdef KWM_HINTS
{
WArea area;
if (wKWMGetUsableArea(scr, i, &area)) {
scr->totalUsableArea[i].x1 = WMAX(scr->totalUsableArea[i].x1, area.x1);
scr->totalUsableArea[i].y1 = WMAX(scr->totalUsableArea[i].y1, area.y1);
scr->totalUsableArea[i].x2 = WMIN(scr->totalUsableArea[i].x2, area.x2);
scr->totalUsableArea[i].y2 = WMIN(scr->totalUsableArea[i].y2, area.y2);
}
}
#endif
scr->usableArea[i] = scr->totalUsableArea[i]; scr->usableArea[i] = scr->totalUsableArea[i];
#if 0 #if 0
@@ -1033,64 +988,6 @@ wScreenUpdateUsableArea(WScreen *scr)
} }
#endif #endif
#ifdef KWM_HINTS
{
WArea area;
if (wKWMGetUsableArea(scr, &area)) {
scr->totalUsableArea.x1 = WMAX(scr->totalUsableArea.x1, area.x1);
scr->totalUsableArea.y1 = WMAX(scr->totalUsableArea.y1, area.y1);
scr->totalUsableArea.x2 = WMIN(scr->totalUsableArea.x2, area.x2);
scr->totalUsableArea.y2 = WMIN(scr->totalUsableArea.y2, area.y2);
}
}
#endif
#ifdef GNOME_STUFF
{
WReservedArea *area = scr->reservedAreas;
while (area) {
int th, bh;
int lw, rw;
int w, h;
w = area->area.x2 - area->area.x1;
h = area->area.y2 - area->area.y1;
th = area->area.y1;
bh = scr->scr_height - area->area.y2;
lw = area->area.x1;
rw = scr->scr_width - area->area.x2;
if (WMIN(th, bh) <= WMIN(lw, rw)) {
/* horizontal */
if (th < bh) {
/* on top */
if (scr->totalUsableArea.y1 < area->area.y2)
scr->totalUsableArea.y1 = area->area.y2;
} else {
/* on bottom */
if (scr->totalUsableArea.y2 > area->area.y1)
scr->totalUsableArea.y2 = area->area.y1;
}
} else {
/* vertical */
if (lw < rw) {
/* on left */
if (scr->totalUsableArea.x1 < area->area.x2)
scr->totalUsableArea.x1 = area->area.x2;
} else {
/* on right */
if (scr->totalUsableArea.x2 > area->area.x1)
scr->totalUsableArea.x2 = area->area.x1;
}
}
area = area->next;
}
}
#endif /* GNOME_STUFF */
if (scr->totalUsableArea.x2 - scr->totalUsableArea.x1 < scr->scr_width/2) { if (scr->totalUsableArea.x2 - scr->totalUsableArea.x1 < scr->scr_width/2) {
scr->totalUsableArea.x2 = scr->usableArea.x2; scr->totalUsableArea.x2 = scr->usableArea.x2;
scr->totalUsableArea.x1 = scr->usableArea.x1; scr->totalUsableArea.x1 = scr->usableArea.x1;
@@ -1100,18 +997,6 @@ wScreenUpdateUsableArea(WScreen *scr)
scr->totalUsableArea.y1 = scr->usableArea.y1; scr->totalUsableArea.y1 = scr->usableArea.y1;
} }
#ifdef not_used
#ifdef KWM_HINTS
{
int i;
for (i = 0; i < scr->workspace_count; i++) {
wKWMSetUsableAreaHint(scr, i);
}
}
#endif
#endif
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
wNETWMUpdateWorkarea(scr); wNETWMUpdateWorkarea(scr);
#endif #endif

View File

@@ -299,10 +299,6 @@ typedef struct _WScreen {
char *xdestring; char *xdestring;
#endif #endif
#ifdef KWM_HINTS
Window kwm_dock;
#endif
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
struct NetData *netdata; struct NetData *netdata;
#endif #endif
@@ -327,10 +323,6 @@ typedef struct _WScreen {
unsigned int doing_alt_tab:1; unsigned int doing_alt_tab:1;
unsigned int jump_back_pending:1; unsigned int jump_back_pending:1;
unsigned int ignore_focus_events:1; unsigned int ignore_focus_events:1;
#ifdef KWM_HINTS
unsigned int kwm_syncing_name:1;
unsigned int kwm_syncing_count:1;
#endif
} flags; } flags;
} WScreen; } WScreen;

View File

@@ -36,12 +36,6 @@
#include "properties.h" #include "properties.h"
#include "session.h" #include "session.h"
#include "winspector.h" #include "winspector.h"
#ifdef KWM_HINTS
# include "kwm.h"
#endif
#ifdef OLWM_HINTS
# include "openlook.h"
#endif
extern Atom _XA_WM_DELETE_WINDOW; extern Atom _XA_WM_DELETE_WINDOW;
extern Time LastTimestamp; extern Time LastTimestamp;
@@ -105,9 +99,6 @@ Shutdown(WShutdownMode mode)
#endif #endif
wSessionSaveClients(scr); wSessionSaveClients(scr);
#ifdef KWM_HINTS
wKWMShutdown(scr, True);
#endif
wScreenSaveState(scr); wScreenSaveState(scr);
if (mode == WSKillMode) if (mode == WSKillMode)
@@ -128,14 +119,7 @@ Shutdown(WShutdownMode mode)
if (scr) { if (scr) {
if (scr->helper_pid) if (scr->helper_pid)
kill(scr->helper_pid, SIGKILL); kill(scr->helper_pid, SIGKILL);
#ifdef KWM_HINTS
wKWMShutdown(scr, False);
#endif
#ifdef OLWM_HINTS
wOLWMShutdown(scr);
#endif
wScreenSaveState(scr); wScreenSaveState(scr);
RestoreDesktop(scr); RestoreDesktop(scr);
} }
} }

View File

@@ -64,10 +64,6 @@
#include "xutil.h" #include "xutil.h"
#ifdef KWM_HINTS
#include "kwm.h"
#endif
#if 0 #if 0
#ifdef SYS_SIGLIST_DECLARED #ifdef SYS_SIGLIST_DECLARED
extern const char * const sys_siglist[]; extern const char * const sys_siglist[];
@@ -882,10 +878,6 @@ StartUp(Bool defaultScreenOnly)
} else { } else {
wSessionRestoreLastWorkspace(wScreen[j]); wSessionRestoreLastWorkspace(wScreen[j]);
} }
#ifdef KWM_HINTS
wKWMSetInitializedHint(wScreen[j]);
#endif
} }
if (wScreenCount == 0) { if (wScreenCount == 0) {
@@ -965,9 +957,6 @@ manageAllWindows(WScreen *scr, int crashRecovery)
if (children[i] == None) if (children[i] == None)
continue; continue;
#ifdef KWM_HINTS
wKWMCheckModule(scr, children[i]);
#endif
wwin = wManageWindow(scr, children[i]); wwin = wManageWindow(scr, children[i]);
if (wwin) { if (wwin) {
/* apply states got from WSavedState */ /* apply states got from WSavedState */

View File

@@ -68,9 +68,7 @@
/* /*
* support for XDND drop in the Dock. Experimental * support for XDND drop in the Dock. Experimental
*/ */
#ifdef GNOME_STUFF /*#define XDND*/
#define XDND
#endif
/* /*
* support for Motif window manager (mwm) window hints * support for Motif window manager (mwm) window hints
@@ -534,12 +532,7 @@
#define MAX_ICON_WIDTH 60 /* size of the icon pixmap */ #define MAX_ICON_WIDTH 60 /* size of the icon pixmap */
#define MAX_ICON_HEIGHT 48 #define MAX_ICON_HEIGHT 48
/* KDE may have problems with more than 32 workspaces */ #define MAX_WORKSPACES 100
#ifdef KWM_HINTS
# define MAX_WORKSPACES 32
#else
# define MAX_WORKSPACES 100
#endif
#define MAX_MENU_TEXT_LENGTH 512 #define MAX_MENU_TEXT_LENGTH 512

View File

@@ -59,15 +59,6 @@
#ifdef MWM_HINTS #ifdef MWM_HINTS
# include "motif.h" # include "motif.h"
#endif #endif
#ifdef KWM_HINTS
# include "kwm.h"
#endif
#ifdef GNOME_STUFF
# include "gnome.h"
#endif
#ifdef OLWM_HINTS
# include "openlook.h"
#endif
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
# include "wmspec.h" # include "wmspec.h"
#endif #endif
@@ -443,20 +434,6 @@ wWindowSetupInitialAttributes(WWindow *wwin, int *level, int *workspace)
check = wNETWMCheckClientHints(wwin, &tmp_level, &tmp_workspace); check = wNETWMCheckClientHints(wwin, &tmp_level, &tmp_workspace);
#endif #endif
#ifdef GNOME_STUFF
if (!check)
check = wGNOMECheckClientHints(wwin, &tmp_level, &tmp_workspace);
#endif /* GNOME_STUFF */
#ifdef KWM_HINTS
if (!check)
check = wKWMCheckClientHints(wwin, &tmp_level, &tmp_workspace);
#endif /* KWM_HINTS */
#ifdef OLWM_HINTS
wOLWMCheckClientHints(wwin);
#endif /* OLWM_HINTS */
/* window levels are between INT_MIN+1 and INT_MAX, so if we still /* window levels are between INT_MIN+1 and INT_MAX, so if we still
* have INT_MIN that means that no window level was requested. -Dan * have INT_MIN that means that no window level was requested. -Dan
*/ */
@@ -749,15 +726,6 @@ wManageWindow(WScreen *scr, Window window)
title = NULL; title = NULL;
} }
#ifdef KWM_HINTS
if (title && !wKWMManageableClient(scr, window, title)) {
XFree(title);
XUngrabServer(dpy);
return NULL;
}
#endif /* KWM_HINTS */
wwin = wWindowCreate(); wwin = wWindowCreate();
XSaveContext(dpy, window, wWinContext, (XPointer)&wwin->client_descriptor); XSaveContext(dpy, window, wWinContext, (XPointer)&wwin->client_descriptor);
@@ -882,24 +850,6 @@ wManageWindow(WScreen *scr, Window window)
wWindowSetupInitialAttributes(wwin, &window_level, &workspace); wWindowSetupInitialAttributes(wwin, &window_level, &workspace);
#ifdef OLWM_HINTS
if (wwin->client_flags.olwm_transient && wwin->transient_for==None
&& wwin->group_id != None && wwin->group_id != window) {
transientOwner = wWindowFor(wwin->group_id);
if (transientOwner) {
wwin->transient_for = wwin->group_id;
/* transients can't be iconified or maximized */
if (wwin->transient_for) {
WSETUFLAG(wwin, no_miniaturizable, 1);
WSETUFLAG(wwin, no_miniaturize_button, 1);
}
}
}
#endif /* OLWM_HINTS */
/* Make broken apps behave as a nice app. */ /* Make broken apps behave as a nice app. */
if (WFLAGP(wwin, emulate_appicon)) { if (WFLAGP(wwin, emulate_appicon)) {
wwin->main_window = wwin->client_win; wwin->main_window = wwin->client_win;
@@ -1023,24 +973,9 @@ wManageWindow(WScreen *scr, Window window)
wwin->flags.maximized = MAX_VERTICAL|MAX_HORIZONTAL; wwin->flags.maximized = MAX_VERTICAL|MAX_HORIZONTAL;
} }
{
#if defined(NETWM_HINTS) || defined(GNOME_STUFF) || defined(KWM_HINTS)
Bool bla = False;
#endif
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
if (!bla) wNETWMCheckInitialClientState(wwin);
bla = wNETWMCheckInitialClientState(wwin);
#endif #endif
#ifdef GNOME_STUFF
if (!bla)
bla = wGNOMECheckInitialClientState(wwin);
#endif
#ifdef KWM_HINTS
if (!bla)
bla = wKWMCheckClientInitialState(wwin);
#endif
}
/* apply previous state if it exists and we're in startup */ /* apply previous state if it exists and we're in startup */
if (scr->flags.startup && wm_state >= 0) { if (scr->flags.startup && wm_state >= 0) {
@@ -1371,16 +1306,6 @@ wManageWindow(WScreen *scr, Window window)
wwin->frame->child = wwin; wwin->frame->child = wwin;
#ifdef OLWM_HINTS
/* emulate olwm push pin. Make the button look as pushed-in for
* the pinned-out state. When the button is clicked, it will
* revert to the normal position, which means the pin is pinned-in.
*/
if (wwin->flags.olwm_push_pin_out)
wFrameWindowUpdatePushButton(wwin->frame, True);
#endif /* OLWM_HINTS */
wwin->frame->workspace = workspace; wwin->frame->workspace = workspace;
wwin->frame->on_click_left = windowIconifyClick; wwin->frame->on_click_left = windowIconifyClick;
@@ -1611,16 +1536,6 @@ wManageWindow(WScreen *scr, Window window)
wColormapInstallForWindow(scr, scr->cmap_window); wColormapInstallForWindow(scr, scr->cmap_window);
#ifdef OLWM_HINTS
if (wwin->client_flags.olwm_warp_to_pin && wwin->frame->titlebar != NULL
&& !WFLAGP(wwin, no_close_button) && !withdraw) {
XWarpPointer(dpy, None, None, 0, 0, 0, 0,
wwin->frame_x + width - wwin->frame->titlebar->height * 2,
wwin->frame_y);
}
#endif
/* /*
*------------------------------------------------------------ *------------------------------------------------------------
* Setup Notification Observers * Setup Notification Observers
@@ -2328,9 +2243,6 @@ wWindowSynthConfigureNotify(WWindow *wwin)
sevent.xconfigure.override_redirect = False; sevent.xconfigure.override_redirect = False;
XSendEvent(dpy, wwin->client_win, False, StructureNotifyMask, &sevent); XSendEvent(dpy, wwin->client_win, False, StructureNotifyMask, &sevent);
#ifdef KWM_HINTS
wKWMSendEventMessage(wwin, WKWMChangedClient);
#endif
XFlush(dpy); XFlush(dpy);
} }
@@ -3354,18 +3266,6 @@ windowCloseClick(WCoreWindow *sender, void *data, XEvent *event)
if (event->xbutton.state & ControlMask) { if (event->xbutton.state & ControlMask) {
wClientKill(wwin); wClientKill(wwin);
} else { } else {
#ifdef OLWM_HINTS
if (wwin->flags.olwm_push_pin_out) {
wwin->flags.olwm_push_pin_out = 0;
wOLWMChangePushpinState(wwin, True);
wFrameWindowUpdatePushButton(wwin->frame, False);
return;
}
#endif
if (wwin->protocols.DELETE_WINDOW && event->xbutton.state==0) { if (wwin->protocols.DELETE_WINDOW && event->xbutton.state==0) {
/* send delete message */ /* send delete message */
wClientSendProtocol(wwin, _XA_WM_DELETE_WINDOW, LastTimestamp); wClientSendProtocol(wwin, _XA_WM_DELETE_WINDOW, LastTimestamp);

View File

@@ -146,12 +146,6 @@ typedef struct {
*/ */
unsigned int emulate_appicon:1; unsigned int emulate_appicon:1;
/* toolkit specific attribute flags. These are unchangeable and
* unconfigurable and must not be saved as state. */
#ifdef OLWM_HINTS
unsigned int olwm_transient:1;
unsigned int olwm_warp_to_pin:1;
#endif
} WWindowAttributes; } WWindowAttributes;
@@ -250,10 +244,6 @@ typedef struct WWindow {
FocusMode focus_mode; /* type of keyboard input focus */ FocusMode focus_mode; /* type of keyboard input focus */
#ifdef OLWM_HINTS_unfinished
struct WOLWindowState ol_window_state;
#endif
long event_mask; /* the event mask thats selected */ long event_mask; /* the event mask thats selected */
#ifdef MONITOR_HEARTBEAT #ifdef MONITOR_HEARTBEAT
@@ -309,15 +299,6 @@ typedef struct WWindow {
unsigned int user_changed_height:1; unsigned int user_changed_height:1;
unsigned int wm_name_changed:1; unsigned int wm_name_changed:1;
#ifdef KWM_HINTS
unsigned int kwm_hidden_for_modules:1;
unsigned int kwm_managed:1;
unsigned int kwm_menubar:1;
#endif
#ifdef OLWM_HINTS
unsigned int olwm_push_pin_out:1;/* emulate pushpin behaviour */
unsigned int olwm_limit_menu:1;
#endif
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
unsigned int net_state_from_client:1; /* state hint was set by client */ unsigned int net_state_from_client:1; /* state hint was set by client */
unsigned int net_skip_pager:1; unsigned int net_skip_pager:1;

View File

@@ -47,9 +47,6 @@
#include "actions.h" #include "actions.h"
#include "workspace.h" #include "workspace.h"
#include "appicon.h" #include "appicon.h"
#ifdef KWM_HINTS
#include "kwm.h"
#endif
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
#include "wmspec.h" #include "wmspec.h"
#endif #endif
@@ -105,11 +102,6 @@ wWorkspaceNew(WScreen *scr)
wspace = wmalloc(sizeof(WWorkspace)); wspace = wmalloc(sizeof(WWorkspace));
wspace->name = NULL; wspace->name = NULL;
#ifdef KWM_HINTS
if (scr->flags.kwm_syncing_count) {
wspace->name = wKWMGetWorkspaceName(scr, scr->workspace_count-1);
}
#endif
if (!wspace->name) { if (!wspace->name) {
wspace->name = wmalloc(strlen(_("Workspace %i"))+8); wspace->name = wmalloc(strlen(_("Workspace %i"))+8);
sprintf(wspace->name, _("Workspace %i"), scr->workspace_count); sprintf(wspace->name, _("Workspace %i"), scr->workspace_count);
@@ -635,10 +627,8 @@ wWorkspaceForceChange(WScreen *scr, int workspace)
} }
} }
#if defined KWM_HINTS || defined NETWM_HINTS
wScreenUpdateUsableArea(scr);
#endif
#ifdef NETWM_HINTS #ifdef NETWM_HINTS
wScreenUpdateUsableArea(scr);
wNETWMUpdateDesktop(scr); wNETWMUpdateDesktop(scr);
#endif #endif