diff options
author | Havoc Pennington <hp@pobox.com> | 2002-07-03 02:32:40 +0000 |
---|---|---|
committer | Havoc Pennington <hp@src.gnome.org> | 2002-07-03 02:32:40 +0000 |
commit | d826e620a9719527c535aa6c5e5d11ebeaa0afd5 (patch) | |
tree | 77f284adfe4549efb71adb7dbd105db09812e350 /src/frame.c | |
parent | 1db28d3b3fbf93abc54477d82270471f180057fd (diff) | |
download | metacity-d826e620a9719527c535aa6c5e5d11ebeaa0afd5.tar.gz |
use new macros to get whether we allow move/resize correct
2002-07-02 Havoc Pennington <hp@pobox.com>
* src/window.c (meta_window_show_menu): use new macros to get
whether we allow move/resize correct
* src/frame.c (meta_frame_get_flags): use new macros to get
whether we can move/resize correct, considering
maximized/fullscreen for the move case.
* src/window.h (META_WINDOW_ALLOWS_RESIZE,
META_WINDOW_ALLOWS_MOVE): new macros
* src/keybindings.c (process_keyboard_resize_grab): finish the
right/left resize, patch from Jayaraj #78179.
Has the same old move/resize bug, if it hits a constraint it
starts to break because we move without resizing.
Diffstat (limited to 'src/frame.c')
-rw-r--r-- | src/frame.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/src/frame.c b/src/frame.c index 92628805..06e14f1f 100644 --- a/src/frame.c +++ b/src/frame.c @@ -229,21 +229,14 @@ meta_frame_get_flags (MetaFrame *frame) flags |= META_FRAME_ALLOWS_SHADE; } - if (frame->window->has_move_func) + if (META_WINDOW_ALLOWS_MOVE (frame->window)) flags |= META_FRAME_ALLOWS_MOVE; - - if (frame->window->has_resize_func && - !frame->window->maximized && - !frame->window->shaded) - { - if (frame->window->size_hints.min_width < - frame->window->size_hints.max_width) - flags |= META_FRAME_ALLOWS_HORIZONTAL_RESIZE; - if (frame->window->size_hints.min_height < - frame->window->size_hints.max_height) - flags |= META_FRAME_ALLOWS_VERTICAL_RESIZE; - } + if (META_WINDOW_ALLOWS_HORIZONTAL_RESIZE (frame->window)) + flags |= META_FRAME_ALLOWS_HORIZONTAL_RESIZE; + + if (META_WINDOW_ALLOWS_VERTICAL_RESIZE (frame->window)) + flags |= META_FRAME_ALLOWS_VERTICAL_RESIZE; if (frame->window->has_focus) flags |= META_FRAME_HAS_FOCUS; |