[Thread Prev][Thread Next]   >Date Index >Thread Index

[wmx] wmx-5 comments

BALATON Zoltan - Mon Jan 18 19:43:52 1999

Hi all,

I have downloaded and installed wmx-5 and I'm really impressed. It looks
great and fits perfectly to wily (the plan9's acme clone for X11). The two
together really makes a decent desktop.

My system is i686-pc-linux-gnu, running RedHat Linux 5.2 and a fairly
recent egcs 1.1.1 release with libstdc 2.9 and XFree86 3.3.3 libraries. I
have compiled wmx with CFLAGS=-Wall -g -O2 and got some warnings. Mostly
because of type mismatches. There's a patch below to correct most of them.
With this patch I only got warnings because of Class dConfig is defined in
Config.h but is not used there, but other warnings should go away with the
patch.

One thing I was missing from wmx is the ability to maximize a window with
the mouse, although there is a shortcut key to make a window full height.
I have made some modifications which adds a way to maximize windows with
the mouse. With my modifications a click in the button of the window with
the middle button makes the window full height (the second click reverses
this), a click with the right button makes the window full size. This is
how wily's windows behave. I'm not yet finished with adding this to wmx,
my code still needs some polishing, but it should be ready soon. When
others are interested in it I could post a patch here.

Greetings,
BALATON Zoltan

--- wmx-5-warnings.patch --- 8< Cut here >8 ---

diff -uNr wmx-5.orig/Channel.C wmx-5/Channel.C
--- wmx-5.orig/Channel.C	Wed Jan 13 11:28:43 1999
+++ wmx-5/Channel.C	Mon Jan 18 02:19:39 1999
@@ -65,7 +65,7 @@
     char number[7];
     sprintf(number, "%d", nextChannel);
 
-    for (i = 0; i < strlen(number); ++i) {
+    for (i = 0; i < (int)strlen(number); ++i) {
 	for (y = 0; y < 7; ++y) {
 	    for (x = 0; x < 5; ++x) {
 		if (numerals[number[i]-'0'][y][x] != ' ') {
diff -uNr wmx-5.orig/Client.C wmx-5/Client.C
--- wmx-5.orig/Client.C	Wed Jan 13 11:28:43 1999
+++ wmx-5/Client.C	Mon Jan 18 02:23:59 1999
@@ -162,7 +162,7 @@
 
     if (CONFIG_USE_KEYBOARD) {
 
-	int i;
+	size_t i;
 	int keycode;
 
 	static KeySym keys[] = {
@@ -468,7 +468,9 @@
     int status;
     Boolean retried = False;
 
+#if I18N
 tryagain:
+#endif
     status = XGetWindowProperty(d, w, a, 0L, len, False, type, &realType,
 				&format, &n, &extra, p);
 
diff -uNr wmx-5.orig/Config.C wmx-5/Config.C
--- wmx-5.orig/Config.C	Wed Jan 13 11:28:43 1999
+++ wmx-5/Config.C	Mon Jan 18 02:19:39 1999
@@ -128,7 +128,7 @@
 		    "`%s' @ position %d", s, string - s);
 	}
 
-    } while (s = strtok(NULL, "/"));
+    } while ((s = strtok(NULL, "/")));
 
     fprintf(stderr, "\n");
 
diff -uNr wmx-5.orig/Events.C wmx-5/Events.C
--- wmx-5.orig/Events.C	Wed Jan 13 11:28:43 1999
+++ wmx-5/Events.C	Mon Jan 18 02:19:39 1999
@@ -246,12 +246,12 @@
 {
     if (!CONFIG_AUTO_RAISE) return;
 
-    int t = timestamp(True);
+    Time t = timestamp(True);
 
     if (m_focusPointerMoved) {	// only raise when pointer stops
 
 	if (t < m_focusTimestamp ||
-	    t - m_focusTimestamp > CONFIG_POINTER_STOPPED_DELAY) {
+	    t - m_focusTimestamp > (Time)CONFIG_POINTER_STOPPED_DELAY) {
 
 	    if (m_focusPointerNowStill) {
 		m_focusCandidate->focusIfAppropriate(True);
@@ -263,7 +263,7 @@
     } else {
 
 	if (t < m_focusTimestamp ||
-	    t - m_focusTimestamp > CONFIG_AUTO_RAISE_DELAY) {
+	    t - m_focusTimestamp > (Time)CONFIG_AUTO_RAISE_DELAY) {
 
 	    m_focusCandidate->focusIfAppropriate(True);
 
diff -uNr wmx-5.orig/Manager.h wmx-5/Manager.h
--- wmx-5.orig/Manager.h	Wed Jan 13 11:28:43 1999
+++ wmx-5/Manager.h	Mon Jan 18 02:19:39 1999
@@ -14,7 +14,11 @@
     WindowManager(int argc, char **argv);
     ~WindowManager();
 
+#ifdef __GNUC__
+    void fatal(const char *) __attribute__ ((noreturn));
+#else
     void fatal(const char *);
+#endif
 
     // for call from Client and within:
 
diff -uNr wmx-5.orig/Rotated.C wmx-5/Rotated.C
--- wmx-5.orig/Rotated.C	Wed Jan 13 11:28:43 1999
+++ wmx-5/Rotated.C	Mon Jan 18 02:19:39 1999
@@ -73,8 +73,8 @@
 static char *my_strtok(char *str1, char *str2)
 {
   char *ret;
-  int i, j, stop;
-  static int start, len;
+  size_t i, j, stop;
+  static size_t start, len;
   static char *stext;
 
   /* this error should never occur ... */
@@ -688,7 +688,8 @@
 			   char *text, int align)
 {  
   int xp = 0, yp = 0, dir;
-  int i, nl = 1, max_width = 0, this_width;
+  int nl = 1, max_width = 0, this_width;
+  size_t i;
   char *str1, *str2 = "\n\0", *str3;
 
   if (text == NULL) 



Next: