delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/17/09:49:16

To: djgpp AT delorie DOT com
Subject: Re: Question about wip X-allegro
References: <385A2DEF DOT 9AD160F AT ciam DOT ru>
From: Michael Bukin <M DOT A DOT Bukin AT inp DOT nsk DOT su>
Date: 17 Dec 1999 19:20:53 +0600
In-Reply-To: Yury Fedorchenko's message of "Fri, 17 Dec 1999 15:34:56 +0300"
Message-ID: <20r9gl900a.fsf@Sky.inp.nsk.su>
Lines: 89
X-Mailer: Gnus v5.5/Emacs 19.34
Reply-To: djgpp AT delorie DOT com

Yury Fedorchenko <y_fedor AT ciam DOT ru> writes:

> I have some questions:

IMHO, these questions are off-topic for DJGPP newsgroup.  If you have
access to e-mail services, you'd better ask questions about Allegro on
one of Allegro mailing lists (see Allegro home page for mailing list
addresses).

> 1. When will final relise be ready?

X version of Allegro was integrated in WIP version of Allegro.  It
will be released together with new version of Allegro.  New major
version of Allegro will be released when it is ready (I think, nobody
knows when).  But latest WIP versions are rather stable and there
should be no significant changes in API, so you can use WIP version of
Allegro.

> 2. Under X86Free (WM) examples programs are not lie in "window", when I
> test it on CDE all Ok.

You did not tell us which version of Allegro you are using.  If you
don't use WIP version 3.9.29, then get it from

http://sunsite.auc.dk/allegro/wip.html

If you are using new WIP of Allegro already, then read on.  I don't
understand what do you mean with "example programs do not lie in
window".  If you mean that window size is not set correctly, i.e. only
part of Allegro screen is visible in window, then it is known problem
with some window managers.  Apply the following patch and test if it
works correctly.  Let me know if it does not work.

bash% tar -xzvf all3929.tar.gz
bash% patch -p1 <mail.txt
bash% cd all3929
bash% configure
bash% make depend
bash% make


--- old/all3929/src/x/xwin.c	Sun Dec 12 21:51:26 1999
+++ new/all3929/src/x/xwin.c	Tue Dec 14 10:30:24 1999
@@ -1897,23 +1897,37 @@
    if (_xwin.window == None)
       return;
 
-   /* Set size and position hints for Window Manager.  */
+   /* New window size.  */
+   _xwin.window_width = w;
+   _xwin.window_height = h;
+
+   /* Resize window.  */
+   XResizeWindow(_xwin.display, _xwin.window, w, h);
+
    hints = XAllocSizeHints();
    if (hints == 0)
       return;
 
-   hints->flags = USSize | USPosition | PMinSize | PMaxSize | PBaseSize;
+   /* Set size and position hints for Window Manager.  */
+   hints->flags = USPosition | PMinSize | PMaxSize | PBaseSize;
    hints->x = 0;
    hints->y = 0;
    hints->min_width  = hints->max_width  = hints->base_width  = w;
    hints->min_height = hints->max_height = hints->base_height = h;
    XSetWMNormalHints(_xwin.display, _xwin.window, hints);
-   XFree(hints);
 
    /* Resize window.  */
-   _xwin.window_width = w;
-   _xwin.window_height = h;
    XResizeWindow(_xwin.display, _xwin.window, w, h);
+
+   /* Set size and position hints for Window Manager.  */
+   hints->flags = USPosition | PMinSize | PMaxSize | PBaseSize;
+   hints->x = 0;
+   hints->y = 0;
+   hints->min_width  = hints->max_width  = hints->base_width  = w;
+   hints->min_height = hints->max_height = hints->base_height = h;
+   XSetWMNormalHints(_xwin.display, _xwin.window, hints);
+
+   XFree(hints);
 }
 
 

-- 
Michael Bukin

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019