Open Bug 581863 Opened 14 years ago Updated 17 hours ago

gtk/nsWindow::GetScreenBounds returns client window size instead of outer (frame) size

Categories

(Core :: Widget: Gtk, defect, P3)

x86_64
Linux
defect

Tracking

()

REOPENED

People

(Reporter: karlt, Assigned: emilio)

References

(Blocks 1 open bug)

Details

(Whiteboard: tpi:-)

Attachments

(1 file)

nsIWidget::GetScreenBounds should return the "widget's outside dimensions in global coordinates. This includes any title bar on the window." Correcting this will make test_screenPersistence.xul at least correctly notice that windows created with outer dimensions have the wrong size. test_screenPersistance.xul will also fail because it opens a window with (inner, I assume) width/height = 300 and expects outerWidth/outerHeight to be 300.
gdk_window_get_frame_extents is the function to use here.
(In reply to comment #0) > Correcting this will make test_screenPersistence.xul at least correctly notice > that windows created with outer dimensions have the wrong size. Filed Bug 581866.
Assignee: nobody → diogo.gmt
Whiteboard: tpi:-
Closing GTK2 related bugs since we removed GTK2 support at the beginning of 2018 in bug 1278282. Probably best to open a new bug in the unlikely event that any of these are still relevant.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Summary: gtk2/nsWindow::GetScreenBounds returns client window size instead of outer (frame) size → gtk/nsWindow::GetScreenBounds returns client window size instead of outer (frame) size

The bug assignee didn't login in Bugzilla in the last 7 months.
:stransky, could you have a look please?
For more information, please visit auto_nag documentation.

Assignee: diogo.gmt → nobody
Flags: needinfo?(stransky)
Blocks: gtktitlebar
Flags: needinfo?(stransky)
Priority: -- → P3
Severity: normal → S3

I stumbled upon this bug while realizing that some of the math I'm doing
for PiP windows doesn't work at all on Linux (bug 1934760), because
screenX != mozInnerScreenX, even though outerWidth == innerWidth.

I've tested this on X11 and Wayland (plasma and Gnome) with CSD and SSD,
and in general, this is the same thing Windows does, so should be fine.

The basic idea is:

  • Keep mBounds being frame manager bounds (so, outer* and screen*),
    relative to mShell.

  • Keep mClientMargin to translate from mBounds to client bounds.

This is both simpler and makes the math consistent.

Assignee: nobody → emilio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: