[Xfce-bugs] [Bug 1314] New: libxfcegui4: xfce_gtk_window_center_on_monitor doesn't always really center windows

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Sat Jan 7 20:14:49 CET 2006


Do NOT reply to this email.  To make further comments on this bug, use
the URL below:
http://bugzilla.xfce.org/show_bug.cgi?id=1314

           Summary: libxfcegui4: xfce_gtk_window_center_on_monitor doesn't
                    always really center windows
           Product: Xfce
           Version: 4.3.x (SVN trunk)
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: Medium
         Component: general
        AssignedTo: xfce-bugs at xfce.org
        ReportedBy: xfce-bug at sstuhr.dk


xfce_gtk_window_center_on_monitor in libxfcegui4 (which doesn't seem to have
it's own bugzilla component, btw.) uses the window width and height returned by
gtk_widget_size_request when calculating where to position the window.
The problem is that often windows are bigger than that. They may have been
resized by the user, or gtk_window_set_default_size may have been called.

The result is that the window get's positioned as if it hadn't been resized,
that is, it isn't centered on the monitor.

Instead, the width and height returned by gtk_window_get_size should be used.

Proposed patch follows.

Reproducible: Always
Steps to Reproduce:

-- 
Configure bugmail: http://bugzilla.xfce.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the Xfce-bugs mailing list