Commit Graph

1135 Commits

Author SHA1 Message Date
Sebastian Dransfeld e5300734dc Find correct border under pointer
Previously we would find the first border and then break. Now we find
the border with the highest layer, as the code intended.

Fixes CID 1039952
2013-12-07 22:28:01 +01:00
Sebastian Dransfeld e781a9b68e It is correct to fall through here
Add comment and remove coverity error
2013-12-07 22:23:39 +01:00
Sebastian Dransfeld 8b198d77f5 bd->zone is always set
lots of code always assume it is set, so no need to be paranoid
2013-12-07 22:21:31 +01:00
Mike Blumenkrantz 1c0de40ccc remove an old case of "raise on focus" from focus revert 2013-11-29 11:58:39 -05:00
Mike Blumenkrantz da6f94a975 only change a window's vdesk when getting window profile if the current desk does not have the required window profile
ticket #onefang
2013-11-28 09:56:08 -05:00
Mike Blumenkrantz cd7a0e6b64 simplify code for moving windows to other desks: add effect unclipping to e_border_desk_set 2013-11-28 09:43:20 -05:00
Mike Blumenkrantz 848dec15fb revise d739ed0e2e to not break changing focus policies
thise commit added focus_policy member to E_Border as something to be used for setting a per-window focus policy. setting it on each window is a huge pain if the global policy ever changes, so it's better to use this member only as an override for the global policy which can be checked to see if it's been set
2013-11-21 12:38:35 -05:00
Sebastian Dransfeld d739ed0e2e handle desktop applications better
Fixes T201
2013-11-21 13:26:09 +01:00
Mike Blumenkrantz cc2939b327 prepend new windows to focus stack during init
this fixes stacking after restarts since we manage and raise windows from the bottom up, meaning that we must also build our focus stack from back to front
2013-11-20 15:32:30 -05:00
Mike Blumenkrantz 8a28ad9bb9 don't create border menu when border menu already exists
fixes crash from activating multiple bindings simultaneously which result in border menu being triggered
2013-10-07 10:12:54 +01:00
Carsten Haitzler 1c92e22eb2 check if class string is valid first, then make sure buffer is 0 terminated
i got a segv in an strncpy... but the bt missed telling me anything
other than it was in _e_border_eval(). gdb wouldn't help.

Thread 1 (Thread 0xb7859780 (LWP 1377)):
No symbol table info available.
No locals.
No symbol table info available.
No locals.
    at /usr/include/i386-linux-gnu/bits/string3.h:121
    buf = '\000' <repeats 4095 times>
    s = <optimized out>
    event = <optimized out>
    pnd = <optimized out>
    rem_change = 1
    send_event = 1

since this is the only strncpy, i can only conclude that something is
fishy about the src or dest buffer, and i can only guess that the
strncpy is directly in e_border.c (though it could have come from an
inline func or macro form eina etc.)... but it's the best guess i have.

the strncpy will have problems if bd->client.icccm.class > 4096 in
size. buf will not be nul terminated then:

       The strncpy() function is similar, except that at most n bytes of  src
       are  copied.  Warning: If there is no null byte among the first n bytes
       of src, the string placed in dest will not be null-terminated.

as per manpage. so there was a lurking bug with a non 0 terminated
buffer.  also added check for bd->client.icccm.class as it could be
null...
2013-10-04 16:48:21 +09:00
Mike Blumenkrantz fd18b63879 search for desktops by lowercased icccm class if it's different from uppercase
fixes finding firefox and some others
2013-10-03 11:22:32 +01:00
Mike Blumenkrantz 9210b83e5f move phony e_exec creation for borders to after the desktop is located to ensure that we actually have a chance of finding a correct instance 2013-10-03 11:21:00 +01:00
Mike Blumenkrantz 7dee42020e find efm's .desktop file for efm windows 2013-10-03 11:20:36 +01:00
Mike Blumenkrantz a2d85fc0ab don't delete just-set desktop/icon objects for borders during new_client run 2013-10-03 11:20:15 +01:00
Mike Blumenkrantz 247f45f26f don't check startup_id for internal windows
this is guaranteed to be wrong and trigger confusion in e_exec
2013-10-03 11:19:21 +01:00
discomfitor 8b596394d6 use more accurate heuristics when calculating ConfigureRequest move coords:
1) invalidate moves resulting from stupid clients trying to re-set their current position (SUP WINE. YEAH, I'M TALKIN TO YOU, BUDDY. WHY YOU GOTTA BE MESSIN WITH MY WINDOW COORDS?)

2) clamp coords when screen limit policy is set to prevent clients from being outside the screen at all

