Closed
Bug 239227
Opened 21 years ago
Closed 21 years ago
nsScreenGTK::GetAvailRect() should take the taskbar/panel/dock/etc into account if possible
Categories
(Core Graveyard :: GFX: Gtk, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: caillon, Assigned: caillon)
References
()
Details
(Keywords: fixed1.7)
Attachments
(2 files, 2 obsolete files)
778 bytes,
text/html
|
Details | |
9.82 KB,
patch
|
Details | Diff | Splinter Review |
Currently, getting the avail rect is wrong if you have a taskbar. This causes
some bugs like the initial firefox window opening too large.
I'll attach a patch.
Assignee | ||
Comment 1•21 years ago
|
||
Assignee | ||
Comment 2•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #145140 -
Flags: superreview?(bryner)
Attachment #145140 -
Flags: review?(blizzard)
Assignee | ||
Updated•21 years ago
|
Attachment #145140 -
Flags: review?(blizzard)
Assignee | ||
Updated•21 years ago
|
Attachment #145140 -
Flags: review?(blizzard)
Assignee | ||
Updated•21 years ago
|
Attachment #145141 -
Attachment mime type: text/plain → text/html
Assignee | ||
Comment 3•21 years ago
|
||
Comment on attachment 145140 [details] [diff] [review]
Patch
Oops, I meant to declare the member variables of nsScreenGTK private. Changed
locally.
Updated•21 years ago
|
Attachment #145140 -
Flags: review?(blizzard) → review+
Comment 4•21 years ago
|
||
Comment on attachment 145140 [details] [diff] [review]
Patch
>+void
>+nsScreenGtk :: Init ()
>+{
>+ mAvailRect = mRect = nsRect(0, 0, gdk_screen_width(), gdk_screen_height());
>+
>+#if GTK_CHECK_VERSION(2,2,0)
>+ // We need to account for the taskbar, etc in the available rect.
>+ // See http://freedesktop.org/Standards/wm-spec/index.html#id2767771
>+
>+ // XXX It doesn't change that often, but we should probably
>+ // listen changes to _NET_WORKAREA.
>+ // XXX do we care about _NET_WM_STRUT_PARTIAL? That will
>+ // add much more complexity to the code here, but should
>+ // lead to greater accuracy.
>+
>+ long *workareas;
>+ GdkAtom type_returned;
>+ int format_returned;
>+ int length_returned;
>+
>+ GdkWindow *root_window = gdk_screen_get_root_window(gdk_screen_get_default());
Hm, I'd really like if we could make this not require gtk+ 2.2.0. At a minimum
I'd suggest using GDK_ROOT_WINDOW() here if the gtk version is < 2.2. Or,
better, look up the symbol for gdk_screen_get_root_window dynamically, i.e.
PR_FindFunctionSymbolAndLibrary(), and only use GDK_ROOT_WINDOW if it's not
present. We really want this fix for firefox but I don't think we want to bump
the gtk version requirement for the binaries at this time.
Attachment #145140 -
Flags: superreview?(bryner) → superreview-
Assignee | ||
Updated•21 years ago
|
Attachment #146104 -
Flags: superreview?(bryner)
Updated•21 years ago
|
Attachment #146104 -
Flags: superreview?(bryner) → superreview+
Assignee | ||
Comment 6•21 years ago
|
||
Checked in to trunk 2004-04-19 08:34 PDT.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•21 years ago
|
||
Comment on attachment 146104 [details] [diff] [review]
Patch with older gtk support
I think this would be a good fix to get for 1.7 -- it is a harmless change
which fixes our window positioning to not consume more space than the window
manager gives it.
Attachment #146104 -
Flags: approval1.7?
Assignee | ||
Comment 8•21 years ago
|
||
Note to self to also pick up the gtk1 bustage fixes when landing on a branch.
Comment 9•21 years ago
|
||
Comment on attachment 146104 [details] [diff] [review]
Patch with older gtk support
a=asa (on behalf of drivers) for checkin to 1.7
Attachment #146104 -
Flags: approval1.7? → approval1.7+
Comment 10•21 years ago
|
||
when you land this on the 1.7 branch, please do not forget about the patch for
bug 241036.
Assignee | ||
Comment 12•21 years ago
|
||
This is the patch as it was checked in including bustage fixes and the like
(including darin's followup patch).
Attachment #146104 -
Attachment is obsolete: true
Updated•16 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•