1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

*** empty log message ***

This commit is contained in:
kojima
1999-04-10 19:32:34 +00:00
parent 4a473b8ad7
commit 7e07b7b5b9
25 changed files with 3056 additions and 1740 deletions

View File

@@ -12,6 +12,10 @@ Changes since version 0.52.0:
- fixed crash bug when hiding apps with appicon disabled - fixed crash bug when hiding apps with appicon disabled
- fixed wrong initial workspace # being shown on attributes panel - fixed wrong initial workspace # being shown on attributes panel
- XSMP updates - XSMP updates
- update colorpanel
- applied WMSound patch from "Quinn, Anthony" <Anthony.Quinn@usa.xerox.com>
- fixed focus bug with unfocusable window (I swear I had fixed that before...)
- applied windoze cycle patch from Paul Warren <pdw@ferret.lmh.ox.ac.uk>
Changes since version 0.51.2: Changes since version 0.51.2:
............................. .............................

View File

@@ -97,9 +97,9 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ./src/config.h CONFIG_HEADER = ./src/config.h
CONFIG_CLEAN_FILES = CONFIG_CLEAN_FILES =
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
Makefile.in NEWS TODO acconfig.h acinclude.m4 aclocal.m4 config.guess \ Makefile.in NEWS TODO acinclude.m4 aclocal.m4 config.guess config.sub \
config.sub configure configure.in install-sh ltconfig ltmain.sh missing \ configure configure.in install-sh ltconfig ltmain.sh missing \
mkinstalldirs src/config.h.in src/stamp-h.in mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
@@ -123,34 +123,6 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF) cd $(srcdir) && $(AUTOCONF)
src/config.h: src/stamp-h
@if test ! -f $@; then \
rm -f src/stamp-h; \
$(MAKE) src/stamp-h; \
else :; fi
src/stamp-h: $(srcdir)/src/config.h.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=src/config.h \
$(SHELL) ./config.status
@echo timestamp > src/stamp-h 2> /dev/null
$(srcdir)/src/config.h.in: $(srcdir)/src/stamp-h.in
@if test ! -f $@; then \
rm -f $(srcdir)/src/stamp-h.in; \
$(MAKE) $(srcdir)/src/stamp-h.in; \
else :; fi
$(srcdir)/src/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/src/stamp-h.in 2> /dev/null
mostlyclean-hdr:
clean-hdr:
distclean-hdr:
-rm -f src/config.h
maintainer-clean-hdr:
# This directory's subdirectories are mostly independent; you can cd # This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile. # into them and run `make' without going through this Makefile.
# To change the values of `make' variables: instead of editing Makefiles, # To change the values of `make' variables: instead of editing Makefiles,
@@ -340,33 +312,33 @@ distclean-generic:
-rm -f config.cache config.log stamp-h stamp-h[0-9]* -rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic: maintainer-clean-generic:
mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic mostlyclean-am: mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive mostlyclean: mostlyclean-recursive
clean-am: clean-hdr clean-tags clean-generic mostlyclean-am clean-am: clean-tags clean-generic mostlyclean-am
clean: clean-recursive clean: clean-recursive
distclean-am: distclean-hdr distclean-tags distclean-generic clean-am distclean-am: distclean-tags distclean-generic clean-am
-rm -f libtool -rm -f libtool
distclean: distclean-recursive distclean: distclean-recursive
-rm -f config.status -rm -f config.status
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \ maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
maintainer-clean-generic distclean-am distclean-am
@echo "This command is intended for maintainers to use;" @echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-recursive maintainer-clean: maintainer-clean-recursive
-rm -f config.status -rm -f config.status
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ .PHONY: install-data-recursive uninstall-data-recursive \
install-data-recursive uninstall-data-recursive install-exec-recursive \ install-exec-recursive uninstall-exec-recursive installdirs-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ uninstalldirs-recursive all-recursive check-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \ installcheck-recursive info-recursive dvi-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ dvi-am dvi check check-am installcheck-am installcheck install-exec-am \

File diff suppressed because it is too large Load Diff

View File

@@ -7,6 +7,9 @@ CLEANFILES = $(CATALOGS)
EXTRA_DIST = pt.po hr.po fr.po ko.po cs.po ja.po zh_TW.Big5.po es.po EXTRA_DIST = pt.po hr.po fr.po ko.po cs.po ja.po zh_TW.Big5.po es.po
POTFILES = \ POTFILES = \
$(top_builddir)/WPrefs.app/main.c \
$(top_builddir)/WPrefs.app/WPrefs.c \
$(top_builddir)/WPrefs.app/Appearance.c \
$(top_builddir)/WPrefs.app/Configurations.c \ $(top_builddir)/WPrefs.app/Configurations.c \
$(top_builddir)/WPrefs.app/Expert.c \ $(top_builddir)/WPrefs.app/Expert.c \
$(top_builddir)/WPrefs.app/Focus.c \ $(top_builddir)/WPrefs.app/Focus.c \
@@ -14,18 +17,19 @@ POTFILES = \
$(top_builddir)/WPrefs.app/KeyboardSettings.c \ $(top_builddir)/WPrefs.app/KeyboardSettings.c \
$(top_builddir)/WPrefs.app/KeyboardShortcuts.c \ $(top_builddir)/WPrefs.app/KeyboardShortcuts.c \
$(top_builddir)/WPrefs.app/Menu.c \ $(top_builddir)/WPrefs.app/Menu.c \
$(top_builddir)/WPrefs.app/MenuGuru.c \
$(top_builddir)/WPrefs.app/MenuPreferences.c \ $(top_builddir)/WPrefs.app/MenuPreferences.c \
$(top_builddir)/WPrefs.app/MouseSettings.c \ $(top_builddir)/WPrefs.app/MouseSettings.c \
$(top_builddir)/WPrefs.app/NoMenuAlert.c \
$(top_builddir)/WPrefs.app/Paths.c \ $(top_builddir)/WPrefs.app/Paths.c \
$(top_builddir)/WPrefs.app/Preferences.c \ $(top_builddir)/WPrefs.app/Preferences.c \
$(top_builddir)/WPrefs.app/Text.c \ $(top_builddir)/WPrefs.app/Text.c \
$(top_builddir)/WPrefs.app/TextureAndColor.c \ $(top_builddir)/WPrefs.app/TexturePanel.c \
$(top_builddir)/WPrefs.app/Themes.c \ $(top_builddir)/WPrefs.app/Themes.c \
$(top_builddir)/WPrefs.app/WPrefs.c \
$(top_builddir)/WPrefs.app/WindowHandling.c \ $(top_builddir)/WPrefs.app/WindowHandling.c \
$(top_builddir)/WPrefs.app/Workspace.c \ $(top_builddir)/WPrefs.app/Workspace.c \
$(top_builddir)/WPrefs.app/main.c \ $(top_builddir)/WPrefs.app/double.c \
$(top_builddir)/WPrefs.app/editmenu.c \
$(top_builddir)/WPrefs.app/MenuGuru.c \
$(top_builddir)/WPrefs.app/xmodifier.c $(top_builddir)/WPrefs.app/xmodifier.c
SUFFIXES = .po .mo SUFFIXES = .po .mo

View File

@@ -96,7 +96,7 @@ CLEANFILES = $(CATALOGS)
EXTRA_DIST = pt.po hr.po fr.po ko.po cs.po ja.po zh_TW.Big5.po es.po EXTRA_DIST = pt.po hr.po fr.po ko.po cs.po ja.po zh_TW.Big5.po es.po
POTFILES = $(top_builddir)/WPrefs.app/Configurations.c $(top_builddir)/WPrefs.app/Expert.c $(top_builddir)/WPrefs.app/Focus.c $(top_builddir)/WPrefs.app/Icons.c $(top_builddir)/WPrefs.app/KeyboardSettings.c $(top_builddir)/WPrefs.app/KeyboardShortcuts.c $(top_builddir)/WPrefs.app/Menu.c $(top_builddir)/WPrefs.app/MenuGuru.c $(top_builddir)/WPrefs.app/MenuPreferences.c $(top_builddir)/WPrefs.app/MouseSettings.c $(top_builddir)/WPrefs.app/Paths.c $(top_builddir)/WPrefs.app/Preferences.c $(top_builddir)/WPrefs.app/Text.c $(top_builddir)/WPrefs.app/TextureAndColor.c $(top_builddir)/WPrefs.app/Themes.c $(top_builddir)/WPrefs.app/WPrefs.c $(top_builddir)/WPrefs.app/WindowHandling.c $(top_builddir)/WPrefs.app/Workspace.c $(top_builddir)/WPrefs.app/main.c $(top_builddir)/WPrefs.app/xmodifier.c POTFILES = $(top_builddir)/WPrefs.app/main.c $(top_builddir)/WPrefs.app/WPrefs.c $(top_builddir)/WPrefs.app/Appearance.c $(top_builddir)/WPrefs.app/Configurations.c $(top_builddir)/WPrefs.app/Expert.c $(top_builddir)/WPrefs.app/Focus.c $(top_builddir)/WPrefs.app/Icons.c $(top_builddir)/WPrefs.app/KeyboardSettings.c $(top_builddir)/WPrefs.app/KeyboardShortcuts.c $(top_builddir)/WPrefs.app/Menu.c $(top_builddir)/WPrefs.app/MenuPreferences.c $(top_builddir)/WPrefs.app/MouseSettings.c $(top_builddir)/WPrefs.app/NoMenuAlert.c $(top_builddir)/WPrefs.app/Paths.c $(top_builddir)/WPrefs.app/Preferences.c $(top_builddir)/WPrefs.app/Text.c $(top_builddir)/WPrefs.app/TexturePanel.c $(top_builddir)/WPrefs.app/Themes.c $(top_builddir)/WPrefs.app/WindowHandling.c $(top_builddir)/WPrefs.app/Workspace.c $(top_builddir)/WPrefs.app/double.c $(top_builddir)/WPrefs.app/editmenu.c $(top_builddir)/WPrefs.app/MenuGuru.c $(top_builddir)/WPrefs.app/xmodifier.c
SUFFIXES = .po .mo SUFFIXES = .po .mo

View File

