PDA

View Full Version : pgcedit 8 window highlight item focus lost


david42
16th February 2008, 09:37
First let me commend the author for a great program. Awesome!

I noticed something in the switch from 7.X to 8.X in the behavior of the window highlight focus getting lost. No problem in 7.X but the windows gui looked different in 8.X and this problem appeared immediately.

If I have a LU or title highlighted on the left pane then use preview and press ESC to abort the preview (or at the end of the preview playing), the highlight "sometimes" goes away on the item in the left pane that should be lit up. I have to move the mouse to the item and left click on it to get the highlight back.

Another (possible) symptom of this loss of highlight focus is that the left pane lines sometimes jump up (scroll down of lines) without me using the down arrow key to cause the scroll.

Both of these seem to cause the highlight to go away and both are random in terms of occurring. I use winXP Pro. The hardware is stable although this could possibly be a dual core processor issue. If I get any other clues about what forces it or doesn't force it I'll update this thread. I just wanted to let you know.

r0lZ
16th February 2008, 13:19
Well, there are several problems with the whole window loosing the focus after having used the preview. Notably, the focus is sometimes lost if you close the preview with the escape key. I don't understand why. Seems it's an OS issue. Anyway, it's the global focus of the window that is lost. The currently highlighted items in the left and right panes should not change. Maybe you have an application running on your system that creates fake mouse or keyboard input? Some viruses or spyware do that to steal your passwords, so, take care!

If you can find a way to reproduce the problem and describe it exactly, please let me know.

Calimari
16th February 2008, 16:18
Close all other applications. With no other windows (minimized in the taskbar), there's nothing that can "steel" the focus.
It's not ideal, but it's better than losing focus all the time.

r0lZ
16th February 2008, 16:37
I have noticed that too, but I wonder if it's a Windows issue. The last window that has the focus before opening the preview should receive it back, unless another one gets activated during the playback, right?

Anyway, I don't know how to fix this issue in my code. In trace mode, as the preview must be closed before continuing the trace, I can perhaps force the focus back to PgcEdit (and iirc it's what I do already), but when the preview is launched as a background task, I can't do that, as I cannot know when it is closed.

david42
16th February 2008, 20:39
I'll make notes next time I run into it.

BTW... I believe the gui look and feel went through a radicalectomy from 7.x to 8.x. Is it possible the compiler used for the gui 8.x version needs to have bug fix updates installed before you build again? I agree that this sounds like the OS but most problems have more to do with what changed when they 1st reared their ugly head. I NEVER saw this on the 7.x versions UNTIL the gui look and feel changed (circa 8.0 or 8.1) that it popped up.

blutach
16th February 2008, 22:46
This problem is becoming a bit more prevalent. As you know r0lZ, when I reported it, we couldn't track it down at all. I wonder if it's a return code with the preview, in which case jeanl may be able to assist?

And Calimari, what happens on your suggestion is the focus goes to the desktop.

@david42, perhaps we can confer with r0lZ on what progs are running. This problem has been around for a little while, I think but only affects a few of us.

@r0lZ - one keyboard prog I have running is a program called Shortkeys. It is basically a macro keystroke generator. By the way, the problem isn't just with the ESC key for me.

Regards

r0lZ
17th February 2008, 05:30
I know. The problem can happen also when you click Close. But it seems it is more systematic with ESC.

@david42: What do you mean? I haven't changed the GUI look and feel around v8.0, and never at all. But the Tk library inherits some aspect of your window manager. If you did recently an update of your Windows system, or installed another theme, maybe PgcEdit has changed also.

david42
21st February 2008, 01:32
Loss of window focus between Pgcedit’s left pane after using the Previewing window:

FYI...I do not use any non XP keyboard programs that I installed. winXP Pro SP2+Updates. Intel Duo 2 Core 2.66GHz processor, 2GB memory, 500GB SATA-3 Hard disk, Nvidia 7500LE graphics, HP USB keyboard, HP USB mouse.

