View Issue Details

IDProjectCategoryView StatusLast Update
0000579Cinelerra-GG[All Projects] Bugpublic2021-06-29 06:45
Reportersachmovictor Assigned ToPhyllisSmith  
PrioritynormalSeverityminorReproducibilityalways
Status acknowledgedResolutionunable to reproduce 
Product Version2020-08 
Target VersionFixed in Version 
Summary0000579: Window Positions Change With Every Start Up
Description//SYSTEM SPECS
//Linux Kernel: 5.4.0-74-generic
//Operating System: Linux Mint 20.1 Cinnamon
//Desktop Environment: Cinnamon 4.8.6
//CPU: Intel© Core™ i9-9900K CPU @ 3.60GHz × 8
//Memory: 62.7 GB
//Graphics Card: NVIDIA RTX 3090

Everytime I open the appimage for Cinelerra GG Infinity, all of the program windows that are not bordering the bottom of the computer screen, move slightly further down (along the Y-Axis) than they were positioned when the program was previously running. Saving and applying any layout (my own window layout, or the default layout) positions the windows slightly further down than they were actually positioned when the layouts were initially saved (again, unless they are already bordering the bottom of the computer screen/desktop). This means that the windows have to constantly be repositioned with for all controls to be visible and easily accessible.
Steps To Reproduce1) Simply open and close Cinelerra GG Infinity appimage within a system (or virtual machine) roughly approximating mine.

2) Also, if you apply a window layout within a similar enough system.

Both of these should present the aforesaid issue...
Tagsbug, GUI, Window

Activities

sachmovictor

sachmovictor

2021-06-29 06:45

reporter   ~0004867

@PhyllisSmith Please forgive the slow reply (I have been quite busy). Thank you for the script. I will look at it in the next day or two. It is very much appreciated! Please do take care.
PhyllisSmith

PhyllisSmith

2021-06-21 20:10

manager   ~0004854

Last edited: 2021-06-22 04:12

View 2 revisions

By SGE: (moved over) @SGE

Take the Perl script 'cin_run' from the attachment. Make it executable. Edit it in any text editor.

Several things have to be defined in the script: name of the 'cin' program, location of Cinelerra_rc file, and two displacements $X_ADJ and $Y_ADJ. The two displacements have to be configured by trial and error under your window manager which unpleasantly shifts Cinelerra windows on each start. You should adjust both displacements to compensate the quirk of your window manager.

Then run cin not directly but via this Perl script. It firstly executes the actual cin executable, and then, after it exits, corrects X and Y coords of the four Cinelerra windows in the rc-file.

Of course, the displacements depend on the window frame widths and/or window title height, and have to be readjusted again if they get changed by user.



cin_run (1,668 bytes)
#!/usr/bin/perl

# These X and Y displacements have to be adjusted by trial and error
# under your window manager
$X_ADJ = 41;
$Y_ADJ = 20;

# CinelerraGG executable
#$CIN = '/disk2/sge/cin-git/bin/cin';
$CIN = '/where/cinelerra/installed/bin/cin';

# CinelerraGG user's rc-file and a tmpfile
$CINRC = $ENV{HOME} . '/.bcast5/Cinelerra_rc';
$TMPRC = $ENV{HOME} . '/.bcast5/tmp_rc';

# Run CinelerraGG
system ($CIN);

# After CinelerraGG exits, edit rc-file produced to correct for displacements
open CRC, $CINRC or die "Cannot open $CINRC: $!";
open TRC, ">$TMPRC" or die "Cannot create $TMPRC: $!";

# Four windows displacements will be corrected:
# Timeline, Compositor, Viewer, Resources
while (<CRC>)
{
  chomp;
  if (($val) = /^MWINDOW_X\s+(.+)$/)
  {
    $val += $X_ADJ;
    print TRC "MWINDOW_X $val\n";
    next;
  }
  if (($val) = /^MWINDOW_Y\s+(.+)$/)
  {
    $val += $Y_ADJ;
    print TRC "MWINDOW_Y $val\n";
    next;
  }
  if (($val) = /^CWINDOW_X\s+(.+)$/)
  {
    $val += $X_ADJ;
    print TRC "CWINDOW_X $val\n";
    next;
  }
  if (($val) = /^CWINDOW_Y\s+(.+)$/)
  {
    $val += $Y_ADJ;
    print TRC "CWINDOW_Y $val\n";
    next;
  }
  if (($val) = /^VWINDOW_X\s+(.+)$/)
  {
    $val += $X_ADJ;
    print TRC "VWINDOW_X $val\n";
    next;
  }
  if (($val) = /^VWINDOW_Y\s+(.+)$/)
  {
    $val += $Y_ADJ;
    print TRC "VWINDOW_Y $val\n";
    next;
  }
  if (($val) = /^AWINDOW_X\s+(.+)$/)
  {
    $val += $X_ADJ;
    print TRC "AWINDOW_X $val\n";
    next;
  }
  if (($val) = /^AWINDOW_Y\s+(.+)$/)
  {
    $val += $Y_ADJ;
    print TRC "AWINDOW_Y $val\n";
    next;
  }
  print TRC "$_\n";
}

close TRC;
unlink $CINRC;
rename $TMPRC, $CINRC;

exit 0;
cin_run (1,668 bytes)
PhyllisSmith

PhyllisSmith

2021-06-20 18:18

manager   ~0004848

Marking as "resolved" because seems to be user specific. Will close in a couple of days.
sachmovictor

sachmovictor

2021-06-20 17:53

reporter   ~0004846

@PhyllisSmith No worries. If the issue is specific to me then there is no need to persist (as far as I am concerned, to each their own). I do appreciate the help and quick replies. Based on what I have read it may be something regarding the way I have configured my system or muffin itself (the cinnamon desktop environment windows manager). I will simply attempt to address the Cinelerra_rc file directly during start-up. Again, thank you for your help.

@sge as I mentioned earlier, I did use xdotool to address the lack of auto focus for all windows. I remember it being an incomplete and cumbersome solution. I am not complaining, so much as simply listing a potential bug, which seems to be a result specific to my system or windows manager (which I had no way of knowing at the time).

@sge @PhyllisSmithI believe I should address this problem on my own, since it seems specific to me and not Cinelerra per se.

Thanks everyone for their help and feedback. Please let me know if you need any more information from me.
PhyllisSmith

PhyllisSmith

2021-06-20 17:36

manager   ~0004845

@sachmovictor
Unfortunately it is working just fine here using Mint 20 (I think it is Linux Kernel: 5.4.0, 20.04 ?)
Desktop Environment per $XDG_CURRENT_DESKTOP report X-Cinnamon .
It is an 32 cpu AMD computer, probably Nvidia graphics, HP monitor -- I do not have exact specs because I do not leave it powered on.

It is unfortunate the it is working perfectly here, because it makes it impossible to see what the problem is. I also looked around the internet to see if anyone else reported a similar problem but no hits.
sge

sge

2021-06-20 16:36

reporter   ~0004843

Surely a window manager issue. Some window managers while reacting on a 'save yourself' instruction produce instead of the real window coords that ones with added widths of the window frame and/or window title. Some window managers behave correctly however.
For example, I am using fvwm2 and have a similar behavior of saving positions of cinelerra windows. But I know that cinelerra is not the actual source of the problem and do not complain.
I think it is hardly possible to fix the quirks of every window manager ever existing under X11. But it is possible to save some preferable window layout, edit it manually with a text editor to compensate for subsequent shifting, and then load it just after each start of cinelerra.
PhyllisSmith

PhyllisSmith

2021-06-20 15:36

manager   ~0004842

Thanks to @fary54 and @Andrea_Paz for feedback verifications as it helps to narrow down the problem.
@sachmovictor
I will try to boot a Mint 20 computer later today and see if it has the same problem and will email @MatN because he is very familiar with Mint and its variation.
It seems like the problem could be the window manager you are using? or its setup?
Andrea_Paz

Andrea_Paz

2021-06-20 07:54

manager   ~0004837

In Arch Linux with KDE, I found no shifting between restarts.
I used the latest appimage.

   before
MWINDOW_X 201
MWINDOW_Y 837
MWINDOW_W 1706
MWINDOW_H 503
LWINDOW_X 2427
LWINDOW_Y 0
LWINDOW_W 133
LWINDOW_H 864
VWINDOW_X 0
VWINDOW_Y 0
VWINDOW_W 1280
VWINDOW_H 827
CWINDOW_X 1201
CWINDOW_Y 44
CWINDOW_W 1280
CWINDOW_H 756

  after
MWINDOW_X 201
MWINDOW_Y 837
MWINDOW_W 1706
MWINDOW_H 503
LWINDOW_X 2427
LWINDOW_Y 0
LWINDOW_W 133
LWINDOW_H 864
VWINDOW_X 0
VWINDOW_Y 0
VWINDOW_W 1280
VWINDOW_H 827
CWINDOW_X 1201
CWINDOW_Y 44
CWINDOW_W 1280
CWINDOW_H 756

after.jpg (709,667 bytes)
before.jpg (711,196 bytes)
fary54

fary54

2021-06-20 06:19

reporter   ~0004836

@PhyllisSmith
I've read your exchanges about the shift in working windows following the CinelerraGG relaunch.
As far as I'm concerned, using Debian 10, I don't have this issue of window lag.
This little information can possibly help you in the search for a solution. That's the goal anyway...
sachmovictor

sachmovictor

2021-06-20 03:01

reporter   ~0004834

@PhyllisSmith Thank you for your prompt reply.

1) I have changed the scale several times to see if that was the issue - unfortunately, it was not (I tried scale 1.0, 2.0, and 3.0 a 4K UHD Monitor). I also monitored the $HOME/.bcast5/Cinelerra_rc file for changes with every start up of the program. I did indeed find a variable that was changing with each start up. A value of 32 is added to the existing value of CWINDOW_Y. I have noticed no other changes in values despite several careful comparisons (all though I am currently exhausted, so I may have missed something).

2) The windows that I have open are the Programs, Resources, and Compositor windows.

3) I have also re-installed the October 31, 2020 mint version of Cinelerra GG Infinity and the issue persists in identical fashion. I also deleted the .bcast5 file created by the appimage just in case. The files created by the October 31, 2020 mint version produced the same results.

I will try and test the latest appimage an an Ubuntu virtual machine to compare and report back any significant finding.

Again, thank you for the prompt reply and suggestions.
PhyllisSmith

PhyllisSmith

2021-06-20 01:09

manager   ~0004832

The location of the windows in Cinelerra is stored in $HOME/.bcast5/Cinelerra_rc . This file saves your preferences.
So you will see lines in this file like:
MWINDOW_X 0
MWINDOW_Y 527
MWINDOW_W 1274
MWINDOW_H 516
LWINDOW_X 1820
LWINDOW_Y 0
LWINDOW_W 100
LWINDOW_H 648
VWINDOW_X 0
VWINDOW_Y 27
VWINDOW_W 960
VWINDOW_H 611
CWINDOW_X 960
CWINDOW_Y 27
CWINDOW_W 960
CWINDOW_H 611

What must be happening is that something is off by 1 so that the locations change by 1 every time. You can
verify this by looking at the Cinelerra_rc file before starting the program. Making a copy, then starting the
program and after quitting, compare the original copy with the current Cinelerra_rc file.

This is most likely not going to help, but does changing "Layout Scale" in Settings->Preferences, Appearance tab to something just a little bit different make the problem less acute?
   https://cinelerra-gg.org/download/CinelerraGG_Manual/Layout_section.html#19809

@MatN may not be available to verify this for a few days.
Also, just out of curiosity, did this happen when using the Mint package of tar file from 10/31/2020?
PhyllisSmith

PhyllisSmith

2021-06-20 00:52

manager   ~0004831

@sachmovictor
That must be really annoying. This does not happen on Fedora O/S and I do not think on Ubuntu O/S either.
Or Arch (@Andrea_Paz).

@MatN
Uses a lot of Mint level O/S. Maybe he can shed some light on this as I am clueless. It seems like it might be the window setup? but that is just me guessing.

Issue History

Date Modified Username Field Change
2021-06-19 23:49 sachmovictor New Issue
2021-06-19 23:49 sachmovictor Tag Attached: bug
2021-06-19 23:49 sachmovictor Tag Attached: GUI
2021-06-19 23:49 sachmovictor Tag Attached: Window
2021-06-20 00:52 PhyllisSmith Note Added: 0004831
2021-06-20 01:09 PhyllisSmith Assigned To => PhyllisSmith
2021-06-20 01:09 PhyllisSmith Status new => acknowledged
2021-06-20 01:09 PhyllisSmith Note Added: 0004832
2021-06-20 03:01 sachmovictor Note Added: 0004834
2021-06-20 06:19 fary54 Note Added: 0004836
2021-06-20 07:54 Andrea_Paz File Added: after.jpg
2021-06-20 07:54 Andrea_Paz File Added: before.jpg
2021-06-20 07:54 Andrea_Paz Note Added: 0004837
2021-06-20 15:36 PhyllisSmith Note Added: 0004842
2021-06-20 16:36 sge Note Added: 0004843
2021-06-20 17:36 PhyllisSmith Note Added: 0004845
2021-06-20 17:53 sachmovictor Note Added: 0004846
2021-06-20 18:18 PhyllisSmith Status acknowledged => resolved
2021-06-20 18:18 PhyllisSmith Resolution open => unable to reproduce
2021-06-20 18:18 PhyllisSmith Note Added: 0004848
2021-06-21 20:10 PhyllisSmith File Added: cin_run
2021-06-21 20:10 PhyllisSmith Note Added: 0004854
2021-06-21 20:10 PhyllisSmith Status resolved => acknowledged
2021-06-22 04:12 PhyllisSmith Note Edited: 0004854 View Revisions
2021-06-29 06:45 sachmovictor Note Added: 0004867