@@ -4,7 +4,7 @@ in the top of the WindowMaker source tree.
File Language Current Maintainer File Language Current Maintainer
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
pt.po Portuguese Alfredo K. Kojima <kojima@inf.ufrgs.br> pt.po Portuguese Eliphas Levy Theodoro <eliphas@conectiva.com.br>
hr.po Croatian Toni Biliæ <tbilic@oliver.efos.hr> hr.po Croatian Toni Biliæ <tbilic@oliver.efos.hr>
fr.po French Bastien NOCERA <hadess@writeme.com> fr.po French Bastien NOCERA <hadess@writeme.com>
ko.po Korean Byeong-Chan, Kim <redhands@linux.sarang.net> ko.po Korean Byeong-Chan, Kim <redhands@linux.sarang.net>

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@ File Language Note Current Maintainer
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
ja.po Japanese 1 ABE Shige <sabe@ibm.net> ja.po Japanese 1 ABE Shige <sabe@ibm.net>
MANOME Tomonori <manome@itlb.te.noda.sut.ac.jp> MANOME Tomonori <manome@itlb.te.noda.sut.ac.jp>
pt.po Portuguese Alfredo K. Kojima <kojima@inf.ufrgs.br> pt.po Portuguese Eliphas Levy Theodoro <eliphas@conectiva.com.br>
de.po German Carsten Schaar de.po German Carsten Schaar
<nhadcasc@fs-maphy.uni-hannover.de> <nhadcasc@fs-maphy.uni-hannover.de>
es.po Spanish Raul Benito Garcia <raul@fi.upm.es> es.po Spanish Raul Benito Garcia <raul@fi.upm.es>

2086
po/pt.po

File diff suppressed because it is too large Load Diff

View File

@@ -75,6 +75,8 @@ wmaker_SOURCES = \
switchmenu.c \ switchmenu.c \
texture.c \ texture.c \
texture.h \ texture.h \
usermenu.c \
usermenu.h \
xde.h \ xde.h \
xde.c \ xde.c \
xmodifier.h \ xmodifier.h \

View File

@@ -96,7 +96,7 @@ bin_PROGRAMS = wmaker
EXTRA_DIST = wmnotify.c wmnotdef.h wmnotify.h EXTRA_DIST = wmnotify.c wmnotdef.h wmnotify.h
wmaker_SOURCES = GNUstep.h WindowMaker.h actions.c actions.h appicon.c appicon.h application.c application.h appmenu.c appmenu.h balloon.c balloon.h client.c client.h colormap.c def_pixmaps.h defaults.c defaults.h dialog.c dialog.h dock.c dockedapp.c dock.h event.c framewin.c framewin.h gnome.c gnome.h funcs.h icon.c icon.h keybind.h kwm.h kwm.c list.c list.h main.c menu.c menu.h misc.c motif.c motif.h moveres.c openlook.c openlook.h pixmap.c pixmap.h placement.c properties.c properties.h proplist.c resources.c resources.h rootmenu.c screen.c screen.h session.h session.c shutdown.c stacking.c stacking.h startup.c superfluous.c superfluous.h switchmenu.c texture.c texture.h xde.h xde.c xmodifier.h xmodifier.c xutil.c xutil.h wconfig.h wcore.c wcore.h wdefaults.c wdefaults.h window.c window.h winmenu.c winspector.h winspector.c workspace.c workspace.h wmsound.c wmsound.h text.c text.h wmaker_SOURCES = GNUstep.h WindowMaker.h actions.c actions.h appicon.c appicon.h application.c application.h appmenu.c appmenu.h balloon.c balloon.h client.c client.h colormap.c def_pixmaps.h defaults.c defaults.h dialog.c dialog.h dock.c dockedapp.c dock.h event.c framewin.c framewin.h gnome.c gnome.h funcs.h icon.c icon.h keybind.h kwm.h kwm.c list.c list.h main.c menu.c menu.h misc.c motif.c motif.h moveres.c openlook.c openlook.h pixmap.c pixmap.h placement.c properties.c properties.h proplist.c resources.c resources.h rootmenu.c screen.c screen.h session.h session.c shutdown.c stacking.c stacking.h startup.c superfluous.c superfluous.h switchmenu.c texture.c texture.h usermenu.c usermenu.h xde.h xde.c xmodifier.h xmodifier.c xutil.c xutil.h wconfig.h wcore.c wcore.h wdefaults.c wdefaults.h window.c window.h winmenu.c winspector.h winspector.c workspace.c workspace.h wmsound.c wmsound.h text.c text.h
CPPFLAGS = @CPPFLAGS@ @DFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\" CPPFLAGS = @CPPFLAGS@ @DFLAGS@ -DLOCALEDIR=\"$(NLSDIR)\"
@@ -123,9 +123,9 @@ client.o colormap.o defaults.o dialog.o dock.o dockedapp.o event.o \
framewin.o gnome.o icon.o kwm.o list.o main.o menu.o misc.o motif.o \ framewin.o gnome.o icon.o kwm.o list.o main.o menu.o misc.o motif.o \
moveres.o openlook.o pixmap.o placement.o properties.o proplist.o \ moveres.o openlook.o pixmap.o placement.o properties.o proplist.o \
resources.o rootmenu.o screen.o session.o shutdown.o stacking.o \ resources.o rootmenu.o screen.o session.o shutdown.o stacking.o \
startup.o superfluous.o switchmenu.o texture.o xde.o xmodifier.o \ startup.o superfluous.o switchmenu.o texture.o usermenu.o xde.o \
xutil.o wcore.o wdefaults.o window.o winmenu.o winspector.o workspace.o \ xmodifier.o xutil.o wcore.o wdefaults.o window.o winmenu.o winspector.o \
wmsound.o text.o workspace.o wmsound.o text.o
wmaker_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a \ wmaker_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a \
$(top_builddir)/wrlib/libwraster.la $(top_builddir)/wrlib/libwraster.la
wmaker_LDFLAGS = wmaker_LDFLAGS =