On to the duplication recipe...

First Preview, then use Esc key before preview play is done, then use Cntl-K on a few LU's in the VMGM domain to blank some useless video clips. On the last Cntl-K this window pops up.

(I can't figure out how to insert an image of the pop-up window)
---------------------------------------------------------------------
Verify number of streams (in current domain)
! There are 1 audio streams defined for the Menu domain
in the VMGM_MAT table of VMGM.
0 audio stream are really used by the PGCs.

Fix the number of audio streams in VMGM_MAT to 0?
YES NO
------------------------------------------------------------------

use return key to clear the window. Then this window shows up

-------------------------------------------------------------------
Verify number of streams (in current domain)
! There is one subpic stream defined for the Menu domain
in the VMGM_MAT table of VMGM.
However, all PGCs of the domain are dummies.

The subpic definition should therefore be removed.

Fix the number of subpic streams in VMGM_MAT to 0?
YES NO
-------------------------------------------------------------------

use return key to clear the window. Then use down arrow key to scroll down. BUT the scroll doesn't happen!!! Strange because the PgcEdit main window title bar is highlighted so it should have the window XP Pro focus!!! Highlight frozen on VMGM LU at this point.

use mouse to click on the VTSM1 LU1 you want go to next and left click mouse now the left window highlight will move when using arrow keys.

now use Cntl-M to edit a few menus to Hide->Skip to non deleted button then down arrow to scroll down.

next time a VTST1,2 video needs to be blanked previewing caused the main pcgedit title bar to lose highlight and the down arrow key doesn't scroll down from the VTST1,2 item. To get the down arrow to work, left click the mouse on the pgcedt title bar to regain window focus.

use down arrow to move to VTST2,1 then Cntl-P to preview but abort before play is done. the main pgcedit title bar lost highlight again and the down arrow doesn't work unless you left click on VTST2,1 again.

This is often the scenario on the loss of window focus problem.

PS: Isn't there an easier way to communicate with the author?
I'm not putting images up on a website so I can insert the
http of the image so the receiver can see what I saw.
There's got to be an easier way to try to help out?

The only other app running actively is AntiVir guard and an open My Computer window.

Other than those I run as little as possible (eg. winXP Pro SP2+).


Tk library is not something understand. I see it's a C++ism from google. Is it something that changed around your 8.0 release?

Perhaps tcl is making a funny at us?

BTW, is tk mp safe or buggy compared to MS windows API calls?

r0lZ
21st February 2008, 07:29
Thanks for the precisions.

You can easily copy/paste the content of a standard yes/no/cancel dialog by right-clicking on it. To insert images in a forum, use ImageShack (http://imageshack.us/) and post a thumbnail here. You can write me at my email address (see my homepage), but I prefer to continue this discussion here, as other users may be interested.

Tk is the ToolKit library of Tcl (but is also available for other languages.) It is responsible of the GUI, with the exception of the preview. That library is multi-platform, and therefore is not directly based on the Windows APIs.

You describe two different problems. The first one happens with the standard Yes/No/Cancel dialogs. Those dialogs are written in Tcl/Tk by me. (I can't use the normal dialogs any more, as there is a bug in Vista and the text is not properly formatted any more.) Indeed, after having closed such a dialog, although the global focus is kept by the PgcEdit window, the widget focus is lost. It's probably a bug in my code, and I should be able to fix it easily.

The other problem is with the preview. The preview is a totally independent application, written in C, by Jeanl. It is launched either synchronously or asynchronously from PgcEdit. In both cases, Windows considers it as a different application, and should handle the focus normally, and return it to the last app that was active before the closing of the preview window. However, in some cases, that doesn't work. I really don't know why, and I have already tried to fix that problem without success.

When the preview is launched synchronously (from the trace), my code is stopped during the preview, and continues when it is closed. Therefore, I have tried to insert some code to force the focus back to the PgcEdit window, but unfortunately, it is not possible to force the focus on a window if the app has not the focus already. (I don't know if it's a Windows or Tk limitation or bug.)

When the preview is launched asynchronously (when you can continue to work in PgcEdit itself when the preview is running) I have no way to know when the preview window is closed, and therefore I cannot execute code to try to regain the focus.

Since the global focus is theoretically handled by Windows, and the behaviour is different if some other windows are currently opened (and perhaps also when you close the preview with the mouse or with the keyboard), I guess it's a Windows bug. Sorry, but we have to live with it.

r0lZ
21st February 2008, 08:32
OK, the bug with the Yes/No/Cancel dialogs is fixed, and I have also improved how the focus is restored after having closed the preview in trace mode.

I have also verified my code, and I can confirm that I'm not responsible of the problem with the preview in asynchronous mode. Furthermore, there are no problems under Linux, and under Windows, the problem occurs more frequently (but not always!) when there are several other windows (of other apps) opened, so I guess it's a Windows bug.

david42
21st February 2008, 18:46
FYI, I believe the loss of fucos after aborting the preview window problem has to do with using dual core processoring. My reason is that I turned off my 2nd processor core (Intel CPU), did 3 movies, and never saw the loss of focus coming out of preview mode with ESC.

r0lZ
21st February 2008, 23:16
Not sure. I have an old P II single processor, and I have the problem.

blutach
21st February 2008, 23:31
@david42 - I believe it was as you originally said - it happened between versions. I had no problems till an upgrade - can't remember which.

@r0lZ - do you still have the original email I sent you on this - it might help pinpoint the exact beta version that this happened with?

Regards

david42
16th April 2008, 21:47
I'm running XP Pro with Windows updates through ~Jan 2008 installed. I do NOT run any "special keyboard" programs. At the time the pgcedit main window focus gets lost (title bar of window NOT re-highlighted) the only things other than the OS that are running are :

Desktop :
1 My Computer window is open
1 PgcEdit v8.6
System tray :
Avira Antivir PE Classic Guard (active)
Realtek HD Audio Manager (doubtful that it is active or
using keyboard or mouse)
Quick Launch :
Only IE 6 is in the quick start bar

It seems that the focus issue is not so much about what I'm running, instead possibly how tcl calls/returns from pgcedit works in winXP Pro under different LU/TTN select-> preview-> Esc scenarios.

david42
16th April 2008, 22:05
Please be understanding that I'm not up on all the correct terminologies for DVD structures so I'll just try my best to use labels I see when using PgcEdit in an attempt to do my best.

I've run into 2 triggering event scenarios to check out.

Trigger events -

1. VMGM LU playback preview (Cntrl-p) then close preview (ESC during or at end of playback) then kill (Cntrl-k). Repeat this for all playbacks in VMGM domain. Note that when the last playback is deleted there are 2 window pop-ups having to do with authorizing correction of streams to 0. After you ok both of those pop-ups the pane highlight and keyboard focus are broken (intermittent, does not always occur).

2. VTS TTN playback preview (Cntrl-p) then close preview (ESC during or at end of playback) then kill (Cntrl-k) or delete (Cntrl-delete). After you ESC the preview the left pane highlight and keyboard focus are broken (intermittent, does not always occur).

Workaround -

Workaround is to left click the mouse on any left window line to refocus the left pane highlight and keyboard focus.

My observation over multiple movies is that it may depend on the pcg commands for the vob preview.

r0lZ
16th April 2008, 22:07
We have finally found the problem. It's something in the preview exe, and, thanks to Jeanl, it's fixed. Please wait the next version of PgcEdit...

david42
4th June 2008, 21:22
Is there a "next" version release date planned? It would be greatly appreciated, well at least by me.

r0lZ
4th June 2008, 22:20
Yes, yes, but I still need some time...