3) all things are allowed, nothing is prohibited
2013-09-27 06:20:17 +01:00
discomfitor 6b41a6dba9 never apply window placement policy on ConfigureRequest
geometry_auto_move is an option which should only be applied to "new" clients. we were erroneously applying it during client move/resize requests, which likely was causing unintended behavior. if this becomes an issue, the correct solution is to create (groan) another option to enforce window placement policy either [at all times] or [for client geometry requests]
2013-09-27 06:20:17 +01:00
Mike Blumenkrantz 00362b2e64 greatly improve window positioning after ConfigureRequest 2013-09-26 10:53:01 +01:00
discomfitor 041b148631 rrrrr use right client inset offsets for calculating ConfigureRequests
T288
2013-09-20 22:21:28 +01:00
discomfitor 2e1864879d factor in client_inset when calculating ConfigureRequest xy coords
T288
2013-09-20 17:02:25 +01:00
discomfitor a59b134e49 block signal binds on deleted borders
probably fixes pointer getting stuck on move/resize from internal windows
2013-09-19 20:09:41 +01:00
Mike Blumenkrantz bdd0bc624d add wl surface -> e_border mapping 2013-09-11 09:02:53 +01:00
Carsten Haitzler 4b08e7991a also dont access null bd pointer here either. 2013-08-24 13:30:32 +09:00
discomfitor 2be89a21a2 use right check on mouse_x_up to prevent random crashes 2013-08-22 18:32:06 +01:00
Mike Blumenkrantz 2b9c1e3e69 okay, setting action border on move/resize signals was a bad idea 2013-08-22 15:02:11 +01:00
Mike Blumenkrantz 5d16c96440 also unset take_focus when shading a window 2013-08-22 13:52:50 +01:00
Mike Blumenkrantz 879a260ea5 always force xwindow move during eval; fixes window positioning on shaded clients across restarts 2013-08-22 13:09:46 +01:00
Mike Blumenkrantz d1d6a1fdaf iconic windows once again remain iconic across restarts 2013-08-22 12:52:59 +01:00
Mike Blumenkrantz ce587b8181 allow mouse in focus events on focused windows; this may fix issues for the whiners who say stacking is broken 2013-08-22 12:43:34 +01:00
Mike Blumenkrantz f3643d5146 call window_resize action when beginning a netwm resize and set the direction/gravity after; fixes gtk resize grips 2013-08-22 11:34:45 +01:00
Mike Blumenkrantz 5b499d6ecf enforce action border/input_win setting whenever moving/resizing a window 2013-08-22 11:34:45 +01:00
Carsten Haitzler 212cfda19b as of e18 - we now are compositing only, which means we also don't
have to do a revers then forward paass in eval... which can cause ugly
things like reverse-evaluation :)
2013-08-02 23:06:22 +09:00
Carsten Haitzler 7cf4bfd6d0 solve a race condition for stacking of windows if opened at the same
time by the same client.
2013-08-02 16:57:06 +09:00
Carsten Haitzler b566b6b2ce THIS like was a dos newline. it switched jed to dos newline mode! aaagh! 2013-07-30 20:30:19 +09:00
Carsten Haitzler 28fa7e84aa Revert "errr. why is git saying every line changed? wth?"
This reverts commit 3c3e076f15.
2013-07-30 20:26:28 +09:00
Carsten Haitzler 3c3e076f15 errr. why is git saying every line changed? wth? 2013-07-30 20:20:49 +09:00
Mike Blumenkrantz fa7744b4de fix ibar client menu to track multiple windows per exe 2013-07-26 14:42:48 +01:00
Mike Blumenkrantz 7b6c705fd2 bugfix: border style remembers
T248
2013-07-26 13:15:48 +01:00
Mike Blumenkrantz d544048b0e add delete flag to e_border to alert us that this client window is dead 2013-07-26 12:27:47 +01:00
Mike Blumenkrantz 9e1d0627bb don't set managed/mapped atoms during hide if window was delete requested 2013-07-26 12:27:47 +01:00
Mike Blumenkrantz 3980c9a3cd only set client hints for withdrawn if client is not dead 2013-07-26 12:27:47 +01:00
Mike Blumenkrantz 9a443b6fec only move/resize client lock_win if it exists 2013-07-26 12:27:47 +01:00
Mike Blumenkrantz 3b8aaabb9b comp-ignore modal lock windows, set icccm name/class on them 2013-07-04 08:13:31 +01:00
Mike Blumenkrantz 41448890cc aaand fix border mouse actions for non modal dialog parents 2013-07-03 10:02:34 +01:00
Mike Blumenkrantz a36fde91f6 fix border mouse actions on modal dialog parents 2013-07-03 09:55:37 +01:00
Mike Blumenkrantz f412b88216 add modal lock window to border hash and enable finding by lock window 2013-07-03 09:55:37 +01:00
Mike Blumenkrantz 3a89244cd8 bugfix: focus setting on modal dialogs which are not ECORE_X_WINDOW_TYPE_DIALOG 2013-07-03 09:55:37 +01:00
Mike Blumenkrantz dbc1a2c92a fix guaranteed crash from typo in e_border_lower_below 2013-07-02 10:08:24 +01:00
Mike Blumenkrantz ca7b5169ff don't raise a border during layer set if it has a modal on the same or lower layer 2013-07-02 10:08:23 +01:00