Merge lp:~thjaeger/unity/raise-maximized into lp:unity

Proposed by Tom Jaeger
Status: Rejected
Rejected by: Alex Launi
Proposed branch: lp:~thjaeger/unity/raise-maximized
Merge into: lp:unity
Diff against target: 73 lines (+19/-0)
5 files modified
src/PanelMenuView.cpp (+1/-0)
src/PluginAdapter.cpp (+11/-0)
src/PluginAdapter.h (+1/-0)
src/WindowManager.cpp (+5/-0)
src/WindowManager.h (+1/-0)
To merge this branch: bzr merge lp:~thjaeger/unity/raise-maximized
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Jason Smith (community) Approve
Review via email: mp+52644@code.launchpad.net

Description of the change

Fix for bug #731761 (clicking on top panel should raise maximized windows):

https://bugs.launchpad.net/unity/+bug/731761

To post a comment you must log in.
Revision history for this message
Jason Smith (jassmith) wrote :

You are probably looking to call window->raise () rather than updateAttributes

review: Needs Fixing
Revision history for this message
Tom Jaeger (thjaeger) wrote :

No, this is intentional. If you look at the compiz event handler or the
move plugin, they both call updateAttributes rather than raise. I don't
fully understand why, but unity should do the same in any case.

On Fri, Mar 18, 2011 at 11:35 AM, Jason Smith <email address hidden> wrote:

> Review: Needs Fixing
> You are probably looking to call window->raise () rather than
> updateAttributes
> --
> https://code.launchpad.net/~thjaeger/unity/raise-maximized/+merge/52644<https://code.launchpad.net/%7Ethjaeger/unity/raise-maximized/+merge/52644>
> You are the owner of lp:~thjaeger/unity/raise-maximized.
>

Revision history for this message
Jason Smith (jassmith) :
review: Approve
Revision history for this message
Neil J. Patel (njpatel) :
review: Approve
Revision history for this message
Neil J. Patel (njpatel) wrote :

Hi Tom, it seems that something like this is already in Unity. On the bug, Bilal indicates it could have landed through a branch by Dylan McCall. Could you please test to see if Unity has gained this feature and if this branch is no longer necessary? It seems to work for me in trunk, but I'm not sure if I'm missing something. Thanks!

Revision history for this message
Alex Launi (alexlauni) wrote :

Yeah, this was previously implemented.

Unmerged revisions

932. By Tom Jaeger

Raise maximized window when clicking on the top panel (LP: #731761)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/PanelMenuView.cpp'
--- src/PanelMenuView.cpp 2011-03-07 10:59:31 +0000
+++ src/PanelMenuView.cpp 2011-03-09 07:04:10 +0000
@@ -822,6 +822,7 @@
822 _is_grabbed = true;822 _is_grabbed = true;
823 Refresh ();823 Refresh ();
824 FullRedraw ();824 FullRedraw ();
825 WindowManager::Default ()->Raise (bamf_window_get_xid (window));
825 WindowManager::Default ()->StartMove (bamf_window_get_xid (window), x, y);826 WindowManager::Default ()->StartMove (bamf_window_get_xid (window), x, y);
826 }827 }
827 }828 }
828829
=== modified file 'src/PluginAdapter.cpp'
--- src/PluginAdapter.cpp 2011-02-10 21:06:26 +0000
+++ src/PluginAdapter.cpp 2011-03-09 07:04:10 +0000
@@ -362,6 +362,17 @@
362 window->lower ();362 window->lower ();
363}363}
364364
365void
366PluginAdapter::Raise (guint32 xid)
367{
368 Window win = (Window)xid;
369 CompWindow *window;
370
371 window = m_Screen->findWindow (win);
372 if (window)
373 window->updateAttributes (CompStackingUpdateModeAboveFullscreen);
374}
375
365void PluginAdapter::MaximizeIfBigEnough (CompWindow *window)376void PluginAdapter::MaximizeIfBigEnough (CompWindow *window)
366{377{
367 XClassHint classHint;378 XClassHint classHint;
368379
=== modified file 'src/PluginAdapter.h'
--- src/PluginAdapter.h 2011-02-10 21:06:26 +0000
+++ src/PluginAdapter.h 2011-03-09 07:04:10 +0000
@@ -82,6 +82,7 @@
82 void Minimize (guint32 xid);82 void Minimize (guint32 xid);
83 void Close (guint32 xid);83 void Close (guint32 xid);
84 void Lower (guint32 xid);84 void Lower (guint32 xid);
85 void Raise (guint32 xid);
8586
86 void MaximizeIfBigEnough (CompWindow *window);87 void MaximizeIfBigEnough (CompWindow *window);
87 88
8889
=== modified file 'src/WindowManager.cpp'
--- src/WindowManager.cpp 2011-02-25 20:34:43 +0000
+++ src/WindowManager.cpp 2011-03-09 07:04:10 +0000
@@ -67,6 +67,11 @@
67 {67 {
68 g_debug ("%s", G_STRFUNC);68 g_debug ("%s", G_STRFUNC);
69 }69 }
70
71 void Raise (guint32 xid)
72 {
73 g_debug ("%s", G_STRFUNC);
74 }
70};75};
7176
72WindowManager *77WindowManager *
7378
=== modified file 'src/WindowManager.h'
--- src/WindowManager.h 2011-02-09 14:28:54 +0000
+++ src/WindowManager.h 2011-03-09 07:04:10 +0000
@@ -55,6 +55,7 @@
55 virtual void Close (guint32 xid) = 0;55 virtual void Close (guint32 xid) = 0;
56 56
57 virtual void Lower (guint32 xid) = 0;57 virtual void Lower (guint32 xid) = 0;
58 virtual void Raise (guint32 xid) = 0;
5859
59 virtual void Decorate (guint32 xid);60 virtual void Decorate (guint32 xid);
60 virtual void Undecorate (guint32 xid);61 virtual void Undecorate (guint32 xid);