WINDOWTITLE()

Forum for discussion about the documentation project.
Post Reply
speedfixer
Posts: 606
Joined: Nov 28, 2012 1:27
Location: CA, USA moving to WA, USA
Contact:

WINDOWTITLE()

Post by speedfixer »

If this function is not called before setting a new windowed mode via Screen (Graphics), the program window will use the executable file name (without the extension) as title by default.
This appears to not be true, at least for what I have seen. I think this has been true for some time - I just noticed it.
I get "Unnamed Window"

It is a bug, or just change docs. Doesn't matter to me.
If this works correctly on latest version, then no problem.

I still use:

david@HutchLU:~/Desktop$ fbc --version
FreeBASIC Compiler - Version 1.07.0 (05-20-2019), built for linux-x86_64 (64bit)
Copyright (C) 2004-2019 The FreeBASIC development team.
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WINDOWTITLE()

Post by fxm »

On my Windows PC, this behaves as it is written in the documentation.

To other users:
What is the default title of a graphics window depending on the platform you are using?
paul doe
Moderator
Posts: 1733
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: WINDOWTITLE()

Post by paul doe »

As described, indeed. Win10 here.
coderJeff
Site Admin
Posts: 4326
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: WINDOWTITLE()

Post by coderJeff »

On ubuntu x86_64, I see the "UntitledWindow"
I'm guessing this changed sometime around 2009. Originally, only one window was created.

Current X11 driver creates up to 3 windows
- a frame window, appears not used when mode is no-frame
- a full screen window, only used if gfx mode is full screen
- a client window for the drawing, always used

When X11 driver initializes the mode, the client window is set with the executable name
fbc's windowtitle statement sets the frame window name, which is shown by the window manager and in the frame

I don't think this was a deliberate choice.
Because if you start the mode with say SCREEN 12,,,fb.gfx_no_frame then the exe name is displayed in the window manager title bar. But then windowtitle statement can't change it.
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WINDOWTITLE()

Post by fxm »

I think the easiest way for documentation may be to move this sentence:
If this function is not called before setting a new windowed mode via Screen (Graphics), the program window will use the executable file name (without the extension) as title by default.
in the paragraph "Platform Differences" as specific to Windows.
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: WINDOWTITLE()

Post by MrSwiss »

@fxm, don't forget to add ScreenRes() also (for completeness sake).
coderJeff
Site Admin
Posts: 4326
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: WINDOWTITLE()

Post by coderJeff »

Looks like it will be an easy fix in the source to match manual, which is nice for a change. Hopefully can get it merged in today.
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WINDOWTITLE()

Post by fxm »

Good news !
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WINDOWTITLE()

Post by fxm »

MrSwiss wrote:@fxm, don't forget to add ScreenRes() also (for completeness sake).
Done:
KeyPgWindowtitle → fxm [added link to 'Screenres' keyword]
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: WINDOWTITLE()

Post by D.J.Peters »

On the WindowTitle() page I would add a two more links !

See also:
ScreenControl(SET_WINDOW_TITLE, title)
ScreenControl(GET_WINDOW_TITLE)
Screen (Graphics)
Screenres

Joshy
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: WINDOWTITLE()

Post by fxm »

OK:
KeyPgWindowtitle → fxm [added link to 'ScreenControl' keyword]
Post Reply