[As-users] 2.2.1, compiling, debugging, placement

Juergen Leising (juergen.leising@gmx.de)
Thu, 23 Mar 2006 23:54:21 +0100


Hi,

I have several minor and major problems with 2.2.1.
Here are some of the minor ones:


1. configure and autoconf/configure.in:

Please remove

	-Wid-clash-31

as it is no longer supported by recent versions of gcc
(cf. gcc/ChangeLog-2001). My gcc-4.1.0 even refused to compile it.


2. src/tools/ASWallpaper/interface.c: around line 443:

id is uninitialized:

void on_backgrounds_dir_changed( ASGtkXMLEditor *xe, gpointer
user_data, Bool new_file)
{
      ASGtkImageDir *id = ASGTK_IMAGE_DIR(id);        
...
}

Shouldn't that read:

      ASGtkImageDir *id = ASGTK_IMAGE_DIR(user_data); 



3. src/afterstep/afterstep.c:

window_id2name() is not known to me nor to my compiler. So
I had to comment it out:

#ifdef DEBUG_TRACE_X
/*      trace_window_id2name_hook = &window_id2name;    */ 
#endif



4. libAfterBase/trace.c:

Please add an if clause, to prevent SIGSEV I got for
whatever reason:

int
trace_enable_function (const char *name)
{
        int           i;
        int           val = -1;

        if (name == NULL)
                return val;


5. libAfterBase/output.h:

Please provide the logs with human readable timestamps,
as noone is interested in seconds since 1970. For example:


/* (around line 64): */

/* for human readable timestamps in afterstep's logfile: */
time_t unreadable;      /* man 2 time: "calender time" */
struct tm *broken_down; /* man ctime: "broken-down time" */
char readable[256];
struct timeval tv;      /* man gettimeofday */


#define LOCAL_DEBUG_OUT(format,args...) {                       \
        unreadable = gettimeofday(&tv, NULL);                   \
        broken_down = localtime(&(tv.tv_sec));                  \
        strftime (readable, (size_t) 256, "%T", broken_down);   \
        do{ fprintf( stderr, "%s:%s.%li:%s:%s:%d:>" format "\n",\
ApplicationName,  readable, tv.tv_usec, __FILE__, __FUNCTION__,
__LINE__, ## args );                                            \
        }while(0);                                              \
}

#define LOCAL_DEBUG_CALLER_OUT(format,args...) {                \
        unreadable = gettimeofday(&tv, NULL);                   \
        broken_down = localtime(&(tv.tv_sec));                  \
        strftime (readable, (size_t) 256, "%T", broken_down);   \
        do{ fprintf( stderr, "%s:%s.%li:%s:%s:> called from [%s]
with args(" format ")\n",                                       \
        ApplicationName, readable, tv.tv_usec, __FILE__, __FUNCTION__, get_calle
r_func(), ## args );                                            \
        }while(0);                                              \
}




6. And now one of the major problems:

The whole placement system of afterstep-2.x.x is completely
messed up. The basic requirement of a window manager
is that it manages windows without provoking major
headaches. I did dig into that a bit, but after all
I didn't get it, at least not that quickly. For example
look at
	libAfterStep/hints.h
and
	libAfterStep/clientprops.h (although disabled here):

/* AS Startup flags :                                      */
#define AS_StartPosition        (1<<0)
#define AS_StartPositionUser    (1<<1)
#define AS_Position             (1<<1)

Two different flags share the same value. Small wonder, that

	xeyes

on let's say the fourth viewport starts correctly inside the current
viewport, whereas

	xeyes -geometry +100+100

does not: It pops up coercively on the 1st viewport.

Why? Because the second window will take a different
way through init_aswindow_status() in src/afterstep/winstatus.c,
especially at the line

	if( !get_flags( t->status->flags, AS_Position )) 

and will therefore miss the assignment 

		 t->status->x = x ;
		 t->status->y = y ;

Ok, maybe all of those three flags are meant to indicate the
same - maybe old code vs. new code. Is there an explanation
in hints.h or in any other header file? Maybe in
src/afterstep/asinternals.h? Not really. At least nothing
about AS_Position. 

Separating  AS_StartPosition and AS_StartPositionUser from
AS_Position, btw, did stop that coercive movement to the very
first viewport. But this confused the winlist, the pager
the wharf and the monitoring wharf.


7. Makefiles:

Please switch to autoconf and automake eventually. They produce
better Makefiles than the current ones. The latter simply ignore
many errors (note: there is a .PHONY target) and don't allow the
use of objdirs.

Bye, Juergen


-- 
***********************************************************
		http://www.8ung.at/leising/	     	
		http://leising.freeshell.org/	     
*********************************************************** 
_______________________________________________
As-users mailing list
As-users@afterstep.org
http://mail.afterstep.org/mailman/listinfo/as-users