mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
*** empty log message ***
This commit is contained in:
@@ -12,6 +12,10 @@ Changes since version 0.52.0:
|
||||
- fixed crash bug when hiding apps with appicon disabled
|
||||
- fixed wrong initial workspace # being shown on attributes panel
|
||||
- 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:
|
||||
.............................
|
||||
|
||||
54
Makefile.in
54
Makefile.in
@@ -97,9 +97,9 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ./src/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
|
||||
Makefile.in NEWS TODO acconfig.h acinclude.m4 aclocal.m4 config.guess \
|
||||
config.sub configure configure.in install-sh ltconfig ltmain.sh missing \
|
||||
mkinstalldirs src/config.h.in src/stamp-h.in
|
||||
Makefile.in NEWS TODO acinclude.m4 aclocal.m4 config.guess config.sub \
|
||||
configure configure.in install-sh ltconfig ltmain.sh missing \
|
||||
mkinstalldirs
|
||||
|
||||
|
||||
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)
|
||||
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
|
||||
# into them and run `make' without going through this Makefile.
|
||||
# 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]*
|
||||
|
||||
maintainer-clean-generic:
|
||||
mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
|
||||
mostlyclean-am: mostlyclean-tags mostlyclean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
|
||||
clean-am: clean-tags clean-generic mostlyclean-am
|
||||
|
||||
clean: clean-recursive
|
||||
|
||||
distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
|
||||
distclean-am: distclean-tags distclean-generic clean-am
|
||||
-rm -f libtool
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f config.status
|
||||
|
||||
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
|
||||
maintainer-clean-generic distclean-am
|
||||
maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f config.status
|
||||
|
||||
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
|
||||
install-data-recursive uninstall-data-recursive install-exec-recursive \
|
||||
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
|
||||
all-recursive check-recursive installcheck-recursive info-recursive \
|
||||
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
.PHONY: install-data-recursive uninstall-data-recursive \
|
||||
install-exec-recursive uninstall-exec-recursive installdirs-recursive \
|
||||
uninstalldirs-recursive all-recursive check-recursive \
|
||||
installcheck-recursive info-recursive dvi-recursive \
|
||||
mostlyclean-recursive distclean-recursive clean-recursive \
|
||||
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
|
||||
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
|
||||
dvi-am dvi check check-am installcheck-am installcheck install-exec-am \
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
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 \
|
||||
@@ -14,18 +17,19 @@ POTFILES = \
|
||||
$(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/NoMenuAlert.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/TexturePanel.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/double.c \
|
||||
$(top_builddir)/WPrefs.app/editmenu.c \
|
||||
$(top_builddir)/WPrefs.app/MenuGuru.c \
|
||||
$(top_builddir)/WPrefs.app/xmodifier.c
|
||||
|
||||
SUFFIXES = .po .mo
|
||||
|
||||
@@ -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
|
||||
|
||||
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
|
||||
|
||||
@@ -4,7 +4,7 @@ in the top of the WindowMaker source tree.
|
||||
|
||||
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>
|
||||
fr.po French Bastien NOCERA <hadess@writeme.com>
|
||||
ko.po Korean Byeong-Chan, Kim <redhands@linux.sarang.net>
|
||||
|
||||
1185
WPrefs.app/po/pt.po
1185
WPrefs.app/po/pt.po
File diff suppressed because it is too large
Load Diff
@@ -5,7 +5,7 @@ File Language Note Current Maintainer
|
||||
------------------------------------------------------------------------------
|
||||
ja.po Japanese 1 ABE Shige <sabe@ibm.net>
|
||||
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
|
||||
<nhadcasc@fs-maphy.uni-hannover.de>
|
||||
es.po Spanish Raul Benito Garcia <raul@fi.upm.es>
|
||||
|
||||
@@ -75,6 +75,8 @@ wmaker_SOURCES = \
|
||||
switchmenu.c \
|
||||
texture.c \
|
||||
texture.h \
|
||||
usermenu.c \
|
||||
usermenu.h \
|
||||
xde.h \
|
||||
xde.c \
|
||||
xmodifier.h \
|
||||
|
||||
@@ -96,7 +96,7 @@ bin_PROGRAMS = wmaker
|
||||
|
||||
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)\"
|
||||
@@ -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 \
|
||||
moveres.o openlook.o pixmap.o placement.o properties.o proplist.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 \
|
||||
xutil.o wcore.o wdefaults.o window.o winmenu.o winspector.o workspace.o \
|
||||
wmsound.o text.o
|
||||
startup.o superfluous.o switchmenu.o texture.o usermenu.o xde.o \
|
||||
xmodifier.o xutil.o wcore.o wdefaults.o window.o winmenu.o winspector.o \
|
||||
workspace.o wmsound.o text.o
|
||||
wmaker_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.a \
|
||||
$(top_builddir)/wrlib/libwraster.la
|
||||
wmaker_LDFLAGS =
|
||||
|
||||
@@ -175,10 +175,7 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
|
||||
if (napp)
|
||||
napp->last_workspace = wwin->screen_ptr->current_workspace;
|
||||
|
||||
if (WFLAGP(wwin, no_focusable))
|
||||
return;
|
||||
|
||||
if (wwin->flags.mapped /*&& !WFLAGP(wwin, no_focusable)*/) {
|
||||
if (wwin->flags.mapped && !WFLAGP(wwin, no_focusable)) {
|
||||
/* install colormap if colormap mode is lock mode */
|
||||
if (wPreferences.colormap_mode==WKF_CLICK)
|
||||
wColormapInstallForWindow(scr, wwin);
|
||||
@@ -205,6 +202,8 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
|
||||
} else {
|
||||
XSetInputFocus(dpy, scr->no_focus_win, RevertToParent, timestamp);
|
||||
}
|
||||
if (WFLAGP(wwin, no_focusable))
|
||||
return;
|
||||
|
||||
/* if this is not the focused window focus it */
|
||||
if (focused!=wwin) {
|
||||
@@ -231,6 +230,10 @@ wSetFocusTo(WScreen *scr, WWindow *wwin)
|
||||
wWindowFocus(wwin, focused);
|
||||
|
||||
if (napp && !wasfocused) {
|
||||
#ifdef USER_MENU
|
||||
wUserMenuRefreshInstances(napp->menu, wwin);
|
||||
#endif /* USER_MENU */
|
||||
|
||||
wAppMenuMap(napp->menu, wwin);
|
||||
#ifdef NEWAPPICON
|
||||
wApplicationActivate(napp);
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
#include "WindowMaker.h"
|
||||
#include "menu.h"
|
||||
#include "window.h"
|
||||
#ifdef USER_MENU
|
||||
#include "usermenu.h"
|
||||
#endif /* USER_MENU */
|
||||
#include "icon.h"
|
||||
#include "appicon.h"
|
||||
#include "application.h"
|
||||
@@ -291,6 +294,9 @@ wApplicationCreate(WScreen *scr, Window main_window)
|
||||
leader->main_window = 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) {
|
||||
wapp->app_icon->main_window = main_window;
|
||||
#ifdef WMSOUND
|
||||
wSoundServerGrab(wapp->app_icon->wm_class, main_window);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef REDUCE_APPICONS
|
||||
|
||||
@@ -55,10 +55,6 @@
|
||||
|
||||
#include "list.h"
|
||||
|
||||
#ifdef WMSOUND
|
||||
#include "wmsound.h"
|
||||
#endif
|
||||
|
||||
#include <proplist.h>
|
||||
|
||||
|
||||
|
||||
75
src/event.c
75
src/event.c
@@ -1267,36 +1267,6 @@ windowUnderPointer(WScreen *scr)
|
||||
|
||||
static WWindow*
|
||||
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;
|
||||
|
||||
@@ -1308,8 +1278,8 @@ nextToFocusBefore(WWindow *wwin)
|
||||
tmp = tmp->prev;
|
||||
}
|
||||
|
||||
/* start over from the beginning of the list */
|
||||
tmp = wwin;
|
||||
/* start over from the beginning of the list */
|
||||
while (tmp->next)
|
||||
tmp = tmp->next;
|
||||
|
||||
@@ -1324,11 +1294,42 @@ nextToFocusBefore(WWindow *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
|
||||
doWindozeCycle(WWindow *wwin, XEvent *event, Bool next)
|
||||
{
|
||||
WScreen *scr = wScreenForRootWindow(event->xkey.root);
|
||||
Bool done = False;
|
||||
Bool openedSwitchMenu = False;
|
||||
WWindow *newFocused;
|
||||
WWindow *oldFocused;
|
||||
int modifiers;
|
||||
@@ -1354,8 +1355,15 @@ doWindozeCycle(WWindow *wwin, XEvent *event, Bool next)
|
||||
|
||||
wWindowFocus(newFocused, scr->focused_window);
|
||||
oldFocused = newFocused;
|
||||
if (wPreferences.circ_raise)
|
||||
wRaiseFrame(newFocused->frame->core);
|
||||
|
||||
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) {
|
||||
XEvent ev;
|
||||
@@ -1378,6 +1386,8 @@ puts("EV");
|
||||
newFocused = nextToFocusAfter(newFocused);
|
||||
wWindowFocus(newFocused, oldFocused);
|
||||
oldFocused = newFocused;
|
||||
if (wPreferences.circ_raise)
|
||||
wRaiseFrame(newFocused->frame->core);
|
||||
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
||||
|
||||
} else if (ev.type == KeyPress
|
||||
@@ -1388,6 +1398,8 @@ puts("EV");
|
||||
newFocused = nextToFocusBefore(newFocused);
|
||||
wWindowFocus(newFocused, oldFocused);
|
||||
oldFocused = newFocused;
|
||||
if (wPreferences.circ_raise)
|
||||
wRaiseFrame(newFocused->frame->core);
|
||||
UpdateSwitchMenu(scr, newFocused, ACTION_CHANGE_STATE);
|
||||
}
|
||||
if (ev.type == KeyRelease) {
|
||||
@@ -1409,6 +1421,7 @@ puts("OUT");
|
||||
XUngrabKeyboard(dpy, CurrentTime);
|
||||
wSetFocusTo(scr, newFocused);
|
||||
scr->flags.doing_alt_tab = 0;
|
||||
if (openedSwitchMenu)
|
||||
OpenSwitchMenu(scr, scr->scr_width/2, scr->scr_height/2, False);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@
|
||||
|
||||
#include <proplist.h>
|
||||
|
||||
|
||||
/****** Global Variables ******/
|
||||
|
||||
/* general info */
|
||||
@@ -511,10 +510,6 @@ main(int argc, char **argv)
|
||||
|
||||
wXModifierInitialize();
|
||||
|
||||
#ifdef SOUNDS
|
||||
wSoundInitialize();
|
||||
#endif
|
||||
|
||||
#ifdef XSMP_ENABLED
|
||||
wSessionConnectManager(argv, argc);
|
||||
#endif
|
||||
|
||||
@@ -266,7 +266,6 @@ insertEntry(WMenu *menu, WMenuEntry *entry, int index)
|
||||
}
|
||||
|
||||
|
||||
|
||||
WMenuEntry*
|
||||
wMenuInsertCallback(WMenu *menu, int index, char *text,
|
||||
void (*callback)(WMenu *menu, WMenuEntry *entry),
|
||||
@@ -585,6 +584,12 @@ wMenuDestroy(WMenu *menu, int recurse)
|
||||
|
||||
if (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) {
|
||||
(*menu->entries[i]->free_cdata)(menu->entries[i]->clientdata);
|
||||
|
||||
@@ -38,6 +38,9 @@ typedef struct WMenuEntry {
|
||||
void (*free_cdata)(void *data); /* proc to be used to free clientdata */
|
||||
void *clientdata; /* data to pass to callback */
|
||||
int cascade; /* cascade menu index */
|
||||
#ifdef USER_MENU
|
||||
proplist_t instances; /* allowed instances */
|
||||
#endif /* USER_MENU */
|
||||
struct {
|
||||
unsigned int enabled:1; /* entry is selectable */
|
||||
unsigned int indicator:1; /* left indicator */
|
||||
|
||||
@@ -58,10 +58,6 @@
|
||||
|
||||
#include "xutil.h"
|
||||
|
||||
#ifdef WMSOUND
|
||||
#include "wmsound.h"
|
||||
#endif
|
||||
|
||||
#ifdef KWM_HINTS
|
||||
#include "kwm.h"
|
||||
#endif
|
||||
@@ -766,10 +762,6 @@ StartUp(Bool defaultScreenOnly)
|
||||
XSetErrorHandler((XErrorHandler)catchXError);
|
||||
|
||||
/* Sound init */
|
||||
#ifdef WMSOUND
|
||||
wSoundInit(dpy);
|
||||
#endif
|
||||
|
||||
#ifdef SHAPE
|
||||
/* ignore j */
|
||||
wShapeSupported = XShapeQueryExtension(dpy, &wShapeEventBase, &j);
|
||||
|
||||
389
src/usermenu.c
Normal file
389
src/usermenu.c
Normal 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
10
src/usermenu.h
Normal 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 */
|
||||
@@ -45,13 +45,11 @@
|
||||
#define TEXTURE_PLUGIN
|
||||
|
||||
|
||||
/* undefine WEENDOZE_CYCLING to remove all Windoze style Alt-Tab cycling
|
||||
* If define, windoze cycling must still be enabled with the
|
||||
* WindozeCycling = YES and FinishedCyclingKey = Meta_L options
|
||||
|
||||
not working yet
|
||||
/*
|
||||
* #define to enable WindozeCycling. Set WindozeCycling = YES in
|
||||
* your WindowMaker config file
|
||||
*/
|
||||
#undef WEENDOZE_CYCLING
|
||||
#define WEENDOZE_CYCLE
|
||||
|
||||
|
||||
/* undefine ANIMATIONS if you don't want animations for iconification,
|
||||
|
||||
@@ -19,29 +19,54 @@ extern WPreferences wPreferences;
|
||||
extern Atom _XA_WINDOWMAKER_WM_FUNCTION;
|
||||
|
||||
void
|
||||
wSoundServerGrab(char *name, Window window)
|
||||
wSoundServerGrab(Window wm_win)
|
||||
{
|
||||
if(soundServer==None && name!=NULL && strcmp(name,"WMSoundServer")==0) {
|
||||
soundServer = window;
|
||||
}
|
||||
Window *lstChildren;
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
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;
|
||||
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
|
||||
wSoundPlay(long event_sound)
|
||||
{
|
||||
if (!soundServer) {
|
||||
wSoundServerGrab(DefaultRootWindow(dpy));
|
||||
}
|
||||
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.data.l[0] = event_sound;
|
||||
if (XSendEvent(dpy, soundServer, False,
|
||||
@@ -54,5 +79,4 @@ wSoundPlay(long event_sound)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif /* WMSOUND */
|
||||
|
||||
@@ -45,7 +45,6 @@ extern WApplication *wSoundApp;
|
||||
|
||||
|
||||
void wSoundPlay(long event_sound);
|
||||
void wSoundInit(Display *dpy);
|
||||
void wSoundServerGrab(char *name, Window window);
|
||||
void wSoundServerGrab(Window wm_win);
|
||||
|
||||
#endif /*WMSOUND_H_*/
|
||||
|
||||
@@ -122,12 +122,11 @@ fi
|
||||
|
||||
echo "Copying defaults database..."
|
||||
|
||||
FILES=`(cd $GLOBALDEFDIR;ls *)`
|
||||
FILES=`(cd $GLOBALDEFDIR;ls -d *)`
|
||||
all=""
|
||||
for i in $FILES; do
|
||||
# xx herbert
|
||||
if [ ! -d $GLOBALDEFDIR/$i ]; then
|
||||
if [ -f $GSDIR/Defaults/$i -a -z "$BATCH" ]; then
|
||||
# /xx herbert
|
||||
echo "The configuration file \"$i\" already exists in your defaults database."
|
||||
echo "Do you wish to replace it? <y/n/a> [n] $all"
|
||||
if [ "$all" != "a" ]; then
|
||||
@@ -142,6 +141,7 @@ for i in $FILES; do
|
||||
else
|
||||
copy $GLOBALDEFDIR/$i $GSDIR/Defaults/$i
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user