Recent

Author Topic: Bug into bringtofront?  (Read 2148 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Bug into bringtofront?
« on: May 29, 2019, 02:02:20 pm »
Hi guys, I wrote a small test to simulate the opening and closing of a frame in the four corners of the window. If I start with frame1_1.visible: = true
everything works fine. But if I leave with the
frame1_1.visible: = false
there is a problem in the bringtofront. Can anyone tell me why? Is it a bug or am I wrong?

Thank you
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: Bug into bringtofront?
« Reply #1 on: May 29, 2019, 02:34:11 pm »
I forgot, it works perfectly on windows
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: Bug into bringtofront?
« Reply #2 on: May 29, 2019, 03:48:57 pm »
Identically problem when runtime created frame. Look example
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Bug into bringtofront?
« Reply #3 on: May 29, 2019, 04:01:07 pm »
Hi xinyiman,

I've tried your example project with Lazarus from trunk (Lazarus 2.1.0 r61292M FPC 3.0.4 x86_64-darwin-cocoa (alpha)), and I'm not seeing any problems.
Maybe I'm testing it wrong?
I've tested the project you posted first.
At startup the frame is not visible.
Clicking any of the 4 buttons makes the frame visible near the button.
Clicking the "Chiudi" button hides the frame again.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Bug into bringtofront?
« Reply #4 on: May 29, 2019, 05:17:01 pm »
what you're running into is overlapping sibling controls.
http://wiki.freepascal.org/Cocoa_Interface#Overlapping_Widgets

This is a Cocoa feature, and cannot be reliably bypassed.

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: Bug into bringtofront?
« Reply #5 on: May 29, 2019, 10:37:21 pm »
Hi xinyiman,

I've tried your example project with Lazarus from trunk (Lazarus 2.1.0 r61292M FPC 3.0.4 x86_64-darwin-cocoa (alpha)), and I'm not seeing any problems.
Maybe I'm testing it wrong?
I've tested the project you posted first.
At startup the frame is not visible.
Clicking any of the 4 buttons makes the frame visible near the button.
Clicking the "Chiudi" button hides the frame again.
Impossible. Look image
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Bug into bringtofront?
« Reply #6 on: May 29, 2019, 11:50:35 pm »
I'm really not making this up.

Hansaplast

  • Hero Member
  • *****
  • Posts: 674
  • Tweaking4All.com
    • Tweaking4All
Re: Bug into bringtofront?
« Reply #7 on: May 29, 2019, 11:52:01 pm »
Note:
If ListBox1 has focus, the focus border overlays the frame, but the listbox is still behind the frame.


Also; I used your first example, and just compiled it without modifying anything.
To change focus I used the TAB key.


Also note that I'm using Lazarus from trunk (SVN).
Lazarus 2.1.0 r61292M FPC 3.0.4 x86_64-darwin-cocoa (alpha)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: Bug into bringtofront?
« Reply #8 on: May 31, 2019, 09:20:45 am »
Yesterday I did a test, with fpcupdeluxe I installed the latest version of lazarus trunk and it still didn't work. I can't base my projects on a method that doesn't work correctly in crossplatform mode. I have to find an equivalent thing that works on windows, mac and ubuntu. Ideas?
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018