@@ -7254,16 +7254,45 @@ function gui_init: guierrorty;
72547254 writeln(' gui_init 9.2' );
72557255
72567256 netsupported:= netsupportedatom <> 0 ;
7257+
72577258 if netsupported then begin
7259+
72587260 writeln(' gui_init 9.3 netsupported ' , netsupported);
72597261
72607262 netsupported:= readatomproperty(rootid,netsupportedatom,atomar);
7261-
7263+
7264+ {
7265+ if xgetwindowproperty(display,rootwin,netatoms[net_supported],
7266+ 0,1024,false,xa_atom,@actual_type,@actual_format,
7267+ @nitems,@bytes_after,@prop) = success then begin
7268+ writeln('gui_init 9.3 netsupported TRUE');
7269+ if (actual_type = xa_atom) and (actual_format = 32) then begin
7270+ setlength(atomar,nitems);
7271+ atoms:= patom(prop);
7272+ for int1:= 0 to nitems - 1 do begin
7273+ atomar[int1]:= atoms[int1];
7274+ end;
7275+ end;
7276+ xfree(prop);
7277+ end else begin
7278+ writeln('gui_init 9.3 netsupported FALSE, using fallback atoms');
7279+ netsupported := False;
7280+ netatoms[net_workarea] := xinternatom(display, '_NET_WORKAREA', true);
7281+ netatoms[net_wm_state] := xinternatom(display, '_NET_WM_STATE', true);
7282+ netatoms[net_wm_state_fullscreen] := xinternatom(display, '_NET_WM_STATE_FULLSCREEN', true);
7283+ end;
7284+ }
72627285 writeln(' gui_init 9.4 netsupported ' , netsupported);
72637286
72647287 writeln(' firstcheckedatom ' , firstcheckedatom);
72657288 writeln(' lastcheckedatom ' , lastcheckedatom);
7266-
7289+ writeln(' length(xdndatoms) = ' , length(xdndatoms));
7290+ writeln(' length(xdndactionatoms) = ' , length(xdndactionatoms));
7291+ writeln(' length(netatoms) = ' , length(netatoms));
7292+ writeln(' length(atomar) = ' , length(atomar));
7293+
7294+ // atomar := netatoms;
7295+
72677296 for netnum:= firstcheckedatom to lastcheckedatom do begin
72687297 atom1:= netatoms[netnum];
72697298
@@ -7272,9 +7301,7 @@ function gui_init: guierrorty;
72727301
72737302 netatoms[netnum]:= 0 ;
72747303
7275- writeln(' length(atomar) = ' , length(atomar));
7276-
7277- for int1:= 0 to high(atomar) do begin
7304+ for int1:= 0 to high(atomar) do begin
72787305 if atomar[int1] = atom1 then begin
72797306 writeln(' B atom num ' , atom1);
72807307 netatoms[netnum]:= atom1;
@@ -7285,6 +7312,11 @@ function gui_init: guierrorty;
72857312
72867313 end ;
72877314
7315+ writeln();
7316+
7317+ writeln(' length(netatoms) = ' , length(netatoms));
7318+ writeln(' length(atomar) = ' , length(atomar));
7319+
72887320 writeln(' gui_init 9.5' );
72897321 i := 0 ;
72907322 for netnum:= low(netatomty) to needednetatom do begin
0 commit comments