Merge lp://qastaging/~renatofilho/unity/unity-lp876017-fixes into lp://qastaging/unity

Proposed by Renato Araujo Oliveira Filho
Status: Merged
Approved by: Timo Jyrinki
Approved revision: no longer in the source branch.
Merged at revision: 2662
Proposed branch: lp://qastaging/~renatofilho/unity/unity-lp876017-fixes
Merge into: lp://qastaging/unity
Diff against target: 981 lines (+425/-321)
7 files modified
plugins/unityshell/src/unityshell.cpp (+311/-295)
plugins/unityshell/src/unityshell.h (+30/-26)
unity-shared/PluginAdapter.h (+4/-0)
unity-shared/PluginAdapterCompiz.cpp (+67/-0)
unity-shared/PluginAdapterStandalone.cpp (+6/-0)
unity-shared/WindowManager.cpp (+5/-0)
unity-shared/WindowManager.h (+2/-0)
To merge this branch: bzr merge lp://qastaging/~renatofilho/unity/unity-lp876017-fixes
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
jenkins continuous-integration Pending
Review via email: mp+122357@code.qastaging.launchpad.net

Commit message

UnityWindow: scale window code improved

* Fixed code style.
* Moved function "GetWindowName" from UnityWindow to WindowManager.
* Used glib::Object auto pointer instead of "c" pointer;

Description of the change

* Fixed code style.
* Moved function "GetWindowName" from UnityWindow to WindowManager.
* Used glib::Object auto pointer instead of "c" pointer;

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ok, nice... It's getting better!
Another thing that must be

23:29:10 <renato> this last point you notice about the string, I do not think this is a good solution since the string is created internally by "XGetWindowProperty" and they recommend to free the memory with XFree

Yeah, but XFree is basically free, so I'd ust glib::String for that too.

Another thing that should be fixed is the titlebar font, You're actually using a sans font, but you should instead use the system font; you can see again QuicklistMenuItem::DrawText how to get the proper font name and dpi values.

An extra nice plus would be to cut the long titles fading them out, there's some code that already does it in PanelMenuView::DrawTitle, give that a test. ;)

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> Another thing that should be fixed is the titlebar font, You're actually using
> a sans font, but you should instead use the system font; you can see again
> QuicklistMenuItem::DrawText how to get the proper font name and dpi values.

Err... I didn't remember I wrote Style::Instance().GetFontDescription(PanelItem::TITLE), you can safely use this. See the panelmenuview code for this too ;)

Revision history for this message
Michal Hruby (mhr3) wrote :

> 23:29:10 <renato> this last point you notice about the string, I do not think
> this is a good solution since the string is created internally by
> "XGetWindowProperty" and they recommend to free the memory with XFree
>
> Yeah, but XFree is basically free, so I'd ust glib::String for that too.
>

Mixing memory allocation functions from multiple libraries isn't a good idea... Yes, right now both XFree and g_free might be just aliases for free(), but that doesn't mean that's always the case. Please keep the XFree.

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Mh, I see that the fade is using a linear gradient here, I think you should change it so that it only cuts the exceeding pixels with a small fade effect (as the top bar does).

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ah, another thing... Is it just me or I see the top bar starting one px before the thumbnail x?

http://i.imgur.com/D8nI1.png

Revision history for this message
Michal Hruby (mhr3) wrote :

> Ah, another thing... Is it just me or I see the top bar starting one px before
> the thumbnail x?
>
> http://i.imgur.com/D8nI1.png

Seeing that too, not all the time though, perhaps a float conversion issue?

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

> Mh, I see that the fade is using a linear gradient here, I think you should
> change it so that it only cuts the exceeding pixels with a small fade effect
> (as the top bar does).

I'm using the same code used as "PanelMenuView::DrawTitle" which other code are you talking about?

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

> > Mh, I see that the fade is using a linear gradient here, I think you should
> > change it so that it only cuts the exceeding pixels with a small fade effect
> > (as the top bar does).
>
>
> I'm using the same code used as "PanelMenuView::DrawTitle" which other code
> are you talking about?

Ok I found the problem, fixed on rev. 2658

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Hi guys I have fixed the problems, but I found a problem related with maximized windows which is not exactly related with this bug, but produce a bad window drawing. Take a look on this image: http://i.imgur.com/6COGR.jpg

How I can fix it?

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

> Hi guys I have fixed the problems, but I found a problem related with
> maximized windows which is not exactly related with this bug, but produce a
> bad window drawing. Take a look on this image: http://i.imgur.com/6COGR.jpg
>
> How I can fix it?

Mhm, I think you need make scale to produce smaller windows that consider the height of your decoration.
See if you can set that at scale level and then make unity to define its padding.

Revision history for this message
Loris Zinsou (nepenthes) wrote :

I'm still running the Unity Staging PPA version of Unity, any idea why the maximized window decoration cannot be clicked to raise the window ? Un-maximised windows are not affected by this issue.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

> I'm still running the Unity Staging PPA version of Unity, any idea why the
> maximized window decoration cannot be clicked to raise the window ? Un-
> maximised windows are not affected by this issue.

yes I have fixed this on rev: 2660, this happen because the maximized window does not have decorations.

Revision history for this message
Loris Zinsou (nepenthes) wrote :

That's fine then !

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Looks good, further improvements coming into lp:~3v1n0/unity/spread-title-improved

review: Approve
Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1205/console reported an error when processing this lp:~renatofilho/unity/unity-lp876017-fixes branch.
Not merging it.

Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1210/console reported an error when processing this lp:~renatofilho/unity/unity-lp876017-fixes branch.
Not merging it.

Revision history for this message
Unity Merger (unity-merger) wrote :

The Jenkins job https://jenkins.qa.ubuntu.com/job/automerge-unity/1212/console reported an error when processing this lp:~renatofilho/unity/unity-lp876017-fixes branch.
Not merging it.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.