2010/4/16 Silvio Clecio :
Show quoted text 15 lines
Can somebody please take a look at the patch attached in http://bugs.freepascal.org/view.php?id=13537 and report any problems or questions back to me?
Best regards,
Fl?vio

Mailing lists / lazarus / 2010-04
12 messages · 5 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
2010/4/16 Silvio Clecio :
Can somebody please take a look at the patch attached in http://bugs.freepascal.org/view.php?id=13537 and report any problems or questions back to me?
Best regards,
Fl?vio
I can't compile Lazarus anymore. (current svn trunk revision 24680)
I use > make clean all bigide
On opensuse 11.1 X86_64 and I use gtk2 widgets, fpc 2.4.0
This is the error output:
Compiling synhighlighterlfm.pas
synhighlighterlfm.pas(720,13) Error: Illegal type conversion: "^untyped" to "<enumeration type>"
synhighlighterlfm.pas(740) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
make[2]: *** [allsyneditunits.ppu] Fout 1
make[2]: Map '/home/erwin/fpc/lazarus/components/synedit' wordt verlaten make[1]: *** [synedit_all] Fout 2
make[1]: Map '/home/erwin/fpc/lazarus/components' wordt verlaten make: *** [components] Fout 2
Revision 24621 compiles fine. Revision 24622 and above gives this error.
Groetjes,
Erwin.
The line
Result := TLfmCodeFoldBlockType(p);
should probably be:
Result := TLfmCodeFoldBlockType(PtrUInt(p));but it is interesting that neithe 2.4.0. nor 2.5.1 say anything about it here. Not even a a warning. Makes it hard to spot those oversights.....
2010/4/16 Silvio Clecio : Can somebody please take a look at the patch attached in…
I'm using. Here (Ubuntu-9.10/FPC-2.2.4-3/Lazarus-0.9.28.2/GTK2) is working perfectly well :)
The line Result := TLfmCodeFoldBlockType(p); should probably be: Result :=…
That helped a bit.
But also line 731. Same there.
After that it compiles ok!
"Typecasting pointers is such fun in object pascal! Why don't we go back to c++?" ;-)
Groetjes,
Erwin
I'm using. Here (Ubuntu-9.10/FPC-2.2.4-3/Lazarus-0.9.28.2/GTK2) is working perfectly well…
In windows win32/XP i have window flicker (like the IDE hide and show) every time i open new dialog, for example the search dialog, is that depend on your patch?
Thanks in advance.
The flicker is there anyway, once you moved a dialog.
Lazarus stores for each dialog where you had it last time. But unfortunately, those coordinates are only applied after the dialog is visble at it's designed position => flicker
Martin
@Martin I meant the IDE forms not the my application form, @Silvio i decided it belong your patch, becuase i noticed you are use "UpdateShowInTaskBar" in some function, if we follow it to Win32 wedgets, it Hide the form then Show it, hiding the visible form get forcus to another forms and show it, before showed it, that make a flicker, You can see
if Visible then
ShowWindow(AForm.Handle, SW_HIDE);I comment this line and build Lazarus IDE, the flicker is gone.
---------------
class procedure TWin32WSCustomForm.SetShowInTaskbar(const AForm:
TCustomForm;
const AValue: TShowInTaskbar);
var
Style: DWord;
Visible, Active: Boolean;
begin
if not WSCheckHandleAllocated(AForm, 'SetShowInTaskbar') then
Exit;
if (Application nil) and (AForm = Application.MainForm) then
Exit;
// to apply this changes we need either to hide window or recreate it.
Hide is
// less difficult
Visible := IsWindowVisible(AForm.Handle);
Active := GetForegroundWindow = AForm.Handle;
if Visible then
ShowWindow(AForm.Handle, SW_HIDE);
Style := GetWindowLong(AForm.Handle, GWL_EXSTYLE);
if AValue = stAlways then
Style := Style or WS_EX_APPWINDOW
else
Style := Style and not WS_EX_APPWINDOW;
SetWindowLong(AForm.Handle, GWL_EXSTYLE, Style);
// now we need to restore window visibility with saving focus
if Visible then
if Active then
ShowWindow(AForm.Handle, SW_SHOW)
else
ShowWindow(AForm.Handle, SW_SHOWNA);
end;
--------------Best regards
Look at
procedure TCustomForm.WMActivate(var Message : TLMActivate);
// The button reappears in some situations (e.g. when the window gets the
//"urgency" flag) so we hide it again here.
// This is the most important place to invoke UpdateShowInTaskBar, since
//invoking it anywhere else seeems basically useless/frequently reversed.
if (ShowInTaskBar = stNever) or ((ShowInTaskBar = stDefault)
and (Application.TaskBarBehavior = tbSingleButton)) then
begin
UpdateShowInTaskBar;
end;
For non main form it hide and show every time the form is activated, when
use "Application.TaskBarBehavior := tbSingleButton" in the project.I think the to resolve a problem in GTK2 "The button reappears in some situations"
Thanks
2010/4/19 Zaher Dirkey :
Thanks for testing it, Zaher.
I guess we'll have to add a check for
"WidgetSet.GetLCLCapability(lcNeedMininimizeAppWithMainForm)" in the code above, since the comments in TWin32WSCustomForm.SetShowInTaskbar suggest we can't eliminate the "hide" and I also see no WS-dependent way to determine whether we could skip SetShowInTaskbar when the value is already correct...
-Fl?vio
@Martin I meant the IDE forms not the my application form, @Silvio i decided it belong…
Zaher Dirkey escreveu:
[...]
@Silvio i decided it belong your patch, becuase i noticed you are use "UpdateShowInTaskBar" in some function, if we follow it to Win32
[...]
Hellow Zaher :)
I tested only on Linux(Ubuntu) :/
Gave an error when compiling, but I created .lfm (msgview.lfm) and compiled normal.
2010/4/19 Zaher Dirkey : Thanks for testing it, Zaher. I guess we'll have to add a check…
My friends, I am very happy to see you determined to solve this problem. This feature will help in productivity of many users who use Lazarus on Linux (Ubuntu).
For you have an idea, look at the amount of downloads of DEB packages:
http://sourceforge.net/projects/lazarus/files/
Veeery thanks! :)