Bug 137778 - [EFL] window.screen.width returns wrong value if more displays are available
Summary: [EFL] window.screen.width returns wrong value if more displays are available
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Grzegorz Czajkowski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-16 07:56 PDT by Grzegorz Czajkowski
Modified: 2014-10-17 03:44 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.03 KB, patch)
2014-10-16 08:02 PDT, Grzegorz Czajkowski
no flags Details | Formatted Diff | Diff
Patch for landing (2.06 KB, patch)
2014-10-17 02:32 PDT, Grzegorz Czajkowski
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grzegorz Czajkowski 2014-10-16 07:56:32 PDT
ecore_x_screen_size_get() retrieves the size of Ecore_X_Screen, for example,
having two displays of 1680x1050, it will return 33600x1050.

Unlike EFL's MiniBrowser, Firefox and Chrome return screen of the current display.
Comment 1 Grzegorz Czajkowski 2014-10-16 08:02:17 PDT
Created attachment 239948 [details]
Patch
Comment 2 Jinwoo Song 2014-10-17 00:23:27 PDT
Looks good to me.
Comment 3 Gyuyoung Kim 2014-10-17 00:29:20 PDT
Comment on attachment 239948 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=239948&action=review

> Source/WebCore/platform/efl/PlatformScreenEfl.cpp:94
> +    if (ecore_x_randr_query() && ecore_x_window_focus_get())

ecore_x_window_focus_get() is called twice. How about using a variable to handle it ?

Ecore_X_Window focusedWindow = ecore_x_window_focus_get();
Comment 4 Grzegorz Czajkowski 2014-10-17 02:32:29 PDT
Created attachment 240008 [details]
Patch for landing
Comment 5 Grzegorz Czajkowski 2014-10-17 02:34:46 PDT
(In reply to comment #3)
> Comment on attachment 239948 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=239948&action=review
> 
> > Source/WebCore/platform/efl/PlatformScreenEfl.cpp:94
> > +    if (ecore_x_randr_query() && ecore_x_window_focus_get())
> 
> ecore_x_window_focus_get() is called twice. How about using a variable to
> handle it ?
> 
> Ecore_X_Window focusedWindow = ecore_x_window_focus_get();

Nice catch! Fixed.
Comment 6 WebKit Commit Bot 2014-10-17 03:43:59 PDT
Comment on attachment 240008 [details]
Patch for landing

Clearing flags on attachment: 240008

Committed r174819: <http://trac.webkit.org/changeset/174819>
Comment 7 WebKit Commit Bot 2014-10-17 03:44:04 PDT
All reviewed patches have been landed.  Closing bug.