Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

honor_size_hints not for tiled windows (fix #496) #1251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/pointer.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,8 @@ void track_pointer(coordinates_t loc, pointer_action_t pac, xcb_point_t pos)
if (pac == ACTION_MOVE) {
move_client(&loc, dx, dy);
} else {
if (honor_size_hints) {

if (honor_size_hints && grabbed_node != NULL && grabbed_node->client->state != STATE_TILED) {
resize_client(&loc, rh, e->root_x, e->root_y, false);
} else {
resize_client(&loc, rh, dx, dy, true);
Expand Down
6 changes: 1 addition & 5 deletions src/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,17 +632,13 @@ bool resize_client(coordinates_t *loc, resize_handle_t rh, int dx, int dy, bool
/* taken from awesomeWM */
void apply_size_hints(client_t *c, uint16_t *width, uint16_t *height)
{
if (!honor_size_hints) {
if (!honor_size_hints || c->state == STATE_FULLSCREEN || c->state == STATE_TILED) {
return;
}

int32_t minw = 0, minh = 0;
int32_t basew = 0, baseh = 0, real_basew = 0, real_baseh = 0;

if (c->state == STATE_FULLSCREEN) {
return;
}

if (c->size_hints.flags & XCB_ICCCM_SIZE_HINT_BASE_SIZE) {
basew = c->size_hints.base_width;
baseh = c->size_hints.base_height;
Expand Down