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
1=== modified file 'src/PanelMenuView.cpp'
2--- src/PanelMenuView.cpp 2011-03-07 10:59:31 +0000
3+++ src/PanelMenuView.cpp 2011-03-09 07:04:10 +0000
4@@ -822,6 +822,7 @@
5 _is_grabbed = true;
6 Refresh ();
7 FullRedraw ();
8+ WindowManager::Default ()->Raise (bamf_window_get_xid (window));
9 WindowManager::Default ()->StartMove (bamf_window_get_xid (window), x, y);
10 }
11 }
12
13=== modified file 'src/PluginAdapter.cpp'
14--- src/PluginAdapter.cpp 2011-02-10 21:06:26 +0000
15+++ src/PluginAdapter.cpp 2011-03-09 07:04:10 +0000
16@@ -362,6 +362,17 @@
17 window->lower ();
18 }
19
20+void
21+PluginAdapter::Raise (guint32 xid)
22+{
23+ Window win = (Window)xid;
24+ CompWindow *window;
25+
26+ window = m_Screen->findWindow (win);
27+ if (window)
28+ window->updateAttributes (CompStackingUpdateModeAboveFullscreen);
29+}
30+
31 void PluginAdapter::MaximizeIfBigEnough (CompWindow *window)
32 {
33 XClassHint classHint;
34
35=== modified file 'src/PluginAdapter.h'
36--- src/PluginAdapter.h 2011-02-10 21:06:26 +0000
37+++ src/PluginAdapter.h 2011-03-09 07:04:10 +0000
38@@ -82,6 +82,7 @@
39 void Minimize (guint32 xid);
40 void Close (guint32 xid);
41 void Lower (guint32 xid);
42+ void Raise (guint32 xid);
43
44 void MaximizeIfBigEnough (CompWindow *window);
45
46
47=== modified file 'src/WindowManager.cpp'
48--- src/WindowManager.cpp 2011-02-25 20:34:43 +0000
49+++ src/WindowManager.cpp 2011-03-09 07:04:10 +0000
50@@ -67,6 +67,11 @@
51 {
52 g_debug ("%s", G_STRFUNC);
53 }
54+
55+ void Raise (guint32 xid)
56+ {
57+ g_debug ("%s", G_STRFUNC);
58+ }
59 };
60
61 WindowManager *
62
63=== modified file 'src/WindowManager.h'
64--- src/WindowManager.h 2011-02-09 14:28:54 +0000
65+++ src/WindowManager.h 2011-03-09 07:04:10 +0000
66@@ -55,6 +55,7 @@
67 virtual void Close (guint32 xid) = 0;
68
69 virtual void Lower (guint32 xid) = 0;
70+ virtual void Raise (guint32 xid) = 0;
71
72 virtual void Decorate (guint32 xid);
73 virtual void Undecorate (guint32 xid);