|
Lines 670-675
is_xvkbd_window (Window window)
Link Here
|
| 670 |
static void |
670 |
static void |
| 671 |
setup_xvkbd_window (GSWindow *gswindow, Window window) |
671 |
setup_xvkbd_window (GSWindow *gswindow, Window window) |
| 672 |
{ |
672 |
{ |
|
|
673 |
gs_debug ("Setting up xvkbd_window from window %d", (int) window); |
| 674 |
|
| 673 |
xvkbd_window = gdk_window_foreign_new (window); |
675 |
xvkbd_window = gdk_window_foreign_new (window); |
| 674 |
gdk_window_hide (xvkbd_window); |
676 |
gdk_window_hide (xvkbd_window); |
| 675 |
gdk_window_set_override_redirect (xvkbd_window, TRUE); |
677 |
gdk_window_set_override_redirect (xvkbd_window, TRUE); |
|
Lines 707-721
gs_window_xevent (GSWindow *window,
Link Here
|
| 707 |
/* MapNotify is used to tell us when new windows are mapped. |
709 |
/* MapNotify is used to tell us when new windows are mapped. |
| 708 |
ConfigureNofify is used to tell us when windows are raised. */ |
710 |
ConfigureNofify is used to tell us when windows are raised. */ |
| 709 |
switch (ev->xany.type) { |
711 |
switch (ev->xany.type) { |
|
|
712 |
case CreateNotify: |
| 713 |
{ |
| 714 |
XCreateWindowEvent *create_event; |
| 715 |
|
| 716 |
create_event = &ev->xcreatewindow; |
| 717 |
|
| 718 |
if (!x11_window_is_ours (create_event->window) && is_xvkbd_window (create_event->window)) |
| 719 |
setup_xvkbd_window (window, create_event->window); |
| 720 |
|
| 721 |
break; |
| 722 |
} |
| 710 |
case MapNotify: |
723 |
case MapNotify: |
| 711 |
{ |
724 |
{ |
| 712 |
XMapEvent *xme = &ev->xmap; |
725 |
XMapEvent *xme = &ev->xmap; |
| 713 |
|
726 |
|
| 714 |
if (! x11_window_is_ours (xme->window)) { |
727 |
if (! x11_window_is_ours (xme->window)) { |
| 715 |
if (is_xvkbd_window (xme->window)) |
728 |
gs_window_raise (window); |
| 716 |
setup_xvkbd_window (window, xme->window); |
|
|
| 717 |
else |
| 718 |
gs_window_raise (window); |
| 719 |
} else { |
729 |
} else { |
| 720 |
gs_debug ("not raising our windows"); |
730 |
gs_debug ("not raising our windows"); |
| 721 |
} |
731 |
} |
|
Lines 728-734
gs_window_xevent (GSWindow *window,
Link Here
|
| 728 |
|
738 |
|
| 729 |
if (! x11_window_is_ours (xce->window)) { |
739 |
if (! x11_window_is_ours (xce->window)) { |
| 730 |
gs_window_raise (window); |
740 |
gs_window_raise (window); |
| 731 |
gs_window_raise (xvkbd_window); |
741 |
/* gs_window_raise (xvkbd_window); */ |
| 732 |
} else { |
742 |
} else { |
| 733 |
gs_debug ("not raising our windows"); |
743 |
gs_debug ("not raising our windows"); |
| 734 |
} |
744 |
} |