View File

@@ -175,10 +175,7 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
if (napp) if (napp)
napp->last_workspace = wwin->screen_ptr->current_workspace; napp->last_workspace = wwin->screen_ptr->current_workspace;
if (WFLAGP(wwin, no_focusable)) if (wwin->flags.mapped && !WFLAGP(wwin, no_focusable)) {
return;
if (wwin->flags.mapped /*&& !WFLAGP(wwin, no_focusable)*/) {
/* install colormap if colormap mode is lock mode */ /* install colormap if colormap mode is lock mode */
if (wPreferences.colormap_mode==WKF_CLICK) if (wPreferences.colormap_mode==WKF_CLICK)
wColormapInstallForWindow(scr, wwin); wColormapInstallForWindow(scr, wwin);
@@ -205,6 +202,8 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
} else { } else {
XSetInputFocus(dpy, scr->no_focus_win, RevertToParent, timestamp); XSetInputFocus(dpy, scr->no_focus_win, RevertToParent, timestamp);
} }
if (WFLAGP(wwin, no_focusable))
return;
/* if this is not the focused window focus it */ /* if this is not the focused window focus it */
if (focused!=wwin) { if (focused!=wwin) {
@@ -231,6 +230,10 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
wWindowFocus(wwin, focused); wWindowFocus(wwin, focused);
if (napp && !wasfocused) { if (napp && !wasfocused) {
#ifdef USER_MENU
wUserMenuRefreshInstances(napp->menu, wwin);
#endif /* USER_MENU */
wAppMenuMap(napp->menu, wwin); wAppMenuMap(napp->menu, wwin);
#ifdef NEWAPPICON #ifdef NEWAPPICON
wApplicationActivate(napp); wApplicationActivate(napp);

View File

@@ -29,6 +29,9 @@
#include "WindowMaker.h" #include "WindowMaker.h"
#include "menu.h" #include "menu.h"
#include "window.h" #include "window.h"
#ifdef USER_MENU
#include "usermenu.h"
#endif /* USER_MENU */
#include "icon.h" #include "icon.h"
#include "appicon.h" #include "appicon.h"
#include "application.h" #include "application.h"
@@ -291,6 +294,9 @@ wApplicationCreate(WScreen *scr, Window main_window)
leader->main_window = main_window; leader->main_window = main_window;
} }
wapp->menu = wAppMenuGet(scr, main_window); wapp->menu = wAppMenuGet(scr, main_window);
#ifdef USER_MENU
if (!wapp->menu) wapp->menu = wUserMenuGet(scr, wapp->main_window_desc);
#endif /* USER_MENU */
/* /*
@@ -353,9 +359,6 @@ wApplicationCreate(WScreen *scr, Window main_window)
if (wapp->app_icon) { if (wapp->app_icon) {
wapp->app_icon->main_window = main_window; wapp->app_icon->main_window = main_window;
#ifdef WMSOUND
wSoundServerGrab(wapp->app_icon->wm_class, main_window);
#endif
} }
#ifndef REDUCE_APPICONS #ifndef REDUCE_APPICONS

View File

@@ -55,10 +55,6 @@
#include "list.h" #include "list.h"
#ifdef WMSOUND
#include "wmsound.h"
#endif
#include <proplist.h> #include <proplist.h>

View File

@@ -1267,36 +1267,6 @@ windowUnderPointer(WScreen *scr)
static WWindow* static WWindow*
nextToFocusAfter(WWindow *wwin) nextToFocusAfter(WWindow *wwin)
{
WWindow *tmp = wwin->next;
while (tmp) {
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
return tmp;
}
tmp = tmp->next;
}
tmp = wwin;
/* start over from the beginning of the list */
while (tmp->prev)
tmp = tmp->prev;
while (tmp && tmp != wwin) {
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
return tmp;
}
tmp = tmp->next;
}
return wwin;
}
static WWindow*
nextToFocusBefore(WWindow *wwin)
{ {
WWindow *tmp = wwin->prev; WWindow *tmp = wwin->prev;
@@ -1308,8 +1278,8 @@ nextToFocusBefore(WWindow *wwin)
tmp = tmp->prev; tmp = tmp->prev;
} }
/* start over from the beginning of the list */
tmp = wwin; tmp = wwin;
/* start over from the beginning of the list */
while (tmp->next) while (tmp->next)
tmp = tmp->next; tmp = tmp->next;
@@ -1324,12 +1294,43 @@ nextToFocusBefore(WWindow *wwin)
return wwin; return wwin;
} }
static WWindow*
nextToFocusBefore(WWindow *wwin)
{
WWindow *tmp = wwin->next;
while (tmp) {
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
return tmp;
}
tmp = tmp->next;
}
/* start over from the beginning of the list */
tmp = wwin;
while (tmp->prev)
tmp = tmp->prev;
while (tmp && tmp != wwin) {
if (wWindowCanReceiveFocus(tmp) && !WFLAGP(tmp, skip_window_list)) {
return tmp;
}
tmp = tmp->next;
}
return wwin;
}
static void static void
doWindozeCycle(WWindow *wwin, XEvent *event, Bool next) doWindozeCycle(WWindow *wwin, XEvent *event, Bool next)
{ {
WScreen *scr = wScreenForRootWindow(event->xkey.root); WScreen *scr = wScreenForRootWindow(event->xkey.root);
Bool done = False; Bool done = False;
WWindow *newFocused; Bool openedSwitchMenu = False;
WWindow *newFocused;
WWindow *oldFocused; WWindow *oldFocused;
int modifiers; int modifiers;
XModifierKeymap *keymap; XModifierKeymap *keymap;
@@ -1354,8 +1355,15 @@ doWindozeCycle(WWindow *wwin, XEvent *event, Bool next)
wWindowFocus(newFocused, scr->focused_window); wWindowFocus(newFocused, scr->focused_window);
oldFocused = newFocused; oldFocused = newFocused;
if (wPreferences.circ_raise)
wRaiseFrame(newFocused->frame->core);
OpenSwitchMenu(scr, scr->scr_width/2, scr->scr_height/2, False); if (wPreferences.popup_switchmenu &&
(!scr->switch_menu || !scr->switch_menu->flags.mapped))
{
OpenSwitchMenu(scr, scr->scr_width/2, scr->scr_height/2, False);
openedSwitchMenu = True;
}
while (!done) { while (!done) {
XEvent ev; XEvent ev;
@@ -1378,6 +1386,8 @@ puts("EV");
newFocused = nextToFocusAfter(newFocused); newFocused = nextToFocusAfter(newFocused);
wWindowFocus(newFocused, oldFocused); wWindowFocus(newFocused, oldFocused);
oldFocused = newFocused; oldFocused = newFocused;
if (wPreferences.circ_raise)
wRaiseFrame(newFocused->frame->core);
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE); UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
} else if (ev.type == KeyPress } else if (ev.type == KeyPress
@@ -1388,6 +1398,8 @@ puts("EV");
newFocused = nextToFocusBefore(newFocused); newFocused = nextToFocusBefore(newFocused);
wWindowFocus(newFocused, oldFocused); wWindowFocus(newFocused, oldFocused);
oldFocused = newFocused; oldFocused = newFocused;
if (wPreferences.circ_raise)
wRaiseFrame(newFocused->frame->core);
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE); UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
} }
if (ev.type == KeyRelease) { if (ev.type == KeyRelease) {
@@ -1409,7 +1421,8 @@ puts("OUT");
XUngrabKeyboard(dpy, CurrentTime); XUngrabKeyboard(dpy, CurrentTime);
wSetFocusTo(scr, newFocused); wSetFocusTo(scr, newFocused);
scr->flags.doing_alt_tab = 0; scr->flags.doing_alt_tab = 0;
OpenSwitchMenu(scr, scr->scr_width/2, scr->scr_height/2, False); if (openedSwitchMenu)
OpenSwitchMenu(scr, scr->scr_width/2, scr->scr_height/2, False);
} }

