NS_METHOD nsWindow::ConstrainPosition needs impelentation in BeOS

RESOLVED FIXED

Status

()

Core
XUL
RESOLVED FIXED
15 years ago
15 years ago

People

(Reporter: Sergei Dolgov, Assigned: Paul)

Tracking

Trunk
x86
BeOS
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

2.87 KB, patch
Sergei Dolgov
: review+
Details | Diff | Splinter Review
(Reporter)

Description

15 years ago
BeZilla users frequently complain about sitation when browser goes in
fullscreen-like state (but F11 don't work), so they should remove localstore.rdf
to restore normal size and position.
(Assignee)

Comment 1

15 years ago
taking
Status: NEW → ASSIGNED
(Assignee)

Comment 2

15 years ago
taking
Assignee: jaggernaut → arougthopher
Status: ASSIGNED → NEW
(Assignee)

Updated

15 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 3

15 years ago
Created attachment 119927 [details] [diff] [review]
implement constrainposition

ConstrainPosition implementation
(Assignee)

Comment 4

15 years ago
Comment on attachment 119927 [details] [diff] [review]
implement constrainposition

Sergei, can you review this?
Attachment #119927 - Flags: review?(sergei_d)
(Reporter)

Comment 5

15 years ago
That's good you proposed this. My current implementation of method was much simpler:

{
  if (eWindowType_dialog != mWindowType && eWindowType_toplevel != mWindowType)
    return NS_OK;
  if(*aX <=0)
    *aX=2;
  if(*aY <=0)
    *aY=20;
  return NS_OK;
}
Probably your version is more intelligent. Will try it
(Assignee)

Comment 6

15 years ago
this is based on the gtk version, and also uses the allowSlop boolean passed in
(Assignee)

Comment 7

15 years ago
Created attachment 120041 [details] [diff] [review]
updated patch

Updated patch:
- Takes into account window borders and the title bar 
  - these values are defined as constants, since BeOS does not provide them
  - the title bar height is the height of the tallest title bar under BeOS
    (that I can find)
- Only deals with dialogs and windows now
Attachment #119927 - Attachment is obsolete: true
(Assignee)

Updated

15 years ago
Attachment #119927 - Flags: review?(sergei_d)
(Assignee)

Updated

15 years ago
Attachment #120041 - Flags: review?(sergei_d)
(Reporter)

Comment 8

15 years ago
Paul, it seems something happened when you created last patch, and it misses now
 both declaration of mIsTopWidgetWindow (nsWindow.h) and assignment of  values
to it, initiall, and real (nsWindow.cpp)
(Reporter)

Comment 9

15 years ago
Another notice Paul, what do you think about changing style from

foo {
}

to 

foo
{
}

everywhere in BeOS code?
Personally i can't stand first style...
(Assignee)

Comment 10

15 years ago
nope, that variable existed before my original patch, but was never used.  So 
I, since it was set the same way as the windows port, I backed out my "new" 
variable, and am using the previously "unused" variable.

as far as style changes, personally, I don't care.  I can read the code either 
way.  I usually write my code using the first style, because I'm a java dev :-
)  But, that doesn't mean i have to.
(Reporter)

Comment 11

15 years ago
Comment on attachment 120041 [details] [diff] [review]
updated patch

Works well here, reviewing
Attachment #120041 - Flags: review?(sergei_d) → review+
(Assignee)

Comment 12

15 years ago
this has been checked in
Status: ASSIGNED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.