Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2002-08

Lazarus with X-Win32

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Florian Klaempfl

I jsut tried to run lazarus with XWin32 (X server for Win32) and it runs fine as the following screen shot shows: http://www.klaempfl.de/lazarus.png . The performance
is through a 100Mbit network and running lazarus on a Cyrix 166+ very good also compared
with Kylix on my Athlon TB 1GHz :) ! The only problem is that running/debugging an
application inside of lazarus doesn't work:

TDesigner.KEYDOWN 120 1
TOutputFilter: "Free Pascal Compiler version 1.0.6 [2002/04/23] for i386" TOutputFilter: "Copyright (c) 1993-2002 by Florian Klaempfl" TOutputFilter: "Target OS: Linux for i386"
TOutputFilter: "Compiling /tmp/project1.lpr"
TDesigner.KEYUP 120 -1073741823
TOutputFilter: "Compiling unit1.pas"
TOutputFilter: "Assembling unit1"
TOutputFilter: "Assembling project1"
TOutputFilter: "Linking /tmp/project1"
TOutputFilter: "60 Lines compiled, 5.6 sec"
[TCompiler.Compile] end
[TDebugManager.DoInitDebugger] A
[TCmdLineDebugger] Debug PID: 11212
Xlib: unexpected async reply (sequence 0x4316c)!
Xlib: unexpected async reply (sequence 0x43188)!
Gdk-ERROR **: X connection to 192.168.42.1:0.0 broken (explicit kill or server s
hutdown).

I tried to set the DISPLAY variable in the run options. But it doesn't help either.
BTW: If the DISPLAY field is empty, lazarus should read it imo from the environment.
Or isn't it used anyway?

Reply by email

Florian Klaempfl
to Florian Klaempfl
you wrote 15 lines
> I tried to set the DISPLAY variable in the run options. But it doesn't help > either. It was not implemented. Now it is. > BTW: If the DISPLAY field is empty, lazarus should read it imo from the > environment. > Or isn't it used anyway? TProcess uses the default environment if no environement is given. So DISPLAY should have the same value as in the IDE. Now the IDE always copy its environment variables to the child (merged with the user overrides).

Hmmm, Running an application direct from lazarus (via F9) still doesn't work, i.e. lazarus crashes:

[TCompiler.Compile] CmdLine="/usr/local/bin/ppc386 -Rintel -S2cgi -Ch8000000 -OG1p1 -gl -XD -vewnhi -l -Fu~/fpc/projects/lazarus/lcl/units -Fu~/fpc/projects/lazarus/lcl/units/gtk /tmp/project1.lpr" TDesigner.KEYDOWN 120 1
TOutputFilter: "Free Pascal Compiler version 1.0.6 [2002/04/23] for i386" TOutputFilter: "Copyright (c) 1993-2002 by Florian Klaempfl" TOutputFilter: "Target OS: Linux for i386"
TOutputFilter: "Compiling /tmp/project1.lpr"
TOutputFilter: "Compiling unit1.pas"
TOutputFilter: "Assembling unit1"
TOutputFilter: "Assembling project1"
TOutputFilter: "Linking /tmp/project1"
TOutputFilter: "49 Lines compiled, 6.0 sec"
[TCompiler.Compile] end
[TDebugManager.DoInitDebugger] A
[TCmdLineDebugger] Debug PID: 12413
Xlib: unexpected async reply (sequence 0x39c9)!
Gdk-ERROR **: BadIDChoice (invalid resource ID chosen for this connection) serial 14794 error_code 14 request_code 1 minor_code 0

Reply by email

Markus Lüdin
to Florian Klaempfl: I jsut tried to run lazarus with XWin32 (X server for Win32) and it runs fine as the…

Hi All

I'm playing around with the native win32 interface and my compiled examples were always jumping around when I resized or moved them...so I spent some hours reading code and debuging the win32 Interface and I found following solution for the problem...I only hope it's not something that's already fixed :-) Because I used the daily sources and no the cvs access.....*pray*
Could somone check that? And maybe add this changes to the cvs tree?

Regards
Markus

File: win32object.inc
procedure: TWin32Object.ResizeChild
comment: Probably some debug code...
changes:

//  if Sender is TCustomForm then
//  begin
//    inc(Width, 50);
//    inc(Height, 50);
//  end;

File: win32callback.inc
procedure: WindowProc
comments: WM_SIZE and WM_MOVE return the new Client Size and Client Pos in LParam not the Window Size!!!
so i call GetWindowRect and get the window size.... changes:

    WM_SIZE:
    Begin
      Windows.GetWindowRect(Window, @Rect);
      With TLMSize(LMessage) Do
      Begin
        Msg := LM_SIZE;
        SizeType := WParam;
        Width := Rect.Right-Rect.Left;
        Height := Rect.Bottom-Rect.Top;
      End;
    End;
    WM_MOVE:
    Begin
      Windows.GetWindowRect(Window, @Rect);
      With TLMMove(LMessage) Do
      Begin
        Msg := LM_MOVE;
//        MoveType := WParam;   WParam is not defined!
        MoveType := 0;
        XPos := Rect.Left;
        YPos := Rect.Top;
      End;
    End;

Reply by email

Mattias Gaertner
to Florian Klaempfl: I jsut tried to run lazarus with XWin32 (X server for Win32) and it runs fine as the…
Show quoted text 5 lines
I jsut tried to run lazarus with XWin32 (X server for Win32) and it runs fine as the following screen shot shows: http://www.klaempfl.de/lazarus.png . The performance is through a 100Mbit network and running lazarus on a Cyrix 166+ very good also compared with Kylix on my Athlon TB 1GHz :) !

Cool.
Especially, since I have just reduced the amount of paint messages.

Show quoted text 6 lines
The only problem is that running/debugging an application inside of lazarus doesn't work: I tried to set the DISPLAY variable in the run options. But it doesn't help either.

It was not implemented. Now it is.

BTW: If the DISPLAY field is empty, lazarus should read it imo from the environment. Or isn't it used anyway?

TProcess uses the default environment if no environement is given. So DISPLAY should have the same value as in the IDE. Now the IDE always copy its environment variables to the child (merged with the user overrides).

Mattias

Reply by email