Project

General

Profile

Bug #3064

Dragging a Web GUI window out of document's visible area makes the window disappear

Added by Hynek Cihlar about 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:

3064_bug.mkv (365 KB) Sergey Ivanovskiy, 04/14/2016 12:49 AM

3064_1.txt Magnifier (4.5 KB) Sergey Ivanovskiy, 04/14/2016 03:47 AM

History

#1 Updated by Hynek Cihlar about 8 years ago

  1. Run an app with a top-level window in Web GUI client.
  2. Drag the window out of the document's visible area.
  3. The window will disappear.

#2 Updated by Greg Shah about 8 years ago

  • Start date deleted (04/13/2016)
  • Assignee set to Sergey Ivanovskiy

#3 Updated by Sergey Ivanovskiy about 8 years ago

Is it the same bug that has been found during the regression testing of 1811t?

./window_parenting/waitfor_2wnd.p for the web client the second window (hwin2) disappears if we move it. (regression P2j trunc doesn't have this bug)

#4 Updated by Sergey Ivanovskiy about 8 years ago

Testing ./demo/simple_windows.p for P2j trunc proves that if we move windows out of the browser's view to its left side, then they jump to the opposite right side of the view and the horizontal scrollbar appears. Thus these two windows are still accessible by moving the horizontal scroll bar.

#5 Updated by Sergey Ivanovskiy about 8 years ago

After recent commits in P2J trunc this function activateTopVisibleWindow of p2j.screen.js module was broken and p2j.socket.sendWindowActive was removed:

   /**
    * Move the first upper visible window to the top of other visible windows
    * after the selected window is minimized.
    * 
    * @param    {Number} id
    *           The id of the window that has been minimized.
    */
   function activateTopVisibleWindow(id)
   {
      var topWindow = findTopVisibleWindow(id);
      var focusOut = !(topWindow);
      p2j.socket.sendWindowActive(id, false, focusOut);
      if (topWindow)
      {
         topWindow.moveToTop();
         p2j.socket.sendWindowActive(topWindow.id, true, false);
      }
   }

#6 Updated by Sergey Ivanovskiy about 8 years ago

Committed revision 11006 (1811u) fixed the window location coordinates to have 32 bits size.

#7 Updated by Hynek Cihlar about 8 years ago

Sergey Ivanovskiy wrote:

After recent commits in P2J trunc this function activateTopVisibleWindow of p2j.screen.js module was broken and p2j.socket.sendWindowActive was removed:
[...]

I renamed sendWindowActive to sendWindowActivated and changed the signature of the method to take the id of the window being deactivated and id of the window being activated. Can you please modify activateTopVisibleWindow accordingly?

#8 Updated by Sergey Ivanovskiy about 8 years ago

Ok, planning to fix it, but function doWindowActivationChange(deactivatingWindowId, activatingWindowId) doesn't work too.

#9 Updated by Hynek Cihlar about 8 years ago

Sergey Ivanovskiy wrote:

Ok, planning to fix it, but function doWindowActivationChange(deactivatingWindowId, activatingWindowId) doesn't work too.

What is wrong there in particular?

#10 Updated by Sergey Ivanovskiy about 8 years ago

I divide this function into parts with comments. Please look at

   function doWindowActivationChange(deactivatingWindowId, activatingWindowId)
   {
      // do we have a valid window being deactivated?
      if (deactivatingWindowId != -1)
      {
         var win = getWindow(deactivatingWindowId);

         if (!win.isVisible())
         {
            p2j.socket.sendWindowIconState(windowId, false);
         }
      }

The variable win can be invalid window if deactivatingWindowId is -1.
      
      // do we have a valid window being activated?
      if (activatingWindowId != -1)
      {
         // de-iconify the window
         win.deiconify();
      }

      // send the window activation to the java side
      if (activatingWindowId != -1 || deactivatingWindowId != -1)
      {
         p2j.socket.sendWindowActivated(deactivatingWindowId, activatingWindowId);
      }
   }

Hynek, please correct me that now it is enough to send this message sendWindowActivated one time for deactivating the old window and activating new one.

#11 Updated by Hynek Cihlar about 8 years ago

Sergey Ivanovskiy wrote:

I divide this function into parts with comments. Please look at
[...]
The variable win can be invalid window if deactivatingWindowId is -1.
[...]

You are right the body of the second if statement is missing the following:

var win = getWindow(activatingWindowId);

I am glad you caught this.

Hynek, please correct me that now it is enough to send this message sendWindowActivated one time for deactivating the old window and activating new one.

Yes, this is exactly how it is supposed to work now. One message instead of two.

#12 Updated by Sergey Ivanovskiy about 8 years ago

Committed revision 11007 fixed doWindowActivationChange and activateTopVisibleWindow.

#13 Updated by Greg Shah about 8 years ago

Code Review Task Branch 1811u Revision 11007

The changes look fine to me. however the p2j.screen.js does need a history entry.

Hynek: are you OK with the change in activateTopVisibleWindow()?

#14 Updated by Sergey Ivanovskiy about 8 years ago

Now, I am doing the bug related to resizing in the web client. The window can be squeezed but can't be resized to widen its width and height. Should I create a new task or fix it within this task?

#15 Updated by Greg Shah about 8 years ago

  • Target version set to Milestone 16
  • Status changed from New to Closed
  • % Done changed from 0 to 100

Please create a new task. I'm closing this one.

#16 Updated by Hynek Cihlar about 8 years ago

Greg Shah wrote:

Code Review Task Branch 1811u Revision 11007

The changes look fine to me. however the p2j.screen.js does need a history entry.

Hynek: are you OK with the change in activateTopVisibleWindow()?

The changes are OK.

#17 Updated by Greg Shah over 7 years ago

  • Target version changed from Milestone 16 to Cleanup and Stabilization for GUI

Also available in: Atom PDF