After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 580679 - Going fullscreen sometimes leaves GNOME menubar visible
Going fullscreen sometimes leaves GNOME menubar visible
Status: RESOLVED FIXED
Product: vinagre
Classification: Applications
Component: general
2.26.x
Other Linux
: Normal normal
: ---
Assigned To: vinagre-maint
vinagre-maint
Depends on:
Blocks:
 
 
Reported: 2009-04-29 02:12 UTC by Robert Ancell
Modified: 2013-08-02 21:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of incorrect fullscreen vinagre (120.39 KB, image/png)
2009-04-29 02:21 UTC, Robert Ancell
  Details
Vinagre in fullscreen mode (188.54 KB, image/png)
2009-06-24 19:15 UTC, Jonathan Underwood
  Details
proposed patch (1.47 KB, patch)
2013-08-01 14:14 UTC, Jonh Wendell
committed Details | Review
proposed patch, rdp (1.45 KB, patch)
2013-08-01 16:08 UTC, Jonh Wendell
committed Details | Review

Description Robert Ancell 2009-04-29 02:12:59 UTC
To reproduce:
1. Start VNC server on remote machine (e.g. RealVNC on Windows Vista)
2. Connect from Gnome machine using vinagre
3. Click fullscreen button on vinagre toolbar
4. Vinagre displays entire remote desktop most of the time, however approximately 1 in 6 times the Gnome menubar is still visible and the remote desktop has been shifted down (see attached screenshot).

Tested with both local and remote machine set to 1280x800 resolution.

vinagre 2.26.1, metacity 2.25.144.

Reported in Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/vinagre/+bug/331456
Comment 1 Robert Ancell 2009-04-29 02:21:42 UTC
Created attachment 133538 [details]
Screenshot of incorrect fullscreen vinagre

This shows it even worse with the fullscreen display also shifted from the left of the screen.
Comment 2 Jonathan Underwood 2009-06-24 19:12:28 UTC
Still present in 2.26.2
Comment 3 Jonathan Underwood 2009-06-24 19:15:54 UTC
Created attachment 137336 [details]
Vinagre in fullscreen mode
Comment 4 Jonathan Underwood 2009-06-24 19:17:16 UTC
Actually, for me I see that it only properly enters full screen mode 1 time in 10 or 12, the rest of the time it's messed up as shown in the screenshot.
Comment 5 Bastien Nocera 2009-06-25 09:34:35 UTC
My guess is that the code to do the fullscreening checks the window's state, and sees whether the window is fullscreen or not. That's broken, as the window state changes async.

Instead you should be using gdk_window_fullscreen/unfullscreen on its own, based on the previous state.

The actual hiding/showing of elements should be done in the callback for the "window-state-event" signal (which is where you would record the previous state as well).

See window_state_event_cb() in totem/src/totem-object.c for example.
Comment 6 Jonathan Underwood 2009-07-06 16:11:23 UTC
As far as I can see, vinagre does use gtk_window_[un]fullscreen - see:

http://svn.gnome.org/viewvc/vinagre/trunk/src/vinagre-window.c?revision=534&view=markup

In particular around line 1078. So I think that's not the problem, but I may have misunderstood.

Oh, I just re-read comment #5 which refers to gdk_window_fullscreen - is there anything wrong with using gtk_window_fullscreen?

Comment 7 Jonh Wendell 2013-08-01 14:14:36 UTC
Created attachment 250625 [details] [review]
proposed patch

this patch fix this issue.

david, if approved, may I push this to 3.8 as well?
Comment 8 Jonh Wendell 2013-08-01 16:08:08 UTC
Created attachment 250639 [details] [review]
proposed patch, rdp

this patch fixes the rdp plugin
Comment 9 David King 2013-08-02 07:30:31 UTC
Review of attachment 250639 [details] [review]:

Hi Jonh, is there any reason why this should not be in the default_get_dimensions() virtual function? Taking the dimensions from the GdkWindow for the tab widget seems like a reasonable default.
Comment 10 David King 2013-08-02 08:13:31 UTC
Review of attachment 250625 [details] [review]:

The patch seems fine, and should be fine for the stable branch. Please drop the "vnc:" prefix from the first line of the commit message, and instead add it inline, for example "Implement get_dimensions() for VNC" (keeping in mind a limit of 50 characters). For the remainder of the commit message, please make the first letter a capital, and use up to 72 characters per line. There is also a small typo: please add "to" between "whether" and "show".
Comment 11 Jonh Wendell 2013-08-02 13:15:50 UTC
(In reply to comment #9)
> Review of attachment 250639 [details] [review]:
> 
> Hi Jonh, is there any reason why this should not be in the
> default_get_dimensions() virtual function? Taking the dimensions from the
> GdkWindow for the tab widget seems like a reasonable default.

because this wouldn't get the real size of the widget. the widget is put inside a scrolledwindow because it can be potentially larger than window size.

so, it's up to the implementation (who have access to the internal gdkwindow) to return the correct size.

just for reference, I tried to do that in vinagre-tab.c:

static void
default_get_dimensions (VinagreTab *tab, int *w, int *h)
{
  GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (tab));

  if (window)
    {
      *w = gdk_window_get_width (window);
      *h = gdk_window_get_height (window);
      g_print ("have window!!   w = %d, h = %d\n", *w, *h);
    }
  else
    {
      *w = -1;
      *h = -1;
      g_print ("don't have window...\n");
    }
}

and it didn't work...
Comment 12 David King 2013-08-02 19:27:03 UTC
Review of attachment 250639 [details] [review]:

Ugh, then it seems it has to be done in each plugin. The same comments apply as for the VNC patch. Thanks!
Comment 13 Jonh Wendell 2013-08-02 21:36:50 UTC
pushed with those changes in commit message to master and 3.8