View File

@@ -52,7 +52,6 @@
#include <proplist.h> #include <proplist.h>
/****** Global Variables ******/ /****** Global Variables ******/
/* general info */ /* general info */
@@ -299,7 +298,7 @@ execInitScript()
file = wfindfile(DEF_CONFIG_PATHS, DEF_INIT_SCRIPT); file = wfindfile(DEF_CONFIG_PATHS, DEF_INIT_SCRIPT);
if (file) { if (file) {
if (fork()==0) { if (fork()==0) {
execl("/bin/sh", "/bin/sh", "-c", file, NULL); execl("/bin/sh", "/bin/sh", "-c",file, NULL);
wsyserror(_("%s:could not execute initialization script"), file); wsyserror(_("%s:could not execute initialization script"), file);
exit(1); exit(1);
} }
@@ -511,10 +510,6 @@ main(int argc, char **argv)
wXModifierInitialize(); wXModifierInitialize();
#ifdef SOUNDS
wSoundInitialize();
#endif
#ifdef XSMP_ENABLED #ifdef XSMP_ENABLED
wSessionConnectManager(argv, argc); wSessionConnectManager(argv, argc);
#endif #endif

View File

@@ -266,7 +266,6 @@ insertEntry(WMenu *menu, WMenuEntry *entry, int index)
} }
WMenuEntry* WMenuEntry*
wMenuInsertCallback(WMenu *menu, int index, char *text, wMenuInsertCallback(WMenu *menu, int index, char *text,
void (*callback)(WMenu *menu, WMenuEntry *entry), void (*callback)(WMenu *menu, WMenuEntry *entry),
@@ -585,6 +584,12 @@ wMenuDestroy(WMenu *menu, int recurse)
if (menu->entries[i]->rtext) if (menu->entries[i]->rtext)
free(menu->entries[i]->rtext); free(menu->entries[i]->rtext);
#ifdef USER_MENU
if (menu->entries[i]->instances){
PLRelease(menu->entries[i]->instances);
}
#endif /* USER_MENU */
if (menu->entries[i]->free_cdata && menu->entries[i]->clientdata) { if (menu->entries[i]->free_cdata && menu->entries[i]->clientdata) {
(*menu->entries[i]->free_cdata)(menu->entries[i]->clientdata); (*menu->entries[i]->free_cdata)(menu->entries[i]->clientdata);

View File

@@ -38,6 +38,9 @@ typedef struct WMenuEntry {
void (*free_cdata)(void *data); /* proc to be used to free clientdata */ void (*free_cdata)(void *data); /* proc to be used to free clientdata */
void *clientdata; /* data to pass to callback */ void *clientdata; /* data to pass to callback */
int cascade; /* cascade menu index */ int cascade; /* cascade menu index */
#ifdef USER_MENU
proplist_t instances; /* allowed instances */
#endif /* USER_MENU */
struct { struct {
unsigned int enabled:1; /* entry is selectable */ unsigned int enabled:1; /* entry is selectable */
unsigned int indicator:1; /* left indicator */ unsigned int indicator:1; /* left indicator */

View File

@@ -58,10 +58,6 @@
#include "xutil.h" #include "xutil.h"
#ifdef WMSOUND
#include "wmsound.h"
#endif
#ifdef KWM_HINTS #ifdef KWM_HINTS
#include "kwm.h" #include "kwm.h"
#endif #endif
@@ -766,10 +762,6 @@ StartUp(Bool defaultScreenOnly)
XSetErrorHandler((XErrorHandler)catchXError); XSetErrorHandler((XErrorHandler)catchXError);
/* Sound init */ /* Sound init */
#ifdef WMSOUND
wSoundInit(dpy);
#endif
#ifdef SHAPE #ifdef SHAPE
/* ignore j */ /* ignore j */
wShapeSupported = XShapeQueryExtension(dpy, &wShapeEventBase, &j); wShapeSupported = XShapeQueryExtension(dpy, &wShapeEventBase, &j);

389
src/usermenu.c Normal file
View File

@@ -0,0 +1,389 @@
#ifdef USER_MENU
/* User defined menu is good, but beer's always better
* if someone wanna start hacking something, He heard...
* TODO
* - enhance commands. (eg, exit, hide, list all app's member
* window and etc)
* - cache menu... dunno.. if people really use this feature :P
* - Violins, senseless violins!
* that's all, right now :P
* - external! WINGs menu editor.
* TODONOT
* - allow applications to share their menu. ] think it
* looks wierd since there still are more than 1 appicon.
*
* Syntax...
* (
* "Program Name",
* ("Command 1", SHORTCUT, 1),
* ("Command 2", SHORTCUT, 2, ("Allowed_instant_1", "Allowed_instant_2")),
* ("Command 3", SHORTCUT, (3,4,5), ("Allowed_instant_1")),
* (
* "Submenu",
* ("Kill Command", KILL),
* ("Hide Command", HIDE),
* ("Hide Others Command", HIDE_OTHERS),
* ("Members", MEMBERS),
* ("Exit Command", EXIT)
* )
* )
*
* Tips:
* - If you don't want short cut keys to be listed
* in the right side of entries, you can just put them
* in array instead of using the string directly.
*
*/
#include "wconfig.h"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xproto.h>
#include <X11/Xatom.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include "WindowMaker.h"
#include "wcore.h"
#include "menu.h"
#include "actions.h"
#include "funcs.h"
#include "keybind.h"
#include "framewin.h"
extern proplist_t ReadProplistFromFile(char *file);
/*** var ***/
extern WPreferences wPreferences;
typedef struct {
WScreen *screen;
WShortKey *key;
int key_no;
} WUserMenuData;
static void
notifyClient(WMenu *menu, WMenuEntry *entry){
XEvent event;
WUserMenuData *data = entry->clientdata;
WScreen *scr = data->screen;
Window window;
int i;
window=scr->focused_window->client_win;
for(i=0;i<data->key_no;i++){
event.xkey.type = KeyPress;
event.xkey.display = dpy;
event.xkey.window = window;
event.xkey.subwindow = 0x0;
event.xkey.x = 0x0;
event.xkey.y = 0x0;
event.xkey.x_root = 0x0;
event.xkey.y_root = 0x0;
event.xkey.keycode = data->key[i].keycode;
event.xkey.state = data->key[i].modifier;
event.xkey.same_screen = YES;
XSendEvent(dpy, window, False, NoEventMask, &event);
XFlush(dpy);
/* should i release key too? */
}
}
static void
removeUserMenudata(void *menudata){
WUserMenuData *data = menudata;
free(data->key);
free(data);
}
static WUserMenuData*
convertShortcut(WScreen *scr, proplist_t shortcut){
WUserMenuData *data;
KeySym ksym;
char *k;
char buf[128], *b;
data = malloc(sizeof(WUserMenuData));
data->key = malloc(sizeof(WUserMenuData));
data->key[0].modifier = 0;
strcpy(buf, PLGetString(shortcut));
b = (char*)buf;
/* get modifiers */
while ((k = strchr(b, '+'))!=NULL) {
int mod;
*k = 0;
mod = wXModifierFromKey(b);
if (mod<0) {
free(data);
return NULL;
}
data->key[0].modifier |= mod;
b = k+1;
}
/* get key */
ksym = XStringToKeysym(b);
if (ksym==NoSymbol) {
free(data);
return NULL;
}
data->key[0].keycode = XKeysymToKeycode(dpy, ksym);
if (data->key[0].keycode==0) {
free(data);
return NULL;
}
data->screen = scr;
data->key_no = 1;
return data;
}
static WUserMenuData*
convertShortcuts(WScreen *scr, proplist_t shortcut){
WUserMenuData *data;
KeySym ksym;
char *k;
char *buffer;
char buf[128], *b;
int keycount,i,j,mod;
if (PLIsString(shortcut)){
keycount = 1;
}
else if (PLIsArray(shortcut)){
keycount = PLGetNumberOfElements(shortcut);
}
else return NULL;
/*for (i=0;i<keycount;i++){*/
data = malloc(sizeof(WUserMenuData));
data->key = malloc(sizeof(WShortKey)*keycount);
for (i=0,j=0;i<keycount;i++) {
data->key[j].modifier = 0;
if (PLIsArray(shortcut)) {
strcpy(buf, PLGetString(PLGetArrayElement(shortcut, i)));
}
else {
strcpy(buf, PLGetString(shortcut));
}
b = (char*)buf;
while ((k = strchr(b, '+'))!=NULL) {
*k = 0;
mod = wXModifierFromKey(b);
if (mod<0) {
break;
}
data->key[j].modifier |= mod;
b = k+1;
}
if (mod<0) {
continue;
}
ksym = XStringToKeysym(b);
if (ksym==NoSymbol) {
continue;
}
data->key[j].keycode = XKeysymToKeycode(dpy, ksym);
if (data->key[j].keycode) {
j++;
}
}
keyover:
/* get key */
if (!j) {
free(data->key);
free(data);
}
data->key_no = j;
data->screen = scr;
return data;
}
static WMenu*
configureUserMenu(WScreen *scr, proplist_t plum){
char *mtitle;
WMenu *menu=NULL;
proplist_t elem, title, command, params;
int count,i;
WUserMenuData *data;
if (!plum) return NULL;
else if (!PLIsArray(plum)){
PLRelease(plum);
return NULL;
}
count = PLGetNumberOfElements(plum);
if (!count) return NULL;
elem = PLGetArrayElement(plum, 0);
if (!PLIsString(elem)){
return NULL;
}
mtitle = PLGetString(elem);
menu=wMenuCreateForApp(scr, mtitle, True);
for(i=1; i<count; i++){
elem = PLGetArrayElement(plum,i);
if(PLIsArray(PLGetArrayElement(elem,1))){
WMenu *submenu;
WMenuEntry *mentry;
submenu = configureUserMenu(scr,elem);
if (submenu)
mentry = wMenuAddCallback(menu, submenu->frame->title,NULL,NULL);
wMenuEntrySetCascade(menu, mentry, submenu);
}
else {
int idx = 0;
proplist_t instances=0;
title = PLGetArrayElement(elem,idx++);
command = PLGetArrayElement(elem,idx++);
if (PLGetNumberOfElements(elem) >= 3)
params = PLGetArrayElement(elem,idx++);
if (!title || !command)
return menu;
if (!strcmp("SHORTCUT",PLGetString(command))){
WMenuEntry *entry;
data = convertShortcuts(scr, params);
if (data){
entry = wMenuAddCallback(menu, PLGetString(title),
notifyClient, data);
if (PLIsString(params)) {
entry->rtext = GetShortcutString(PLGetString(params));
}
if (entry) {
entry->free_cdata = removeUserMenudata;
if (PLGetNumberOfElements(elem) >= 4){
instances = PLGetArrayElement(elem,idx++);
if(PLIsArray(instances))
if (instances && PLGetNumberOfElements(instances)
&& PLIsArray(instances)){
entry->instances = PLRetain(instances);
}
}
}
}
}
/* else if */
}
}
return menu;
}
void
wUserMenuRefreshInstances(WMenu *menu, WWindow *wwin)
{
WMenuEntry* entry;
int i,j,count,paintflag;
paintflag=0;
if(!menu) return;
for (i=0; i<menu->entry_no; i++) {
if (menu->entries[i]->instances){
proplist_t ins;
int oldflag;
count = PLGetNumberOfElements(menu->entries[i]->instances);
oldflag = menu->entries[i]->flags.enabled;
menu->entries[i]->flags.enabled = 0;
for (j=0; j<count;j++){
ins = PLGetArrayElement(menu->entries[i]->instances,j);
if (!strcmp(wwin->wm_instance,PLGetString(ins))){
menu->entries[i]->flags.enabled = 1;
break;
}
}
if (oldflag != menu->entries[i]->flags.enabled)
paintflag=1;
}
}
for (i=0; i < menu->cascade_no; i++) {
if (!menu->cascades[i]->flags.brother)
wUserMenuRefreshInstances(menu->cascades[i], wwin);
else
wUserMenuRefreshInstances(menu->cascades[i]->brother, wwin);
}
if(paintflag)
wMenuPaint(menu);
}
static WMenu*
readUserMenuFile(WScreen *scr, char *file_name)
{
WMenu *menu=NULL;
char *mtitle;
proplist_t plum, elem, title, command, params;
int count,i;
plum = ReadProplistFromFile(file_name);
/**/
if(plum){
menu = configureUserMenu(scr, plum);
PLRelease(plum);
}
return menu;
}
WMenu*
wUserMenuGet(WScreen *scr, WWindow *wwin){
WMenu *menu = NULL;
char buffer[100];
char *prefix, *menufile;
prefix = getenv("HOME");
if (!prefix)
prefix = ".";
menufile = malloc(strlen(prefix)+64);
if (!menufile) return NULL;
if (wwin) {
FILE *f;
sprintf(menufile, "%s/%s.%s.menu",
prefix, wwin->wm_instance, wwin->wm_class);
f = fopen(menufile, "r");
if (f) {
fclose(f);
menu = readUserMenuFile(scr, menufile);
}
}
free(menufile);
return menu;
}
#endif /* USER_MENU */

10
src/usermenu.h Normal file
View File

@@ -0,0 +1,10 @@
#ifdef USER_MENU
#ifndef _WUSERMENU_H_
#define _WUSERMENU_H_
WMenu *wUserMenuGet(WScreen *scr, WWindow *wwin);
void wUserMenuRefreshInstances(WMenu *menu, WWindow *wwin);
#endif
#endif /* USER_MENU */

View File

@@ -45,13 +45,11 @@
#define TEXTURE_PLUGIN #define TEXTURE_PLUGIN
/* undefine WEENDOZE_CYCLING to remove all Windoze style Alt-Tab cycling /*
* If define, windoze cycling must still be enabled with the * #define to enable WindozeCycling. Set WindozeCycling = YES in
* WindozeCycling = YES and FinishedCyclingKey = Meta_L options * your WindowMaker config file
not working yet
*/ */
#undef WEENDOZE_CYCLING #define WEENDOZE_CYCLE
/* undefine ANIMATIONS if you don't want animations for iconification, /* undefine ANIMATIONS if you don't want animations for iconification,

View File

@@ -19,29 +19,54 @@ extern WPreferences wPreferences;
extern Atom _XA_WINDOWMAKER_WM_FUNCTION; extern Atom _XA_WINDOWMAKER_WM_FUNCTION;
void void
wSoundServerGrab(char *name, Window window) wSoundServerGrab(Window wm_win)
{ {
if(soundServer==None && name!=NULL && strcmp(name,"WMSoundServer")==0) { Window *lstChildren;
soundServer = window; Window retRoot;
Window retParent;
int indexCount;
u_int numChildren;
XClassHint *retHint;
if (XQueryTree(dpy, wm_win, &retRoot, &retParent, &lstChildren, &numChildren)) {
for (indexCount = 1; indexCount < numChildren; indexCount++) {
retHint = XAllocClassHint();
if (!retHint) {
XFree(lstChildren);
return;
}
XGetClassHint (dpy, lstChildren[indexCount], retHint);
if (retHint->res_class) {
if (strcmp("WMSoundServer", retHint->res_class) == 0) {
soundServer = lstChildren[indexCount];
XFree(lstChildren);
if(retHint) {
XFree(retHint);
}
return;
}
}
XFree(retHint);
retHint = 0;
}
XFree(lstChildren);
} }
} return;
void
wSoundInit(Display *dpy)
{
soundServer = 0;
sound_event.xclient.type = ClientMessage;
sound_event.xclient.message_type = _XA_WINDOWMAKER_WM_FUNCTION;
sound_event.xclient.format = 32;
sound_event.xclient.display = dpy;
} }
void void
wSoundPlay(long event_sound) wSoundPlay(long event_sound)
{ {
if (!soundServer) {
wSoundServerGrab(DefaultRootWindow(dpy));
}
if(soundServer!=None && !wPreferences.no_sound) { if(soundServer!=None && !wPreferences.no_sound) {
sound_event.xclient.type = ClientMessage;
sound_event.xclient.message_type = _XA_WINDOWMAKER_WM_FUNCTION;
sound_event.xclient.format = 32;
sound_event.xclient.display = dpy;
sound_event.xclient.window = soundServer; sound_event.xclient.window = soundServer;
sound_event.xclient.data.l[0] = event_sound; sound_event.xclient.data.l[0] = event_sound;
if (XSendEvent(dpy, soundServer, False, if (XSendEvent(dpy, soundServer, False,
@@ -54,5 +79,4 @@ wSoundPlay(long event_sound)
} }
} }
#endif /* WMSOUND */ #endif /* WMSOUND */

View File

@@ -45,7 +45,6 @@ extern WApplication *wSoundApp;
void wSoundPlay(long event_sound); void wSoundPlay(long event_sound);
void wSoundInit(Display *dpy); void wSoundServerGrab(Window wm_win);
void wSoundServerGrab(char *name, Window window);
#endif /*WMSOUND_H_*/ #endif /*WMSOUND_H_*/

View File

@@ -122,25 +122,25 @@ fi
echo "Copying defaults database..." echo "Copying defaults database..."
FILES=`(cd $GLOBALDEFDIR;ls *)` FILES=`(cd $GLOBALDEFDIR;ls -d *)`
all="" all=""
for i in $FILES; do for i in $FILES; do
# xx herbert if [ ! -d $GLOBALDEFDIR/$i ]; then
if [ -f $GSDIR/Defaults/$i -a -z "$BATCH" ]; then if [ -f $GSDIR/Defaults/$i -a -z "$BATCH" ]; then
# /xx herbert echo "The configuration file \"$i\" already exists in your defaults database."
echo "The configuration file \"$i\" already exists in your defaults database." echo "Do you wish to replace it? <y/n/a> [n] $all"
echo "Do you wish to replace it? <y/n/a> [n] $all" if [ "$all" != "a" ]; then
if [ "$all" != "a" ]; then read foo
read foo if [ "$foo" = "a" -o "$foo" = "A" ]; then
if [ "$foo" = "a" -o "$foo" = "A" ]; then all="a"
all="a" fi
fi fi
fi if [ "$foo" = "y" -o "$foo" = "Y" -o "$all" = "a" ]; then
if [ "$foo" = "y" -o "$foo" = "Y" -o "$all" = "a" ]; then copy $GLOBALDEFDIR/$i $GSDIR/Defaults/$i
fi
else
copy $GLOBALDEFDIR/$i $GSDIR/Defaults/$i copy $GLOBALDEFDIR/$i $GSDIR/Defaults/$i
fi fi
else
copy $GLOBALDEFDIR/$i $GSDIR/Defaults/$i
fi fi
done done