~ctwm/ctwm/trunk

« back to all changes in this revision

Viewing changes to event_handlers.c

  • Committer: Matthew Fuller
  • Date: 2022-11-05 02:09:11 UTC
  • mto: This revision was merged to the branch mainline in revision 702.
  • Revision ID: fullermd@over-yonder.net-20221105020911-fgdqeg4ozms4wlw3
Hide these TwmWindow winbox-related fields behind an ifdef along with
the code manipulating them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2230
2230
                }
2231
2231
 
2232
2232
                Tmp_win = GetTwmWindow(ResizeWindow);
 
2233
#ifdef WINBOX
2233
2234
                if(Tmp_win && Tmp_win->winbox) {
2234
2235
                        XTranslateCoordinates(dpy, Scr->Root, Tmp_win->winbox->window,
2235
2236
                                              Event.xmotion.x_root, Event.xmotion.y_root,
2236
2237
                                              &(Event.xmotion.x_root), &(Event.xmotion.y_root), &JunkChild);
2237
2238
                }
 
2239
#endif
2238
2240
                DoResize(Event.xmotion.x_root, Event.xmotion.y_root, Tmp_win);
2239
2241
        }
2240
2242
        else if(Scr->BorderCursors && Tmp_win && Event.xany.window == Tmp_win->frame) {
2267
2269
                MoveOutline(Scr->XineramaRoot, 0, 0, 0, 0, 0, 0);
2268
2270
 
2269
2271
                Tmp_win = GetTwmWindow(DragWindow);
 
2272
#ifdef WINBOX
2270
2273
                if(Tmp_win->winbox) {
2271
2274
                        XTranslateCoordinates(dpy, Scr->Root, Tmp_win->winbox->window,
2272
2275
                                              Event.xbutton.x_root, Event.xbutton.y_root,
2273
2276
                                              &(Event.xbutton.x_root), &(Event.xbutton.y_root), &JunkChild);
2274
2277
                }
 
2278
#endif
2275
2279
                if(DragWindow == Tmp_win->frame) {
2276
2280
                        xl = Event.xbutton.x_root - DragX - Tmp_win->frame_bw;
2277
2281
                        yt = Event.xbutton.y_root - DragY - Tmp_win->frame_bw;
2826
2830
                                                      &chwin);
2827
2831
                                Event.xbutton.window = Tmp_win->w;
2828
2832
 
 
2833
#ifdef WINBOX
2829
2834
                                if(Tmp_win->iswinbox && chwin) {
2830
2835
                                        int x, y;
2831
2836
                                        TwmWindow *wtmp;
2839
2844
                                                Tmp_win = wtmp;
2840
2845
                                        }
2841
2846
                                }
 
2847
#endif
2842
2848
                                Context = C_WINDOW;
2843
2849
                        }
2844
2850
                        else if(Event.xbutton.subwindow
2876
2882
         */
2877
2883
        if(RootFunction != 0) {
2878
2884
                if(Event.xany.window == Scr->Root) {
2879
 
                        Window win;
2880
2885
                        int x, y;
2881
2886
 
2882
2887
                        /* if the window was the Root, we don't know for sure it
2890
2895
 
2891
2896
                        if(Event.xany.window != 0 &&
2892
2897
                                        (Tmp_win = GetTwmWindow(Event.xany.window))) {
 
2898
#ifdef WINBOX
2893
2899
                                if(Tmp_win->iswinbox) {
 
2900
                                        Window win;
2894
2901
                                        XTranslateCoordinates(dpy, Scr->Root, Event.xany.window,
2895
2902
                                                              x, y, &x, &y, &win);
2896
2903
                                        XTranslateCoordinates(dpy, Event.xany.window, win,
2899
2906
                                                Event.xany.window = win;
2900
2907
                                        }
2901
2908
                                }
 
2909
#endif
2902
2910
                        }
2903
2911
                        if(Event.xany.window == 0 ||
2904
2912
                                        !(Tmp_win = GetTwmWindow(Event.xany.window))) {