Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 181001 Details for
Bug 267041
Window Maker with 4 wakeups
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Substitute polling with kernel's dnotify mechanism
WindowMaker-0.92.0-remove_nopolling.patch (text/plain), 5.15 KB, created by
Carlos R. Mafra
on 2007-08-30 13:46:41 UTC
(
hide
)
Description:
Substitute polling with kernel's dnotify mechanism
Filename:
MIME Type:
Creator:
Carlos R. Mafra
Created:
2007-08-30 13:46:41 UTC
Size:
5.15 KB
patch
obsolete
>diff -uNr -B -b WindowMaker-0.92.0/src/defaults.c WindowMaker-0.92.0-dnotify2/src/defaults.c >--- WindowMaker-0.92.0/src/defaults.c 2005-04-08 07:59:16.000000000 -0300 >+++ WindowMaker-0.92.0-dnotify2/src/defaults.c 2007-06-27 23:26:46.000000000 -0300 >@@ -1348,8 +1348,6 @@ > } > #endif /* !LITE */ > >- if (!foo) >- WMAddTimerHandler(DEFAULTS_CHECK_INTERVAL, wDefaultsCheckDomains, foo); > } > > >diff -uNr -B -b WindowMaker-0.92.0/src/event.c WindowMaker-0.92.0-dnotify2/src/event.c >--- WindowMaker-0.92.0/src/event.c 2005-03-12 21:13:55.000000000 -0300 >+++ WindowMaker-0.92.0-dnotify2/src/event.c 2007-06-27 23:26:50.000000000 -0300 >@@ -319,10 +319,20 @@ > EventLoop() > { > XEvent event; >+ extern volatile int filesChanged; >+ extern void wDefaultsCheckDomains(); > > for(;;) { > WMNextEvent(dpy, &event); > WMHandleEvent(&event); >+ >+ /* If configuration files in defaults database have >+ changed we read them. */ >+ if (filesChanged){ >+ fprintf(stdout,"Rereading config files in defaults database...\n"); >+ wDefaultsCheckDomains(NULL); >+ filesChanged = 0; >+ } > } > } > >diff -uNr -B -b WindowMaker-0.92.0/src/main.c WindowMaker-0.92.0-dnotify2/src/main.c >--- WindowMaker-0.92.0/src/main.c 2004-10-24 22:32:51.000000000 -0300 >+++ WindowMaker-0.92.0-dnotify2/src/main.c 2007-06-27 23:26:56.000000000 -0300 >@@ -19,6 +19,14 @@ > * USA. > */ > >+/* The notify code was copied from Documentation/dnotify.txt >+ * in the linux kernel. >+ */ >+ >+#define _GNU_SOURCE /* needed to get the defines in glibc 2.2 */ >+#include <fcntl.h> /* this has the needed values defined */ >+#include <signal.h> >+ > #include "wconfig.h" > > #include <stdio.h> >@@ -62,6 +70,7 @@ > char *ProgName; > > unsigned int ValidModMask = 0xff; >+volatile int filesChanged; > > /* locale to use. NULL==POSIX or C */ > char *Locale=NULL; >@@ -451,7 +460,6 @@ > puts(_(" --create-stdcmap create the standard colormap hint in PseudoColor visuals")); > puts(_(" --visual-id visualid visual id of visual to use")); > puts(_(" --static do not update or save configurations")); >- puts(_(" --no-polling do not periodically check for configuration updates")); > #ifdef DEBUG > puts(_(" --synchronous turn on synchronous display mode")); > #endif >@@ -490,10 +498,32 @@ > } > > >+/* This is the handler used to notify if configuration >+ * files have changed. >+ */ >+void handler(int sig, siginfo_t *si, void *data) >+{ >+ filesChanged = si->si_fd; >+} >+ > static void > execInitScript() > { >- char *file, *paths; >+ char *file, *path, *paths; >+ struct sigaction act; >+ volatile int fd; >+ >+ path = wstrconcat(wusergnusteppath(), "/Defaults"); >+ >+ act.sa_sigaction = handler; >+ sigemptyset(&act.sa_mask); >+ act.sa_flags = SA_SIGINFO; >+ sigaction(SIGRTMIN + 1, &act, NULL); >+ >+ fd = open(path, O_RDONLY); >+ fcntl(fd, F_SETSIG, SIGRTMIN + 1); >+ fcntl(fd, F_NOTIFY, DN_MODIFY|DN_MULTISHOT); >+ wfree(path); > > paths = wstrconcat(wusergnusteppath(), "/Library/WindowMaker"); > paths = wstrappend(paths, ":"DEF_CONFIG_PATHS); >@@ -746,10 +776,6 @@ > || strcmp(argv[i], "--static")==0) { > > wPreferences.flags.noupdates = 1; >- } else if (strcmp(argv[i], "-nopolling")==0 >- || strcmp(argv[i], "--no-polling")==0) { >- >- wPreferences.flags.nopolling = 1; > #ifdef XSMP_ENABLED > } else if (strcmp(argv[i], "-clientid")==0 > || strcmp(argv[i], "-restore")==0) { >diff -uNr -B -b WindowMaker-0.92.0/src/startup.c WindowMaker-0.92.0-dnotify2/src/startup.c >--- WindowMaker-0.92.0/src/startup.c 2005-03-11 22:11:30.000000000 -0300 >+++ WindowMaker-0.92.0-dnotify2/src/startup.c 2007-06-27 23:27:10.000000000 -0300 >@@ -885,10 +885,6 @@ > Exit(1); > } > >- if (!wPreferences.flags.nopolling && !wPreferences.flags.noupdates) { >- /* setup defaults file polling */ >- WMAddTimerHandler(3000, wDefaultsCheckDomains, NULL); >- } > } > > >diff -uNr -B -b WindowMaker-0.92.0/src/wconfig.h.in WindowMaker-0.92.0-dnotify2/src/wconfig.h.in >--- WindowMaker-0.92.0/src/wconfig.h.in 2004-11-11 11:23:38.000000000 -0200 >+++ WindowMaker-0.92.0-dnotify2/src/wconfig.h.in 2007-06-27 23:27:17.000000000 -0300 >@@ -457,8 +457,6 @@ > #define MAX_WINDOWLIST_WIDTH 160 /* max width of window title in > * window list */ > >-#define DEFAULTS_CHECK_INTERVAL 2000 /* how often wmaker will check for >- * changes in the config files */ > > /* if your keyboard don't have arrow keys */ > #undef ARROWLESS_KBD >diff -uNr -B -b WindowMaker-0.92.0/src/WindowMaker.h WindowMaker-0.92.0-dnotify2/src/WindowMaker.h >--- WindowMaker-0.92.0/src/WindowMaker.h 2004-10-24 22:48:39.000000000 -0300 >+++ WindowMaker-0.92.0-dnotify2/src/WindowMaker.h 2007-06-27 23:27:21.000000000 -0300 >@@ -483,7 +483,6 @@ > unsigned int noautolaunch:1; /* don't autolaunch apps */ > unsigned int norestore:1; /* don't restore session */ > unsigned int create_stdcmap:1; /* create std colormap */ >- unsigned int nopolling:1; /* don't poll for defaults changes */ > unsigned int restarting:2; > } flags; /* internal flags */ > } WPreferences;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 267041
: 181001 |
181041
|
181061
|
181081