1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 04:48:06 +01:00

- Added Jim Knoble's 'no polling' patch.

This commit is contained in:
dan
2001-01-30 03:04:02 +00:00
parent 8b7930f6c9
commit 4637c09d19
7 changed files with 45 additions and 2 deletions

View File

@@ -102,7 +102,7 @@ EMACS/keypad like cursor movement for WINGs textfield
Jim Knoble <jmknoble@pobox.com> Jim Knoble <jmknoble@pobox.com>
made autoarrange icons a runtime option, SHADOW_RESIZEBAR c-time option, made autoarrange icons a runtime option, SHADOW_RESIZEBAR c-time option,
no workspace switch to the same workspace, dashed icon selection, no workspace switch to the same workspace, dashed icon selection,
misclellaneous bug fixes, definable cursors.. misclellaneous bug fixes, definable cursors, --no-polling command line option.
The JED Text Editor <xjed@windowmaker.org> The JED Text Editor <xjed@windowmaker.org>
Project maintainer Project maintainer

View File

@@ -10,6 +10,7 @@ Changes since version 0.63.1:
- Renamed se.po to sv.po - Renamed se.po to sv.po
- New version of wkdemenu.pl (from Malcolm Cowe <malk@bruhaha.co.uk>) - New version of wkdemenu.pl (from Malcolm Cowe <malk@bruhaha.co.uk>)
- new updated Slovak translations (Jan Tomka/judas@hell <tomka@oalevice.sk>) - new updated Slovak translations (Jan Tomka/judas@hell <tomka@oalevice.sk>)
- integrated the 'no polling' patch from Jim Knoble <jmknoble@jmknoble.cx>.
Changes since version 0.63.0: Changes since version 0.63.0:

15
NEWS
View File

@@ -2,6 +2,21 @@
NEWS for veteran Window Maker users NEWS for veteran Window Maker users
----------------------------------- -----------------------------------
--- 0.63.2
No Polling of Configuration Files
---------------------------------
Running Window Maker with one of -nopolling or --no-polling command line
options will make it not to poll every 3 seconds for changes in its
configuration files (good for laptops to let them spin disks down when idle).
Note:
For the ones used with Jim Knoble's 'no polling' patch, this is the same,
except that the need to #define ENABLE_NO_POLLING in wconfig.h was removed
and the behaviour is always available if you use the command line option.
--- 0.63.0 --- 0.63.0

View File

@@ -232,6 +232,7 @@ typedef enum {
#define WSTATE_EXITING 3 #define WSTATE_EXITING 3
#define WSTATE_RESTARTING 4 #define WSTATE_RESTARTING 4
#define WSTATE_MODAL 5 #define WSTATE_MODAL 5
#define WSTATE_NEED_REREAD 6
#define WCHECK_STATE(state) (state == WProgramState) #define WCHECK_STATE(state) (state == WProgramState)
@@ -437,6 +438,7 @@ typedef struct WPreferences {
unsigned int noautolaunch:1; /* don't autolaunch apps */ unsigned int noautolaunch:1; /* don't autolaunch apps */
unsigned int norestore:1; /* don't restore session */ unsigned int norestore:1; /* don't restore session */
unsigned int create_stdcmap:1; /* create std colormap */ unsigned int create_stdcmap:1; /* create std colormap */
unsigned int nopolling:1; /* don't poll for defaults changes */
} flags; /* internal flags */ } flags; /* internal flags */
} WPreferences; } WPreferences;

View File

