Merge lp://qastaging/~smspillaz/compiz-core/compiz-core.lim into lp://qastaging/compiz-core/0.9.5

Proposed by Sam Spilsbury
Status: Superseded
Proposed branch: lp://qastaging/~smspillaz/compiz-core/compiz-core.lim
Merge into: lp://qastaging/compiz-core/0.9.5
Diff against target: 843 lines (+623/-8)
15 files modified
gtk/window-decorator/CMakeLists.txt (+6/-0)
gtk/window-decorator/decorator.c (+32/-6)
gtk/window-decorator/events.c (+48/-0)
gtk/window-decorator/gtk-window-decorator.h (+7/-1)
gtk/window-decorator/local-menus/CMakeLists.txt (+60/-0)
gtk/window-decorator/local-menus/src/local-menus.c (+200/-0)
gtk/window-decorator/local-menus/src/local-menus.h (+69/-0)
gtk/window-decorator/local-menus/tests/CMakeLists.txt (+3/-0)
gtk/window-decorator/local-menus/tests/check_local_menu_on_off/CMakeLists.txt (+21/-0)
gtk/window-decorator/local-menus/tests/check_local_menu_on_off/test-local-menu-on-off.cpp (+17/-0)
gtk/window-decorator/local-menus/tests/force_local_menu_on/CMakeLists.txt (+21/-0)
gtk/window-decorator/local-menus/tests/force_local_menu_on/test-force-local-menu-on.cpp (+67/-0)
gtk/window-decorator/local-menus/tests/test-local-menu.h (+48/-0)
gtk/window-decorator/metacity.c (+22/-0)
gtk/window-decorator/wnck.c (+2/-1)
To merge this branch: bzr merge lp://qastaging/~smspillaz/compiz-core/compiz-core.lim
Reviewer Review Type Date Requested Status
Daniel van Vugt Needs Resubmitting
Review via email: mp+91231@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2012-02-06.

Description of the change

Adds support for Ubuntu's "locally integrated menu bars" into gtk-window-decorator.

No tests as of yet, but I'll try and write some for

showing/hiding
forcing them on/off
positions etc

soonish.

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

8 +#define GWD_SHOW_LOCAL_MENU (WNCK_WINDOW_ACTION_BELOW << 1)

No plausible reason for using a macro. In C++ constants (enum or unsigned int) are better as they respect scope rules. Also, should this be inside "#ifdef META_HAS_LOCAL_MENUS" conditional?

296 button_layout->right_buttons[2] = META_BUTTON_FUNCTION_CLOSE;
297
298 - for (i = 3; i < MAX_BUTTONS_PER_CORNER; i++)
299 + for (i = 4; i < MAX_BUTTONS_PER_CORNER; i++)
300 button_layout->right_buttons[i] = META_BUTTON_FUNCTION_LAST;
301 }

I'm not sure what the magic number "3"->"4" is. But we now seem to miss 3 entirely. Is that correct?

2980. By Sam Spilsbury

Split the local menus stuff out into its own file(s)

2981. By Sam Spilsbury

Move the code into a more testable state, add unit tests, etc

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

> 8 +#define GWD_SHOW_LOCAL_MENU (WNCK_WINDOW_ACTION_BELOW << 1)
>
> No plausible reason for using a macro. In C++ constants (enum or unsigned
> int) are better as they respect scope rules. Also, should this be inside
> "#ifdef META_HAS_LOCAL_MENUS" conditional?
>

Its C

>
> 296 button_layout->right_buttons[2] = META_BUTTON_FUNCTION_CLOSE;
> 297
> 298 - for (i = 3; i < MAX_BUTTONS_PER_CORNER; i++)
> 299 + for (i = 4; i < MAX_BUTTONS_PER_CORNER; i++)
> 300 button_layout->right_buttons[i] = META_BUTTON_FUNCTION_LAST;
> 301 }
>
> I'm not sure what the magic number "3"->"4" is. But we now seem to miss 3
> entirely. Is that correct?

Its for initializing the array, though maybe thats wrong. Good find let me check

2982. By Sam Spilsbury

Fix typo

2983. By Sam Spilsbury

Fix typo

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please resubmit for target branch lp:compiz-core (0.9.7)

review: Needs Resubmitting
2984. By Sam Spilsbury

Also show the menu on the window titlebar and adapt for changed wire protocol

2985. By Sam Spilsbury

Move window if we've held the button down for a bit

2986. By Sam Spilsbury

Theoretically provide the information required for the flair on the decoration

2987. By Sam Spilsbury

Show the flair in the right place

2988. By Sam Spilsbury

Use the right key

2989. By Sam Spilsbury

Use the correct key

2990. By Sam Spilsbury

Merged from lp:compiz-core

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

+ gboolean empty = g_strcmp0 (entry_id, "") == 0;

You can do the same with:
gboolean empty = (!entry_id || entry_id[0] == '\0');

2991. By Sam Spilsbury

Merged from lp:compiz-core

2992. By Sam Spilsbury

Merged from lp:compiz-core

2993. By Sam Spilsbury

Merge lp:compiz-core

2994. By Sam Spilsbury

Fix incorrect variant and initial button layout

2995. By Sam Spilsbury

Fix build without META_HAS_LOCAL_MENUS

2996. By Sam Spilsbury

Also ifdef the local menus tests

2997. By Sam Spilsbury

Don't run global setup or teardown functions if no local menus

2998. By Sam Spilsbury

Merge lp:compiz-core and allow alt-accelerator to open menus as well as reading the xprop
to determine if local menus are applicable

2999. By Sam Spilsbury

Fix memory error and menu button not showing

3000. By Sam Spilsbury

Fix placement of menus on alt-accelerator, remove debug messages

3001. By Sam Spilsbury

Fix build failure without META_HAS_LOCAL_MENUS

3002. By Sam Spilsbury

Fix a crash when trying to show the window menu on a non decorated window

3003. By Sam Spilsbury

Tell us if we have them

3004. By Sam Spilsbury

Merged lp:compiz-core

3005. By Sam Spilsbury

We also need to test the property too

3006. By Sam Spilsbury

Grab buttons too so that we can process motion events on the titlebar and
move the window instead.

Unmerged revisions

3006. By Sam Spilsbury

Grab buttons too so that we can process motion events on the titlebar and
move the window instead.

3005. By Sam Spilsbury

We also need to test the property too

3004. By Sam Spilsbury

Merged lp:compiz-core

3003. By Sam Spilsbury

Tell us if we have them

3002. By Sam Spilsbury

Fix a crash when trying to show the window menu on a non decorated window

3001. By Sam Spilsbury

Fix build failure without META_HAS_LOCAL_MENUS

3000. By Sam Spilsbury

Fix placement of menus on alt-accelerator, remove debug messages

2999. By Sam Spilsbury

Fix memory error and menu button not showing

2998. By Sam Spilsbury

Merge lp:compiz-core and allow alt-accelerator to open menus as well as reading the xprop
to determine if local menus are applicable

2997. By Sam Spilsbury

Don't run global setup or teardown functions if no local menus

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.

Subscribers

People subscribed via source and target branches