Recent

Author Topic: Modal Form in fullscreen program PROBLEM  (Read 8128 times)

kevinspencer33

  • New Member
  • *
  • Posts: 22
    • Adenochrome
Modal Form in fullscreen program PROBLEM
« on: January 14, 2011, 03:34:45 pm »
I've mading a program that run in fullscreen mode using
Code: [Select]
gdk_window_fullscreen(PGtkWidget(Handle)^.window)
but, if I try to show a modal form,  the panel of the OS is shown.

Here you have an screen capture:

http://dl.dropbox.com/u/12475647/Captura-6.png

Some one know how to solve this problem?


Sora-Kun

  • Full Member
  • ***
  • Posts: 162
  • I can smell your presence ...
    • Sora-Kun
Re: Modal Form in fullscreen program PROBLEM
« Reply #1 on: January 14, 2011, 04:13:36 pm »
Hi,
I have no Idea about the error, but I have another tip to show your app on a full-screen mod,
just copy-paste the following code on your program, exactly on the body of the procedure which will turn on/off full-screen mod:

Code: [Select]
{$J+} //writeable constants on
const
  rect: TRect = (Left:0; Top:0; Right:0; Bottom:0);
  ws : TWindowState = wsNormal;
{$J-} //writeable constants off
var
  r : TRect;
begin
  if BorderStyle <> bsNone then
  begin
    ws := WindowState;
    rect := BoundsRect;

    BorderStyle := bsNone;
    r := Screen.MonitorFromWindow(Handle).BoundsRect;
    SetBounds(r.Left, r.Top, r.Right-r.Left, r.Bottom-r.Top) ;
  end
  else
  begin
    BorderStyle := bsSizeable;.
    if ws = wsMaximized then
      WindowState := wsMaximized
    else
      SetBounds(rect.Left, rect.Top, rect.Right-rect.Left, rect.Bottom-rect.Top) ;
  end;
end;
Hope this will help you, I took it from http://delphi.about.com/od/delphitips2010/qt/delphi-application-full-screen-mode-f11.htm
Good luck :D
LinkOS
if nothing suites you, make it your self!
The Revolution, Genesis. The next generation IDE.
If you want to help, PM me.

Made in Lazarus.
Soon, in The WWW.

Chronos

  • Full Member
  • ***
  • Posts: 240
    • PascalClassLibrary
Re: Modal Form in fullscreen program PROBLEM
« Reply #2 on: January 14, 2011, 04:24:54 pm »
Here is summarization wiki page about full screen application mode: http://wiki.freepascal.org/Application_full_screen_mode

You can add additional useful information..

kevinspencer33

  • New Member
  • *
  • Posts: 22
    • Adenochrome
Re: Modal Form in fullscreen program PROBLEM
« Reply #3 on: January 15, 2011, 01:06:08 pm »
@Linkos: this code don't work well under Gnome... so I used the gtk method.
@Chronos: The code that I used is taken directly from this page.

Anyway, I decided to don't use modal forms in my app.

But this problem it's still a bug from Gnome or Lazarus... I don't know why but I think it may be a Gnome limitation...

cpicanco

  • Hero Member
  • *****
  • Posts: 618
  • Behavioral Scientist and Programmer
    • Portfolio
Re: Modal Form in fullscreen program PROBLEM
« Reply #4 on: October 18, 2017, 08:13:45 pm »
Anything new about that?
Be mindful and excellent with each other.
https://github.com/cpicanco/

zeljko

  • Hero Member
  • *****
  • Posts: 1591
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Modal Form in fullscreen program PROBLEM
« Reply #5 on: October 18, 2017, 09:18:30 pm »
it's problem with window managers. Try qt app under kwin (kde) and you'll see that everything works as expected, but same qt app under metacity or any other wm can have strange behaviour.

 

TinyPortal © 2005-2018