@@ -219,6 +219,9 @@ DispatchEvent(XEvent *event)
Shutdown(WSRestartPreparationMode); Shutdown(WSRestartPreparationMode);
/* received SIGHUP */ /* received SIGHUP */
Restart(NULL, True); Restart(NULL, True);
} else if (WCHECK_STATE(WSTATE_NEED_REREAD)) {
WCHANGE_STATE(WSTATE_NORMAL);
wDefaultsCheckDomains("bla");
} }
/* for the case that all that is wanted to be dispatched is /* for the case that all that is wanted to be dispatched is

View File

@@ -433,6 +433,7 @@ print_help()
puts(_(" --create-stdcmap create the standard colormap hint in PseudoColor visuals")); puts(_(" --create-stdcmap create the standard colormap hint in PseudoColor visuals"));
puts(_(" --visual-id visualid visual id of visual to use")); puts(_(" --visual-id visualid visual id of visual to use"));
puts(_(" --static do not update or save configurations")); puts(_(" --static do not update or save configurations"));
puts(_(" --no-polling do not periodically check for configuration updates"));
#ifdef DEBUG #ifdef DEBUG
puts(_(" --synchronous turn on synchronous display mode")); puts(_(" --synchronous turn on synchronous display mode"));
#endif #endif
@@ -643,6 +644,10 @@ main(int argc, char **argv)
|| strcmp(argv[i], "--static")==0) { || strcmp(argv[i], "--static")==0) {
wPreferences.flags.noupdates = 1; wPreferences.flags.noupdates = 1;
} else if (strcmp(argv[i], "-nopolling")==0
|| strcmp(argv[i], "--no-polling")==0) {
wPreferences.flags.nopolling = 1;
#ifdef XSMP_ENABLED #ifdef XSMP_ENABLED
} else if (strcmp(argv[i], "-clientid")==0 } else if (strcmp(argv[i], "-clientid")==0
|| strcmp(argv[i], "-restore")==0) { || strcmp(argv[i], "-restore")==0) {

View File

@@ -278,6 +278,22 @@ handleSig(int sig)
WMAddIdleHandler(delayedAction, NULL); WMAddIdleHandler(delayedAction, NULL);
} }
return; return;
} else if (sig == SIGUSR2) {
#ifdef SYS_SIGLIST_DECLARED
wwarning(_("got signal %i (%s) - rereading defaults\n"), sig, sys_siglist[sig]);
#else
wwarning(_("got signal %i - rereading defaults\n"), sig);
#endif
WCHANGE_STATE(WSTATE_NEED_REREAD);
/* setup idle handler, so that this will be handled when
* the select() is returned becaused of the signal, even if
* there are no X events in the queue */
if (!WDelayedActionSet) {
WDelayedActionSet = 1;
WMAddIdleHandler(delayedAction, NULL);
}
return;
} else if (sig == SIGTERM || sig == SIGHUP) { } else if (sig == SIGTERM || sig == SIGHUP) {
#ifdef SYS_SIGLIST_DECLARED #ifdef SYS_SIGLIST_DECLARED
wwarning(_("got signal %i (%s) - exiting...\n"), sig, sys_siglist[sig]); wwarning(_("got signal %i (%s) - exiting...\n"), sig, sys_siglist[sig]);
@@ -796,6 +812,7 @@ StartUp(Bool defaultScreenOnly)
* -Dan */ * -Dan */
sig_action.sa_flags = SA_RESTART; sig_action.sa_flags = SA_RESTART;
sigaction(SIGUSR1, &sig_action, NULL); sigaction(SIGUSR1, &sig_action, NULL);
sigaction(SIGUSR2, &sig_action, NULL);
/* ignore dead pipe */ /* ignore dead pipe */
sig_action.sa_handler = ignoreSig; sig_action.sa_handler = ignoreSig;
@@ -955,7 +972,7 @@ StartUp(Bool defaultScreenOnly)
Exit(1); Exit(1);
} }
if (!wPreferences.flags.noupdates) { if (!wPreferences.flags.nopolling && !wPreferences.flags.noupdates) {
/* setup defaults file polling */ /* setup defaults file polling */
WMAddTimerHandler(3000, wDefaultsCheckDomains, NULL); WMAddTimerHandler(3000, wDefaultsCheckDomains, NULL);
} }