CudaText
CudaText copied to clipboard
Maximized windows are not restored correctly on startup
The CudaText window is not restored correctly after closing and restarting the application. Instead, the window is opened much too large, so that it is larger than the screen and the status bar and lower icons are not usable. To solve the problem, I have to maximize the window again so that it is displayed correctly. However, the next time I start the application, the problem reappears, which is annoying in the long run. Can this be changed?
CudaText 1.201.0.2, linux-x86_64-gtk2, fpc 3.2.3 Xfce Desktop (GTK), X11, ArchLabs (Arch Linux)
Here is a screenshot of how a maximized window looks on the desktop and is cut off at the bottom.
i see it little differently on Ubuntu (gnome). made a fix. must be better now? gtk2 binary:
on Qt5 or Windows, problem is not visible.
Wow thanks for the quick reply. :thumbsup: I have tried the new binary and unfortunately it does not work for me. If I now close the window maximized, the next time it opens as a normal window with the size and position from where it was last closed not maximized.
somehow WindowState:= wsMaximized
don't work for you. can you try on another Linux distro and/or another Desktop ?
also, look at settings/history.json: if you quit in maximized state file must have
{
"pos" : {
"main_max" : true,
is it so?
and 3rd question. this is demo which has button to maximize the window. project1_maxi.zip
(run binary project1
)
press the button. when window is on every your monitor. it works?
Unfortunately I don't have another desktop installed at the moment, I would have to download another live distribution first. The following entries can be found in history.json, I tested it with the original binary.
"pos" : {
"main_max" : true,
"main" : "100,100,800,600",
"main_mon" : 0
},
and 3rd question. this is demo which has button to maximize the window.
When I press the button of the app, the window is maximized successfully.
I cannot repro this yet, on Ubuntu 20.4 (gnome). i will try on Xubuntu later.
tried on Xubuntu (with Xfce desktop). now it is working for me. note: Xfce shows the same plus icon on the form caption for normal and maximized window. so we are stuck, 'cannot reproduce'. can you try Xubuntu too?
(make sure you overwrote the file cudatext
which is usually in the /usr/bin, with my new copy).
Okay I will test it later today on a laptop.
new demo modulates the work of Cud. it makes maximized state in OnShow, like Cud. it must show as maximized and Aqua-colored panel must be maximized too with border=10pixels. pls test. maybe it is maximized wrong?
(file 'project1')
That works great, the window is displayed maximized! Here is a resized screenshot.
thanks. so Lazarus works good in demo. let's test updated Cud on different Linux.
I have now tested it with Xubuntu and the result is as follows:
Cudatext_gtk2.zip works with Xubuntu but not with ArchLabs
Tst-WindowState_max.zip works with Xubuntu and ArchLabs